On Apr 3, 6:13 pm, looking for <lookingforsmart...@gmail.com> wrote: > Hi > > We are thinking about building a webservice server and considering > python event-driven servers i.e. Gevent/Tornado/ Twisted or some > combination thereof etc. > > We are having doubts about the db io part. Even with connection > pooling and cache, there is a strong chance that server will block on > db. Blocking for even few ms is bad. > > can someone suggest some solutions or is async-io is not at the prime- > time yet. > > Thanks
Twisted provides support for any DB-API module via twisted.enteprise.adbapi, which wraps the module in an asynchronous API (implemented using a thread pool). Since the calls all happen in separate threads, it doesn't matter that they block. If you're not talking about a SQL database or a DB-API module, maybe be more specific about the kind of database I/O you have in mind. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list