Reactive (non-busy-wait) service example in iceoryx2 #1138
-
|
Hi everyone, first of all thank you for this awesome project! We’re using iceoryx as middleware in a research project and really enjoy working with it :) We originally used iceoryx1 for several microservice applications that communicate purely via a request–response pattern. Now we’d like to move to iceoryx2. In our setup, services should be reactive and efficiently wait for incoming requests without busy waiting. Therefore, our original implementation followed the Client using WaitSet and Server using Listener Example. Since iceoryx2 refactored the execution control, including the WaitSet and Listener mechanisms, it’s been challenging for me to translate the old examples. The new request–response C++ examples seem to rely on polling, and I could not find an waitset-based variant. I’ve gone through the iceoryx2 book and the event-based communication example, but I'm still not sure how to implement it correctly. Is there already an example or a recommended pattern for this in iox2? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hi @TE-2 currently there is no example and we also need to extend the Event mechanism to send notifications only to single Listeners. Currently you would have to create multiple Event services and do the mapping of the Event to the Client by yourself. Alternatively, there is the option to also wake up Clients which did not send the request. Here, you could use the event ID to tell if the event was meant for the corresponding client. The event ID could be sent to the server as part of the user header. It is on our todo list, though and we would like to extend the Event mechanism to support coupling an endpoint to a listener and let the notifier only trigger the listener related to a specific endpoint. There is currently no ETA, though and this feature needs some funding. |
Beta Was this translation helpful? Give feedback.
Hi @TE-2
currently there is no example and we also need to extend the Event mechanism to send notifications only to single Listeners. Currently you would have to create multiple Event services and do the mapping of the Event to the Client by yourself. Alternatively, there is the option to also wake up Clients which did not send the request. Here, you could use the event ID to tell if the event was meant for the corresponding client. The event ID could be sent to the server as part of the user header.
It is on our todo list, though and we would like to extend the Event mechanism to support coupling an endpoint to a listener and let the notifier only trigger the listener related to a specif…