Live data from Hacker News

Interacting with ZeroMQ from the browser

avalanche123.com

21–28 of 28 posts

Re: Interacting with ZeroMQ from the browser

#22
post #7
post #2

Neat. I've wanted ZeroMQ in my browser. I checked the README file for a license, but instead it says "ZeroMQ in your brower, yo!" Which tells me that: 1. I can't use it. 2. The author is 12. 3. It probably doesn't work.

Try the LICENSE file or header comments in the sources.

Obviously, the LICENSE file wasn't there when I posted my snarky comment. Props to the author for adding one, though, since now I know that I can use this code.

Re: Interacting with ZeroMQ from the browser

#23
Jeff and Bulat - this is fascinating and timely. Just this week I've been experimenting with bridging (Apollo) STOMP with https://github.com/wandenberg/nginx-push-stream-module and getting what appears to be similar results. Neat stuff, and I'm half tempted to write an nginx-STOMP bridge to save a few layers of indirection.

Re: Interacting with ZeroMQ from the browser

#24

Jeff and Bulat - this is fascinating and timely. Just this week I've been experimenting with bridging (Apollo) STOMP with https://github.com/wandenberg/nginx-push-stream-module and getting what appears to be similar results. Neat stuff, and I'm half tempted to write an nginx-STOMP bridge to save a few layers of indirection.

Keep in mind STOMP is an implementation detail in getting ZeroMQ-like sockets in the browser.

Re: Interacting with ZeroMQ from the browser

#25
post #9

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 ?

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?

Re: Interacting with ZeroMQ from the browser

#26

Earlier quoted context omitted.

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.

Re: Interacting with ZeroMQ from the browser

#27

Earlier quoted context omitted.

Haha, I know you don't like coffeescript, so I wrote clone client library for demo in pure JS - https://github.com/progrium/nullmq/blob/master/demos/presenc...

it just looks like js generated with coffeescript.. not really the same thing

it looks like idiomatic javascript to me

Re: Interacting with ZeroMQ from the browser

#28

Jeff and Bulat - this is fascinating and timely. Just this week I've been experimenting with bridging (Apollo) STOMP with https://github.com/wandenberg/nginx-push-stream-module and getting what appears to be similar results. Neat stuff, and I'm half tempted to write an nginx-STOMP bridge to save a few layers of indirection.

Also there seems to be a braidge that connects nginx to 0mq at the backend side: https://github.com/FRiCKLE/ngx_zeromq
Post reply on HN