Exchanging messages between capsules in different controllers [message #1797607] |
Fri, 02 November 2018 16:20 |
Dimo Ditchev Messages: 33 Registered: September 2018 |
Member |
|
|
Let's create 2 capsules (for example Pinger and Ponger) in a Top capsule. The Top capsule will be assigned a Default controller.
Then let's select each capsule as Top and create Controller for each.
So under Linux we will have 2 executables, one for each Capsule.
How can we run both executables in a Linux shell and exchange messages (pings) between them.
Does anyone know how to do it?
Is there a similar example?
Thanks,
Dimo
[Updated on: Fri, 02 November 2018 16:55] Report message to a moderator
|
|
|
|
|
Re: Exchanging messages between capsules in different controllers [message #1797621 is a reply to message #1797614] |
Fri, 02 November 2018 18:40 |
|
In addition to what Ernesto posted with the use of MQTT at Queen's University, you can also use any IPC mechanism supported by your platform, e.g.
- Named Pipes,
- SysV/PoSiX Message Queues
- SysV/POSIX Message Queues
- Shared Memory
- etc.
What you have to do, in this case, then, is to wrap their interface implementation within a capsule providing a port that implements the protocol that defined for this exchange. This could be a service service provider point (SPP). Any capsule requiring that communication functionality would just need to have a service access point (SAP). SAP's and SPP's are connected based on their name, so they do not need connectors.
Note that the SPP would have to be on its own thread so as to not block the rest of the application when it runs!
/Charles Rivet
|
|
|
|
Powered by
FUDForum. Page generated in 0.03142 seconds