~/talk

Artisanal Async Adventures

Talkat PyCon APAC 2018 · 2018-05-31..06-02· [python]
links:none on file
slides:none on file

Builds a small async network stack that actually runs: 100 lines of Python using Python 3.6 type hints, standard library sockets and select-based event loop. Implements coroutine-based tasks, an awaitable object for read/send intents, two wait rooms for read/write, and a run loop that moves tasks between queues. Demo with netcat shows multiple concurrent TCP clients work. Notes: works for IO-bound loads, not a CPU-bound solution, and uses no external frameworks.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:03Building a minimal server
  3. 7:26Concurrency problem discovered
  4. 8:07Introducing async/await
  5. 10:56Understanding await protocol
  6. 12:03Implementing async I/O
  7. 16:23Task scheduling system
  8. 20:02Event loop with select
  9. 22:13Testing the implementation
  10. 27:09How async I/O works
  11. 27:30Homework and further exploration
  12. 29:08Q&A: CPU-bound vs I/O-bound
  13. 30:10Q&A: Scalability and exceptions
  14. 30:56Q&A: Single-threaded nature
  15. 31:52Q&A: Relation to async libraries
  16. 32:18Q&A: Python 2 and callbacks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.