News for hackers. Stuff that matters.
Re:Interacting with ZeroMQ from the browser by dochtman on Tuesday February 28, 2012 @02:00PM (#3644366)
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?
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @02:09PM (#3644413)
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.
Re:Interacting with ZeroMQ from the browser by msutherl on Tuesday February 28, 2012 @06:27PM (#3645559)
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 by avalanche123 on Tuesday February 28, 2012 @06:31PM (#3645576)
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 by rumcajz on Tuesday February 28, 2012 @12:42PM (#3644017)
"ZeroMQ’s actual C library (libzmq) is just an implementation detail."

That's a spot on. It doesn't really matter whether you are using ZeroMQ, NullMQ or raw HTTP.

It's like OO-programming: You can write OO program in any language.

Same way, you can do distributed messaging on top of any transport layer.

Re:Interacting with ZeroMQ from the browser by malkia on Tuesday February 28, 2012 @02:14PM (#3644445)
Not that it matters much, but ZeroMQ is written in C++, while exposing "C" only interface, and then additionally there is a C++ binding to this "C" interface, which IMHO is very robust design (C for API is much easier to access from other langs).
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @02:17PM (#3644465)
You are right, however C bindings in other languages usually look quite ugly and non-idiomatic, but ZeroMQ did great job in that sense and their higher level language bindings are written with language specifics in mind
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @12:43PM (#3644018)
Exactly, I'm very happy that message went through!
Re:Interacting with ZeroMQ from the browser by hinathan on Tuesday February 28, 2012 @04:38PM (#3645118)
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 by rumcajz on Tuesday February 28, 2012 @11:59PM (#3646516)
Also there seems to be a braidge that connects nginx to 0mq at the backend side: https://github.com/FRiCKLE/ngx_zeromq
Re:Interacting with ZeroMQ from the browser by progrium on Tuesday February 28, 2012 @06:18PM (#3645526)
Keep in mind STOMP is an implementation detail in getting ZeroMQ-like sockets in the browser.
Re:Interacting with ZeroMQ from the browser by alberth on Tuesday February 28, 2012 @02:23PM (#3644504)
Mongrel2.org anyone?
Re:Interacting with ZeroMQ from the browser by Alexandervn on Tuesday February 28, 2012 @02:31PM (#3644551)
Mongrel2 is a webserver and does ZeroMQ serverside. This is about ZeroMQ in the browser.
Re:Interacting with ZeroMQ from the browser by progrium on Tuesday February 28, 2012 @02:30PM (#3644544)
Mongrel2 uses ZeroMQ to handle HTTP. Not really the same thing at all.
Re:Interacting with ZeroMQ from the browser by dripton on Tuesday February 28, 2012 @12:35PM (#3643987)
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.

Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @12:40PM (#3644011)
Hi, the author is not twelve and he in fact is quite known in Python community. I'll ping him about missing license.
Re:Interacting with ZeroMQ from the browser by dochtman on Tuesday February 28, 2012 @01:56PM (#3644344)
To wit, useful READMEs are useful. Make use of that fact, please.
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @02:10PM (#3644420)
Yup, I'm sure that will get updated
Re:Interacting with ZeroMQ from the browser by loeg on Tuesday February 28, 2012 @01:37PM (#3644257)
Try the LICENSE file or header comments in the sources.
Re:Interacting with ZeroMQ from the browser by dripton on Tuesday February 28, 2012 @03:14PM (#3644769)
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 by progrium on Tuesday February 28, 2012 @02:29PM (#3644539)
I updated it to be slightly more useful.
Re:Interacting with ZeroMQ from the browser by tjholowaychuk on Tuesday February 28, 2012 @02:11PM (#3644430)
and it's written with noobish coffeescript and cakefiles :s
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @02:14PM (#3644441)
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...
Re:Interacting with ZeroMQ from the browser by tjholowaychuk on Tuesday February 28, 2012 @02:15PM (#3644452)
it just looks like js generated with coffeescript.. not really the same thing
Re:Interacting with ZeroMQ from the browser by avalanche123 on Tuesday February 28, 2012 @02:18PM (#3644477)
heh, best I can do yet
Re:Interacting with ZeroMQ from the browser by oscilloscope on Tuesday February 28, 2012 @11:48PM (#3646488)
it looks like idiomatic javascript to me
Re:Interacting with ZeroMQ from the browser by tripzilch on Tuesday February 28, 2012 @01:10PM (#3644141)
(upvoted for funny, even though incorrect)