utilery icon indicating copy to clipboard operation
utilery copied to clipboard

asyncio?

Open yohanboniface opened this issue 9 years ago • 5 comments

It may help to have SQL requests to be run in //.

https://github.com/aio-libs/aiopg

yohanboniface avatar Sep 07 '15 20:09 yohanboniface

http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/

yohanboniface avatar Sep 26 '15 11:09 yohanboniface

aioredis and aiopg work well for this purpose.

songololo avatar Jun 16 '16 21:06 songololo

I have used your package as a base for an asyncio / aiohttp / aiopg implementation over at: https://github.com/shongololo/aiovectortiler

The changes were chaotic and extensive so I've split it to a new project rather than trying to merge back into utilery.

Still pending completion of the new testing to accommodate the asyncio context.

songololo avatar Aug 10 '16 19:08 songololo

Interesting. Have you benchmarked? We've made some tests recently, and our conclusion is that the ratio I/O Bounds / CPU bounds is not balanced enough to cancel the coroutines overhead. I'm currently working on a switch to Falcon + asyncpg (which should worth it anyway because it seems faster than psycopg2 by itself). cc @magopian

yohanboniface avatar Aug 10 '16 19:08 yohanboniface

ah that's interesting. No benchmarks yet.

songololo avatar Aug 10 '16 20:08 songololo