I have a question for you since you have a lot of experience with async. Eventually node.js will have generators (when V8 implements ECMAScript 6) which should allow node.js to have something like gevent. What kind of effect do you think this will have on the node.js world?
If it has generators it will make it easier. I remember being happy about finding out Twisted has inlineCallbacks. I basically let you not have to split your logical function into multiple functions simply because it has to to do some IO.
Before it used to be code like:
def processShoppingCart(...):
d.addCallback(_cb1)
return d # (d is a Deferred)
def _cb1(...):
d2.addCallback(_cb2)
return d2 # d2 is a another Deferred
etc.
Which with generators and inlineCallbacks turns into
@someDecoratorThatEnableUsingInlineCallbacks
def processShoppingCart(...):
.. do some work ..
yield <some_io_function_like_check_db>
.. do some more work ..
yield <some_io_other_io_function>
....
You get the idea. I am not too familiar with Node.js but I imagine it will help quite a bit.