We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Async Django: The practical guide you've been **awaiting** for with Carlton Gibson - DCUS 2022
Learn the practical guide to Async Django from Carlton Gibson, covering async I/O, coroutines, event loops, and more, with a focus on real-world applications and best practices at DCUS 2022.
- Async is a new concept in Django and can be overwhelming
- Async I/O is used to handle long-running tasks and concurrent requests
-
async
andawait
syntax is used to mark async functions - Coroutines are run concurrently using event loops
- Aspini is an event-based framework, whereas Django is not
- Using Async can make the application more complex, like 100% more complex
- Async is not always necessary; simple tasks can be handled synchronously
- There are different options for handling Async, including RX Python, Trio, and Highway.js
- Channels package provides an easy-to-use interface for async operations
- Server-sent events and long polling can be used for real-time updates
- WebSocket connections can be used for bi-directional communication
- Java or .NET integration can also be used for async operations
- Python threads and processes can be used for async operations, but require careful management
- Async operations can be used for general app programming, four ways
- Web development is more event-driven and async
- Async decoding adds complexity and makes debugging harder
- Interactive apps have synchronous and async contexts
- Async context support is built-in Django, but requires explicit configuration
- Running event loops is a must for async operations