News for hackers. Stuff that matters.
Re:Ask HN: What is your preferred Python stack for high traf... by samuel1604 on Monday August 22, 2011 @12:02AM (#2911246)
eventlet!
Re:Ask HN: What is your preferred Python stack for high traf... by pjscott on Monday August 22, 2011 @02:41AM (#2911602)
Seriously, it's amazing. It's like gevent, but with better documentation.
Re:Ask HN: What is your preferred Python stack for high traf... by bigethan on Monday August 22, 2011 @02:44AM (#2911611)
I was under the impression that gevent was like a new version of eventlet. Other than the docs (which isn't insignificant), why choose one over the other?
Re:Ask HN: What is your preferred Python stack for high traf... by pjscott on Monday August 22, 2011 @03:00AM (#2911642)
They're pretty similar. The main difference is that Eventlet supports more event loops, has a messier basic architecture, is slightly slower, and lets you defer blocking tasks to threads. Since I'm connecting to MySQL, which happens through blocking C code in libmysql, that's pretty important to me. Eventlet's db_pool module is very nice.

Personally, I'm happy with eventlet and can't see why I would want to go to gevent. Does anybody using gevent want to chime in on what's better about it?

Re:Ask HN: What is your preferred Python stack for high traf... by Continuation on Monday August 22, 2011 @10:20AM (#2912520)
gevent has utilities to turn Python blocking calls into non-blocking ones.

In your case you could switch to a pure Python MySQL driver and gevent will turn all your mySQL calls into async.

Actually there're also gevent non-blocking MySQL drivers that are written in C.