Replies: 1 comment 1 reply
|
Hey @TE-2
Yes, this is fine. To give you some insights into our behind-the-scenes discussions on this topic. We played around with the idea that the user is able to provide a name to every port and that you can send data or notifications to a port with a specific name, or receive data and notifications only from a port with a specific name. It would allow you to have an event and a request response service with the same service name, and the client and server port would have a name that you can freely pick. Then you could create two listeners (one with the name of the client port and one with the name server port) and could send a request to a specific server and notify just this one specific server. Since we are still here in the brainstorming phase, I would like your opinion on whether this would make life easier for you.
You cannot prevent this. The worst case is that the client sends the request, and then the process dies. But iceoryx2 is made for mission critical system and we must follow the freedom of interference principle what roughly states that a bug in one part of the system shall not affect another part. To be also more robust on the server side, you can adjust the request-handling-algorithm so that, when you are triggered by a request-has-been-sent-notification you collect all requests with
This can never happen and is ensured on multiple layers, also on the API. As soon as you receive a request, you get an |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
based on a previous discussion I’ve been experimenting with a small reactive client–server example and I’d like to get your thoughts on the general design approach.
In my setup, both the client and the server are implemented as custom classes, each with their own listener and notifier. The communication flow works as follows:
My goal is to have a fully event-driven system where both sides react instantly to incoming data, but without any busy waiting. So far, this setup seems to work, but I’m not sure if this is an idiomatic or efficient way to use the Iceoryx2 tools.
I’m mainly uncertain about the following points:
For example, what happens if clientA fills the server’s request queue but never sends a corresponding notification?
When a clientB sends both a request and a notification, from my understanding the server could processes a mismatched request, since the two are not directly linked.
Is there a native way to ensure that the notification and the message originate from the same client (apart from manually sending some metadata with the rewuest and the notification)? I noticed that requests contain a unique ID that can be retrieved, but I couldn’t find an equivalent identifier for notifications.
I’d appreciate any feedback or ideas on improving this design, especially regarding synchronization or best practices with Iceoryx2.
I’ve included my custom class implementations and main programs below for reference (mainly based on the example cxx_event_based_communication)
custom_client.hpp
custom_server.hpp
main_client.cpp
main_server.cpp
All reactions