[zeromq-dev] Design problem of distributed environment

Wes Young wes at barely3am.com
Wed Nov 15 15:10:31 CET 2017

> I am currently fighting with some design issues for my project and as newbie to zeroMQ I am here to look for advice. My project should simulate distributed algorithm in distributed environment.

welcome :)

> For example algorithm like brodcasting. I need to implement communication between nodes in this environment and I chose to use zeroMq.
> My question is what do you think is the best approach when you want to design environment where entity must do following:
> be able to receive messages from neighbours,
> be able to send message to all or maybe few selected neighbours.
some of this may depend how you define “a neighbor” (e.g.: pre-configured env, or zero-conf env). if you’re looking for little-to-zero configuration, may wanna checkout zyre:

https://rfc.zeromq.org/spec:36/ZRE <https://rfc.zeromq.org/spec:36/ZRE>
https://github.com/zeromq/zyre <https://github.com/zeromq/zyre>My first idea was to give very entity a ROUTER socket. Is it possible to achieve it with only routers?
I believe so- but you may wanna start by reading about the different patterns first and prototyping some simple one to one, one to two patterns to get your hands dirty first, get a feel for the different socket types:

http://zguide.zeromq.org/page:all#Messaging-Patterns <http://zguide.zeromq.org/page:all#Messaging-Patterns>

You probably start out with REQ/REP which is easy- then move into async (router/dealer) then into something like Zyre where the learning curve is a little steeper (but probably closer to what you want long term if I’m understanding your question).
> As I looked at ROuter it can send message to multiple nodes and also can receive messages from multiple nodes.
> Every entity knows who is it's neoghbor and have information about IP's and ports.
Yea, sounds like a problem ZYRE solves- but if you’re new may wanna work your way into it a bit with some of the simpler types first..

make sense?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20171115/837038ca/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20171115/837038ca/attachment.sig>

More information about the zeromq-dev mailing list