eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
513 stars 23 forks source link

Trickiness with Services #268

Closed 3tilley closed 1 month ago

3tilley commented 2 months ago

Hello,

I've had a few troubles with Services, like how to create them reliably (permission issues on Windows), what the semantics are for when they are reused from when a previous process has died etc. Looking at the repo, can I guess it would be better for me to either wait for Nodes to be released, or just to develop against the main branch as the project evolves a little?

elfenpiff commented 2 months ago

@3tilley

Looking at the repo, can I guess it would be better for me to either wait for Nodes to be released.

We plan to release the Nodes with the full cleanup feature at the beginning of August so if you are able to wait a little longer I would recommend waiting a bit more since the API breaks a little more often on main. But we are confident that the API is becoming much more stable after release v0.4 (which is coming in the beginning of August).

what the semantics are for when they are reused from when a previous process has died etc.

When the Nodes with the cleanup feature are implemented then a node alive check is performed whenever you open or close a service. If a dead Node/process is detected, all of its resources are cleaned up for you - this happens behind the scenes, and you have to do nothing at all. Furthermore, we will also provide an API so you can write your centralized node monitor process that performs the cleanup immediately. Still, for the everyday use case, it is sufficient for every process to do it on its own when it starts or stops using a service.

like how to create them reliably (permission issues on Windows)

Could you elaborate this in more detail? Were you sometimes unable to create services due to insufficient permissions? Btw. in windows you can remove all the stale resources by hand for now, see: https://github.com/eclipse-iceoryx/iceoryx2/blob/main/FAQ.md#a-crash-leads-to-the-failure-publishsubscribeopenerrorunabletoopendynamicserviceinformation Everything should be stored under c:\Temp\iceoryx2\.

elfenpiff commented 1 month ago

@3tilley I am closing the issue. If anything is still open or I missed something, please feel free to reopen the issue.

FYI: The nodes with the full cleanup feature have been implemented. Whenever a process creates a new node, it looks for dead nodes and cleans them up. This usually happens when you restart a crashed application.