Is there a way to provide my own shared memory and notification channel? #1658
Replies: 1 comment 5 replies
|
@DUOLabs333 sorry for the late response. This totally slipped my attention. We already have hypervisor communication between host and qemu guest. It is one of the components which are not open-source. It might become open-source at some point, but currently it is one of the pillars we create in order to get have a sustainable long-term funding for the OSS project. If you are using Rust, it is quite trivial to create custom services. This is how the IPC Service is defined https://github.com/eclipse-iceoryx/iceoryx2/blob/main/iceoryx2/src/service/ipc.rs. So, you basically have to implement a trait by just defining some types. With this trait, every aspect of the implementation can be adjusted and the API for the user stays the same. This is also what we use for our hypervisor support. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm currently in the process of optimizing the communication library I use for many of my projects --- right now, I'm using TCP as a generic channel, but since the communication most of the time is between a VM and the host, I thought that it would be a good idea to implement a special shared memory-based channel for that scenario. While I do have something working (I'm basically using QEMU's ivshmem feature to open a memory segment that's shared between guest and host), it's a lot of code, and optimizing it is taking a while (I'm currently trying to figure out why writing to the same memory address is faster than writing to two different addresses, switching between addresses on each write) --- pushing that work off to a library would be very helpful (though I'm not sure about performance...)
While researching different options, I came across this project, which looked interesting and the most promising --- however, I noticed that iceoryx, like many other projects, seem to handle shared memory and cross-process notification itself. I do remember on a Reddit thread that (ostensibly) of the team members said that the architecture of the project makes it easy to support new platforms as long as APIs for notification and shared memory are available --- is this available as an external API that users can utilize (eg, when creating a publisher/subscriber, the user can supply in a path to shared memory of length N, and a notification callback)? This would be useful for my usecase, as since one side is in a VM, normal IPC mechanisms won't work.
All reactions