I have a legacy application that handles communication using the ACE Reactor. To improve reliability across temporary network partitions, I would like to use ZeroMQ, instead of TCP sockets, as the transport. ACE provides C++ wrappers for existing IPC mechanisms, but I want to provide a custom IPC mechanism that ACE can use. In my particular case I want to use zmq, but my question is more general and I am asking, how can I use a custom transport with ACE?
Asked
Active
Viewed 266 times
1
-
Are you trying to ask whether anyone has access to the ACE framework source-code documentation? ZeroMQ can intelligently mediate even the original TCP-originated transport-links accross non-native transport-routes, if one wishes to, so as a last resort, you can do the same. – user3666197 Dec 11 '17 at 21:18
-
1If you have some source code that understand BSD sockets, and you don't want to make many changes to it, you might care to take a look at http://nanomsg.org. It's very similar in philosphy to ZeroMQ, but its function prototypes are closer to the BSD socket function prototypes. – bazza Dec 11 '17 at 23:17
1 Answers
0
There are two ways to go about this.
- Derive a new family of IPC classes from
ACE_SOCK
or maybeACE_IPC_SAP
, depending on what ZeroMQ gives you for a model. Don’t forget the address class to match. This is a lot of work but may be worth it if you will reuse it in many places. - Derive a handler for your use case from
ACE_Event_Handler
and include a member that is your ZeroMQ transfer object. Assuming you can get a selectable socket handle from the ZeroMQ object you can access it from theget_handle()
hook and register it with the reactor. Then from yourhandle_input()
et al callbacks do the message transfer. This is relatively quick and easy.

Steve Huston
- 1,432
- 13
- 20