Re:Brubeck: A new Python web framework running on mongrel2
by j2labs on Saturday July 16, 2011 @01:27PM
(#2771159)
For some reason my other account is blocked from responding so I created this one.
That is correct about pymongo. Eventlet will convert any drivers that are written entirely in Python into nonblocking driver. Gevent, an alternative to eventlet, can do the same. Brubeck supports both.
In addition to that it also makes ZeroMQ nonblocking. The combination of ZeroMQ support and pymongo, pyredis and pyriak all being available entirely as python (bson is in c tho) is what convinced me I had to write a new framework.
Re:Brubeck: A new Python web framework running on mongrel2
by astrofinch on Sunday July 17, 2011 @03:59AM
(#2772803)
Your account is probably blocking you from responding because of some flamewar prevention feature Paul put in a while ago that makes it difficult for commenters to have nested discussions with one another--the deeper the discussion, the longer you have to wait before making a reply to a user who just replied to you.
Re:Brubeck: A new Python web framework running on mongrel2
by espeed on Sunday July 17, 2011 @06:33AM
(#2773029)
Ahh...did not know that :)
Re:Brubeck: A new Python web framework running on mongrel2
by deepu_256 on Saturday July 16, 2011 @01:32PM
(#2771175)
wonderful.
Can you also shed light on thrift protocol ? i have struggled with the blocking nature of thrift(client).
Does eventlet convert blocking thrift client written in python to non-blocking ?
Re:Brubeck: A new Python web framework running on mongrel2
by inportb on Saturday July 16, 2011 @01:45PM
(#2771203)
You know more about thrift than I do. If the "blocking" code is in python, eventlet should be able to fix it. You can't do anything about the native machine code, though. It appears that the client library includes a c-based codec to improve performance, but it should not be a problem if the transport is based on python sockets.
Re:Brubeck: A new Python web framework running on mongrel2
by inportb on Saturday July 16, 2011 @01:37PM
(#2771185)
I use pymongo with gevent. A small hack is necessary to prevent pymongo from making a new connection for each thread that accesses mongodb (because with gevent, you can have a massive number of threads). I'd imagine the same is true with eventlet.
Re:Brubeck: A new Python web framework running on mongrel2
by robspychala on Sunday July 17, 2011 @11:25PM
(#2774980)
BTW, how is the performance compared to sync pymongo in your use? I'm testing with eventlet and seeing it about 10-20% slower.
Re:Brubeck: A new Python web framework running on mongrel2
by deepu_256 on Saturday July 16, 2011 @10:26PM
(#2772344)
Do you mind sharing the details of that hack ??
can i say use pymongo in Brubeck and you are saying the blocking nature of pymongo won't affect the async nature of Brubeck ??