Message Passing - Pub/Subs


#1

@gilbert

Gil, have you cats looked into Ignition transport? ZeroMQ and Protobufs for a pub/sub framework. Any data you can share?

Thanks

Jim


#2

Hey Jim,

We currently use ZeroMQ’s pub/sub and req/rep model for transporting our video streams from C++ daemons to the Node.js processes. We have been looking mainly at protobufs as our target for message serialization. Gil did some prototyping with the nanopb implementation so we can use protobuf serialization in the firmware all the way up to the browser.

While ZeroMQ is great, we are probably leaning more towards using websockets as our transport mechanism, as it allows the client in the browser to directly connect to data services without the need for a web server in the middle. We recently upgraded the mjpeg video service by cutting out the Node middleman and doing a direct websocket connection from the C++ video server to the browser, saving a ton of CPU, increasing throughput, and reducing latency. We’ll be moving our h264 stream over to this method soon, and plan to eventually expose a websocket interface to the firmware via a C++ daemon that controls the UART interface to the MCU. We are also very interested in creating ROS2/DDS interfaces for local network and interprocess communications.

In the firmware, I’m currently mulling over a design that uses the inter-thread messaging mechanisms in RIOT OS (a real time os for microcontrollers) combined with nanopb to facilitate pub/sub comms between sensors/devices and services running on the host computer.

Never heard of ignition, will have to look into it.


#3

Awesome man. Thanks for the info. Switchin up stuff at work and looking at this for a project next year. Also for rovs😊