Hacker News new | ask | show | jobs
by dochtman 5229 days ago
I like delivering ZeroMQ content to the browser (I have even written my own little WebSockets server to deliver ZeroMQ-pubsub meessages to my webapp), but I'm not sure I understand what the use for STOMP or NullMQ is, here. Is STOMP just used for to translate some bits to ZeroMQ frame terms and NullMQ used as the WebSockets-to-ZeroMQ broker? Why is this better than https://github.com/tailhook/zerogw?
1 comments

NullMQ multiplexing protocol is built on top of STOMP. The main advantage of NullMQ is same socket primitives as ZeroMQ, so same patterns and solutions can be built in the browser.
I'm new to ZeroMQ. Would you be willing to provide a quick example scenario where this might be useful?
I feel the example I built for our demo is a good one. Here I implemented presence and chat servers to build online chatroom. Servers and clients were initially built in Ruby, to be used in a private network behind firewall. I was then able to re-use client code with minimal changes and port it into JavaScript. This client code gave presence and chat to the browser. So effectively we solved an interesting networking problem once and were able to re-use the solution in two vastly different environments - private networks and the browser, where different authentication, authorization, performance and guarantees requirements apply.