tags:

views:

136

answers:

2

I've grown to like erlang, and it's a great (cough) architectural fit to my problem. Meanwhile I still like to imagine that I can kludge erlang processes & asynchronous message passing in python (I am currently in therapy to rid myself of this obsession).

During a recent binge I came across 0MQ & I like its messaging features. These may be self-evident to an erlang/OTP expert, but I'm just a humble python programmer (my shrink will no doubt get to read this clever argument). The 0MQ user-guide states that it uses native OS threads, and not virtual "green" threads.

  1. Is there a way to make 0MQ work with say eventlet/gevent?

  2. Or, should I avoid the green-eyed monster and stick to a single Python app thread, with non-blocking I/O handled by 0MQ's message queuing & its own (skilled) use of native threads?

  3. Or, check out of rehab & go back to erlang?

+4  A: 
  1. Probably not

  2. Stick to the 0MQ native code unless you plan to rewrite a big portion of zmq. There's tons of magic in there to make this work

  3. Yes. I avoided zmq when I found out it's more or less a socket library on steroids, that doesn't provide any feedback to you when things go bad (e.g. network failure) and it starts dropping messages on you(by design) - and you basically have to implement a lot of logic on top of it if you need to disover if a remote point fails/is slow.

nos
Can you share some of your experience on 0MQ at http://stackoverflow.com/questions/3394570/do-you-know-any-projects-where-zeromq-was-used-both-success-and-failure-stories ?
gleber
A: 

Zero MQ now works with Eventlet:

https://lists.secondlife.com/pipermail/eventletdev/2010-October/000907.html

Noah F SanTsorbutz