Replies: 1 comment 4 replies
-
Hi Matthias, short answer is sadly no. The longer answer is more complicated. Let me explain. Depending on your use case, you could hack you around some of the limitations and if you are brave you could try iceoryx2 which would remove these hacks or at least make them less hacky. Unfortunately, there is currently no way to block on allocation if no chunks are available. The only option would be to periodically "poll" by retrying to allocate chunks. The terminal will be flooded with error messages, though. In case your apps do not need to be connected all the time, there is an experimental API which allows the apps to disconnect and safely restart RouDi with a different configuration. If this would help, I can tell you a bit more about that. Being able to connect to multiple RouDi from the same application will be quite some work since the architecture of the current C++ based iceoryx wasn't designed with such use cases in mind. If your project is more of a spare time project, iceoryx2 might already be interesting for you, especially if you could use Rust. We should soon have C bindings to make it also work from other languages. It is also not yet on feature parity with the current C++ based iceoryx and we are also working to smoothen the rough edges. But it does not require a central daemon and the memory can be configured at runtime when the service is created. It still has a quite static memory config but we are planing to make it more dynamic with the downside of potentially having to deal with memory fragmentation. But when we are done, you should be able to select between multiple allocation strategies, depending on your needs and the safety requirements of your domain. Btw, can you share more details about your project? Is it a spare time project or more of a day job one? Best, |
Beta Was this translation helpful? Give feedback.
-
Hi!
Thank you for making Iceoryx, it is a really nice tool :-)
I have the following issue that I did not find any solution for in the documentation or code yet: I have an Iceoryx system with a data producer, which provides camera data from a wide array of data acquisition devices, and some consumers of the data. If the system was static, I could define a memory pool that has a payload size of the expected camera video frame, and set chunks which make it work for the expected framerate(s).
Unfortunately though, I have no idea which camera the user will attach, and how big the individual frames will be. Worse, I do not even know how many cameras will be attached. And if I
load()
a memory block, and none is available, Iceoryx also seems to fail instead of waiting for an available memory block, which makes the system simply lose data (when the GUI is used, even "silently" to a user).I could paper over this issue by just setting a large chunk size with a decently sized count, but then RouDi will hold gigabytes of shared memory which the OS could actually use a lot better for other things.
The primary application / data producer does know the expected resource demand though, and in theory it could tell RouDi in advance. So:
Users could fiddle with the pool sizes manually until everything works, but dynamically altering them at runtime would be a lot nicer. The application has all information available for that, and RouDi is not used by anything else on the system but that application and the processes it shares data with (which is why I am looking forward to the multiple-RouDi support :-D).
Maybe you have an answer for this, even knowing that it isn't possible would already be valuable :-)
Best,
Matthias
Beta Was this translation helpful? Give feedback.
All reactions