machinekit-hal
machinekit-hal copied to clipboard
Machinetalk Router implementations not ready for broker
Issue by machinekoder
Mon Jan 11 16:33:52 2016
Originally opened as https://github.com/machinekit/machinekit/issues/859
The router sockets used in Machinetalk service in Machinekit are not ready to be used with a broker in between service and client. As can be seen here http://zeromq.org/tutorials:dealer-and-router a chain of dealer-router sockets adds multiple addresses to the messages received by the service. However, currently several services expect only a single address. Multiple identities would cause the services to fail.
See:
- https://github.com/machinekit/machinekit/blob/master/src/machinetalk/mkwrapper/mkwrapper.py#L1476
- https://github.com/machinekit/machinekit/blob/master/src/machinetalk/config-service/configserver.py#L171
- https://github.com/machinekit/machinekit/blob/master/src/machinetalk/mklauncher/mklauncher.py#L367
- https://github.com/machinekit/machinekit/blob/master/src/machinetalk/haltalk/haltalk_command.cc#L45
To fix this problem either null frame has to be inserted (like REQ-REP does) or only the last frame of the multipart message should be interpreted. The second approach would be backwards compatible with current clients.
Comment by machinekoder
Mon Jan 11 16:36:50 2016
We currently don't use multipart messages in Machinetalk and we don't need to because we use Protobuf for serialization. In case that stays the same in the future (we should make it part of the Machinetalk specification) approach two should be easiest to implement.
