Client server communication using ZeroMQ

Hello, I thought I’d share a simple example [1] of client server communication using ZeroMQ networking library. I am not an expert programmer, so the code might not be the most efficient one. More information is available in the readme file also available under [1]. Comments are welcome


1 Like

This is very cool!

I’d love to hear more about the design decision(s). What made you choose ZeroMQ as opposed to some other library?

Thanks, I appreciate it.

I was basically searching for a library which would help me build a federated analysis model similar to [1]. The two essential requirements for me were ease of use and support for TLS. During the research, I considered RabbitMQ, gRPC and Boost Asio libraries. ZeroMQ feels like one step above socket programming (such as with Boost Asio) and I would say it is also easier to use it. Moreover, TLS is supported as well and is explained in detail in [2]. RabbitMQ supports more advanced features, such as message persistence, but I had no plan to utilize them for my framework. It seems that many federated analysis/learning frameworks use RPC/gRPC (Flower, PySyft, OpenFL, TensorFlow Federated, FATE), these seem to be, however, more focused on a star network topology with a clear distinction between client and server roles.

I still haven’t had a chance to test ZeroMQ’s (or generally Message Queue) ability to send larger data (ciphertext, keys) when processes are running on different servers and with the presence of latency and limited network bandwidth. Running multiple processes on a single server proved to be very reliable.

[1] Truly privacy-preserving federated analytics for precision medicine with multiparty homomorphic encryption | Nature Communications
[2] Using ZeroMQ Security (part 2) -

You might be interested in checking out Palisade-Serial-Examples! I know that @dcousins did/ does quite a bit of work with client-server stuff.

@ypolyakov should we introduce a section on the RTD showcasing particularly interesting projects? I can think of one other that might be worth highlighting (assuming @mpuskaric and that user are fine having their projects showcased)

thanks for the reference, these are excellent examples, I learned a lot from them.

No objections from my side.