Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32092 closed New feature (wontfix)

Add an async db backend: asyncpg

Reported by: Andrew Chen Wang Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: database
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Andrew Chen Wang)

This ticket wishes to add an asynchronous DB backend, namely using asyncpg.

I don't have much experience with the ORM itself, but I'd like to get the work started. One of the reasons this hasn't been started grandly is mentioned in DEP 9:

A lot of this stems from the fact that the underlying database drivers are synchronous

One thing that must take place before this ticket starts any code is the design decision. Don't know how to cc people, but I'd like to know what the design decision would be? Unlike cache.get_asyncwith that _async suffix, I feel like BaseDatabaseWrapper should just be duplicated into an AsyncBaseDatabaseWrapper? It wouldn't be DRY, so I'd love to know some thoughts!

Change History (3)

comment:1 by Andrew Chen Wang, 3 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 3 years ago

Resolution: wontfix
Status: newclosed

Andrew is already working on the async ORM and as far as I'm aware an async backend is not the part of it. It can be the last step that is not even mentioned in the accepted DEP 9. Please check async topics and start a discussion on DevelopersMailingList before you will create more async-related tickets.

comment:3 by Carlton Gibson, 3 years ago

Hey Andrew.

As Mariusz says, the Forum is probably the best place to begin discussing these things. The long answer is Yes to all of these things, but the issue tracker here isn't the place to begin the discussion — we're too far away from a concrete plan so everything is either wontfix or needsinfo, whichever way you cut it.

If you work with Andrew on the forum to work out the path forward, that would be amazing. Then probably via django-developers, and here, maybe wit a DEP depending on size.

I hope that makes sense! Thanks for your input!

Note: See TracTickets for help on using tickets.
Back to Top