Re: In re: improving async support in psycopg

Manlio Perillo <[email protected]> Wed, 31 Mar 2010 16:17:21 +0200
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Alexander Sabourenkov ha scritto:
>> I think this is not how async support should be implemented.
>> It is too invasive.
> 
> I wouldn't call this an async support implementation, it's more like how
> I put together psycopg and io-event-scheduled coroutines. It does,
> however, have some things common with async support.
> 
>> Instead psycopg should just provide a *minimal* API (like libpq) to
>> allow external applications to take advantage of an asynchronous
>> environment.
>>
>> If you want a connection that it is always async, you can
>> write a Python wrapper on the top of psycopg.
> 
> Why is it that people tend to not notice the overhead that such wrappers
> bring? 

Because they are also more flexible.

With your current branch of psycopg, can I execute a query in a WSGI
application embedded in Nginx, that has its own event io-event system?

My "complain" arise from the fact that all coroutine frameworks I have
seen will not work with an "implicit" event system.


> [...]


Thanks  Manlio