Wasn't Mongrel2 created solely because NGINX didn't support ZeroMQ.
@ZedShaw, thoughts - comments?
Wasn't Mongrel2 created solely because NGINX didn't support ZeroMQ.
@ZedShaw, thoughts - comments?
Say you want to map /chat to a handler. Mongrel2 opens a PUSH socket, and a SUB socket connecting to one or more chat handlers. The handlers open a PULL and PUB socket. Mongrel2 will spread requests to /chat across the available handlers, and receive all published responses. It's a pretty smart way to handle multiple handlers receiving requests at the same time. It's been a while since I looked at Mongrel2, so it's very possible I have some of the details wrong...
In my opinion, this is great. I think Mongrel2 is an excellent proof-of-concept, and if it provided the impetus for a much more widely used project like nginx to go down a similar path (though it's just a module right now), then everyone wins.
That said, this certainly isn't in nginx mainline, and it's very feature poor as compared to Mongrel2. One could not simply swap in nginx with this module for an existing Mongrel2 installation.
That's because this is _transport_module_ and what Zed did with Mongrel2 is build a level 7 protocol on top of ZeroMQ messages.
Even if this would support PUSH/PULL + PUB/SUB sockets right now, you would still need an _upstream_module_ that understands Mongrel2's level 7 protocol.
- PUSH/PULL + PUB/SUB support for ngx_zeromq (transport module),
- ngx_mongrel2 (upstream module).
Should be ready sometime next week.
ZeroMQ I/O threads are still being used with REQ/REP, so this doesn't change anything in that matter.
Also, exclusive use of REQ/REP pair isn't restriction, but current limitation of the module ;)
I'm also blogging about mongrel2 lately: http://daltonmatos.wordpress.com
It has nothing in common with Mongrel2 other than the fact that both use ZeroMQ transport instead of TCP.