Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about MQTT #5

Closed
robmarkcole opened this issue May 24, 2019 · 2 comments
Closed

Question about MQTT #5

robmarkcole opened this issue May 24, 2019 · 2 comments

Comments

@robmarkcole
Copy link

HI Jeff
this isn't an issue, but I am interested to know why you chose ZMQ when MQTT is very common for IOT? There are a few comments in this article but I am interested to hear your views.
Many thanks
Robin

@jeffbass
Copy link
Owner

Hi Robin,
Question and answer discussions work fine as issues in GitHub. Easier than using the Wiki. 😎
MQTT was definitely one of the messaging protocols I looked at. There are 3 reasons I settled on ZMQ.

  1. MQTT requires a broker server; ZMQ does not.
  2. A broker server means transporting an image twice. Once from image source to message broker; a second time from the message broker to destination. ZMQ is peer to peer; images are transported one time only from my imagenodes to my imagehub. In most cases that means the image will pass over the network twice rather than just once. More on "broker vs brokerless" is here: http://zeromq.org/whitepapers:brokerless.
  3. The request-reply pattern in ZMQ allows me to have greater control over handling of non-replies and delays in sending images. The publish-subscribe pattern is available in both ZMQ and MQTT; I prefer the simple request-reply pattern of ZMQ. It's "faults" are actually "benefits" in my imagenode to imagehub system. There is a lot of discussion of the request reply pattern in the first couple of pages of: http://zguide.zeromq.org/page:all.
    I did not do any careful timing tests to see whether ZMQ would be faster or slower than MQTT from end to end. But ZMQ is very, very fast in my imagehub to imagehub system.
    I have been using ZMQ to run 21 imagenodes (raspberry pi's) with 2 imagehubs for over 2 years. It is fast, reliable and very simple. But MQTT would be a great choice also; it is a great library.

@robmarkcole
Copy link
Author

HI Jeff
many thanks for your detailed reply, you put a lot of thought and expertise into this project and it shows.
All the best
Robin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants