On Fri, Jun 8, 2018 at 11:31 PM Josh Smeaton <josh.smea...@gmail.com> wrote:
> > The only real concern I have at the moment is around your comments > regarding on demand foreign key traversal. If existing code running > synchronously is going to be impacted, that's going to be very difficult > for a lot of people. If it's only asynchronous traversal that'll have > issues, then I have no real concern, as on demand foreign key fetching is > usually a bug anyway. > It would only be for asynchronous contexts - it would still work exactly as today for synchronous ones. Backwards compatability is VERY important to me during this whole thing. > > Having a brief read through the psycopg asynchronous docs[0], it looks > like a number of features will be impossible or troublesome to use, like > transactions, executemany, and named cursors (.iterator() with server side > cursors). We'd also need to investigate how pgbouncer would work in async > mode, as most large sites using postgres are also using pgbouncer. I would > expect support can only further improve, especially if there is a driver > like django pushing. Fallback would just be to run inside a thread pool > though, so it's not a blocker for the rest of the proposal. > > Yes, there's a lot of specifics that need to be worked out for each driver (e.g. does it even make sense with SQLite at all?), but I think providing that space and framework to experiment in is going to be very beneficial. The aiomysql package implemented everything in pure Python, as well - it's possible that similar would be needed for full async PostgreSQL support, where the non-compiled speed reduction might be outweighed by the parallelism improvements. Andrew -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFwN1upvo5suu_7FQXi6cWDau1xK04NdQG2m-sbuX%3D26k1Xoew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.