3 ms·
It does. I execute many db and filesystem queries in parallel with single threaded Python using gevent. I'm not quite sure whether dropbox didn't or couldn't g
by vbit 12y ago
It does. I execute many db and filesystem queries in parallel with single threaded Python using gevent.
I'm not quite sure whether dropbox didn't or couldn't get gevent or a similar system to work - it's fairly straightforward.
- rudolf0 12y agoI'm a huge fan of Python and gevent, and not the biggest fan of Go, but there's something to be said about built-in concurrency constructs like goroutines compared to something quite hacky like gevent (gevent.monkey.patch_all() everywhere). gevent is my favorite async networking library for Python, and I use it in almost all of my projects, but one can't deny it's basically one giant hack over CPython.
- vbit 12y agoI agree that gevent is a hack. however goroutines correspond to greenlets rather than gevent. You could write clean asynchronous io libraries in python using just greenlets and then it's not a hack. I wonder if dropbox evaluated this option or just rejected python outright.
- rudolf0 12y agoTrue, but the API for pure Greenlets is a bit ugly. In Go, the API for goroutines and channels is superb, concise, and clear. For me, the negative traits of Go outweigh the positive, but I really wish other languages would adapt some of its concurrency constructs as native language features.