ZeroRPC
github.com
github.com
On our PaaS[1] we are running ZMQ everywhere and you do not need HAProxy in the middle to get high availability, you do it directly with the right ZMQ devices depending on your requirements. HAProxy is another piece of infrastructure to maintain where you can get HA with the majordomo pattern using several brokers and retrying the requests etc. Check the ZMQ Guide[2], you have nearly everything nicely explained there. So this comment just ring a "warning" for me, the system looks really interesting, but are the ZMQ primitives well enough understood?
[1]: http://notes.ceondo.com/mongrel2-zmq-paas/ [2]: http://zguide.zeromq.org/page:all
Update: Missing some parts of the comment, stupid me.
Every technology is applied in a given context and your context — cloud with a finite number of ports you need not to waste — makes everything clear.
Note that I was contacted a week ago to comment on this project and my comment was basically interesting and looks good but this HAProxy thing does not ring ok. So really, add the context in your readme, you will clear a lot of confusion for people used to ZMQ.
I also believe that it is not possible to build some sort of connected stream between a DEALER and a ROUTER socket if the DEALER round-robing behind your back. ZMQ 3.0 was giving the tool to use a DEALER in a more router fashioned way, sadly, it got removed in 3.1...
Would you be able to post a short write up about how to achieve that within the ZeroMQ framework?
Your comment might have been true 18 months ago - when we first started using zerorpc in production at dotCloud. Since then, we have deployed and scaled hundreds of thousands of applications and I shudder just to imagine how many billions of zeromq messages we have emitted and processed. Believe me we have been through the zeromq guide many times and have experimented with - and abused - many patterns (including majordomo which, as you fail to mention, is not supported out of the box by zeromq and requires a fair amount of custom code of its own).
I'm sure zerorpc has many flaws and I know the team looks forward to many constructive debates and - hopefully - patches. But lack of understanding of the zeromq fundamentals, or lack of real-world usage, are 2 things you definitely don't need to worry about :)
I'm really looking forward to using this next time.
Also, this looks to be a fix in recv(), I am having issues in send() hanging randomly blocking the entire process. I ended up using a with timeout block around it so if send blocked it would eventually get back to me...
sent = "WAITING"
with gevent.Timeout(0.5, False):
sent = self.socket.send_multipart(tosend)
if sent is "WAITING":
print "__incoming_consumer: Timeout fired"
# We are going to try again
with gevent.Timeout(2, False):
sent = self.socket.send_multipart(tosend)
if sent is "WAITING":
print "__incoming_consumer: Timeout 2 fired"
continue
gevent.hub.sleep(0) # Yield to other gevent's, we can be fast and never let up ...
This fixed it for a little while, but even then every so often it would hang, and it was causing us to have to restart our frontend processes (accepts incoming connections for processing) so we decided it was worth the time and effort to re-write it in C++ with libev as our event handling mechanism. So far we have put it under more load but have not had any lockups or failures.Starts an Erlang node and calls erlang:time/0.
erl_call -s -a 'erlang time' -n madonna
{18,27,34}
[1] http://www.erlang.org/doc/man/erl_call.htmlSo after copying, say supervision trees, RPC mechanisms, distributed system management, actor-based approach, one can ask "wait, am I not just using Erlang then".
Because this other technology/platform may lack something that the current platform has. Or you have constraints that lead you to usage of the first platform.
Maybe this other platform could take a hint or two about stuff on the "copying" platform too, so that things go full circle and it does not stay up some ivory tower.
(1) The original: https://github.com/geoffwatts/zmqrpc (2) A rewrite I am working on: https://github.com/alexmic/zmqrpc
Thrift is great but it's not uncommon in some of our simpler services for Thrift to be the CPU bottleneck. Especially when we're using Cassandra as the data store. You've got our front-end code talking to a service using Thrift, and then the service talking to Cassandra using Thrift, and each thrift call has a serialize/deserialize process on each end.
Nice work dotcloud. Thanks for the free stuff!
https://github.com/progrium/nullmq is another which is more full featured but I haven't had a chance to look at it yet.