Hacker News new | past | comments | ask | show | jobs | submit login
Gevent 0.13.0 released - coroutine network library for Python (gevent.org)
14 points by denik on July 14, 2010 | hide | past | favorite | 8 comments



I'm a happy customer. I use gevent for a small program that resolves every short link in the Twitter firehose. The code makes ~100-200 HTTP requests per second, waits on a few thousand outstanding connections, and streams out the results.


I pity anyone who has to debug problems caused by monkeypatching the socket module... I wish people would stop trying to solve problems with monkeypatching in python. There are better solutions. Cool idea other than that, though.

Does anyone know of any large-scale projects using this library? It would be interesting to see how it performs in the real world - not needing to use OS threads means that maybe you won't have as much trouble with the GIL, but on the other hand, operations like socket.read() are supposed to release the GIL while they block anyway.


Well, you can either monkey patch the socket module OR do the callback hell + completely alienate you from the Python ecosystem.

I'm not saying these are perfect solutions. But gevent with greenlet addresses the problem at the right level. Making developers care about asynchronous I/O only when they need it. Not the other way around as with many other async/event based frameworks.

We're actually using it for our real-time web framework Planet (http://www.esn.me) and our cloud-hosted WebSocket service, Beacon (http://beaconpush.com). So far, so good!


Monkey patching is not mandatory. 3rd party modules can be "ported" to gevent manually as well. It's a matter of preference probably. Would like to know what better solutions you have in mind.

not sure if counts as large-scale but omegle.com uses gevent. 9257 users online currently.


Also note a similar library named Eventlet: http://eventlet.net/


The gevent author wrote up an article regarding what led him to writing it after working on eventlet for a while: http://blog.gevent.org/2010/02/27/why-gevent/


Gevent seems to be the fastest Python async server after Tornado: http://nichol.as/asynchronous-servers-in-python

I'd be interested in seeing node.js benchmarked against these.


I find it highly suspicious that the linked writeup doesn't include pyevent (barebones libevent wrapper).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: