2011/7/18 Chase Lee <umcha...@gmail.com>:
I'm sure some of you saw http://brubeck.io recently mentioned on Hacker News. Anyone have any opinions or thoughts to share? It seems to be an attempt to make something like Tornado and to make it easier as "callback spaghetti" is mentioned (personally, I don't find callbacks that hard to manage). I wouldn't think it's more performant than Tornado, but has anyone heard or seen otherwise? Looking forward to hearing what you guys have to say.- Chase
Yeah, the approach has a lot of advantages, particularly in testing,
because your code is identical to single threaded code, and actually
can generally be run without eventlet in a single thread. It has some
disadvantages (monkeypatching isn't perfect, it's "magic", etc), and
these usually don't matter, until you're in production :-).
For some strange reason I always felt more comfortable using
eventlet/etc for clients, rather than servers (which is partly what
led me to use Tornado in the first place). Plus, its Python style is
very familiar to me for some reason :-).
Hello,I am the author of Brubeck and am happy to see it discussed on the Tornado mailing list.
I initially started work on Brubeck, at least partially, to address what I perceive to be bad handling of blocking code in Tornado. I faced this for 9 months at my previous job and, though it's commendable of bit.ly to have done this, I didn't want to write an async driver for every database I intended to use. Tornado provides no facilities (last I checked) for managing blocking resources where eventlet will convert existing blocking drivers into nonblocking ones automatically.
I am new to this list but am using Tornado for roughly 6 months now. I
also started using ZeroMQ around that time. If it is of any interest to
some: I have written a Mongrel2 Handler for Tornado [1]. This
(hopefully) allows you to run Tornado Apps directly behind Mongrel2 by
simply using the "Mongrel2Handler" instead of the "HttpServer". So far I
have only tested it in toy projects, but I am planning to test one of my
real life projects on it.
> Just getting Mongrel2 compiled installed and configured would be
> bothersome and to make matters worse, no load balancing.
Compiling and installing Mongrel2 is about as easy as compiling nginx.
The load balancing is automatically handled by ZeroMQ, so you do not
have to worry about that. Just connect many Tornado Processes to your
Mongrel2 instance(s), and ZeroMQ will do the rest!
Best
Daniel
[1]: http://truemped.github.com/tornadotools/mongrel2.html
Code:
https://github.com/truemped/tornadotools/tree/master/tornadotools
/mongrel2