Do you think a DB based on Coroutine and AsyncIO is a good idea? I have written a demo on GitHub.

Ian Kelly ian.g.kelly at gmail.com
Wed May 25 14:14:39 EDT 2016


On Wed, May 25, 2016 at 10:52 AM,  <jimzuolin at gmail.com> wrote:
> Link: https://github.com/JimChengLin/AsyncDB
>
> I always wonder why people do not make an async DB, when they are crazy with async web framework. Hard disks are faster than the Internet, but still pretty slow compared to CPU/RAM.

In-process dbm-style databases aren't really all that popular though,
are they? At least, I never hear much about them. It seems to me that
most people use out-of-process SQL or NoSQL databases. For those, the
details of the database implementation aren't very important to the
user, and all that is really needed is an async client library, such
as aiopg.

I wonder if there's a need for a version 3 of the Python DBAPI spec
including async operations?

> My implementation is not pure async though. The insert and del actions are half async due to there is not async __setitem__. I prefer a neat API over performance.

Would it be going too far if we had async versions of all the special
methods: __ainit__, __asetitem__, __aiadd__, etc.?



More information about the Python-list mailing list