Completed
THE EVENT LOOP
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Lessons Learned with Asyncio - Look Ma, I Wrote a Distributed Hash Table
Automatically move to the next video in the Classroom when playback concludes
- 1 Intro
- 2 WHAT DOES ASYNCIO DO..?
- 3 WHAT IS A DISTRIBUTED HASH TABLE?
- 4 A DISTRIBUTED HASH TABLE (DHT) IS A PEER-TO-PEER KEY / VALUE DATA STORE
- 5 THE EVENT LOOP
- 6 Programmers define callbacks to be run when the result of a network call is known.
- 7 CONFUSED..? DON'T BE, ITS EXACTLY HOW HUMANS THINK ABOUT CONCURRENCY.
- 8 asyncio avoids potentially confusing and complicated "threaded" concurrency while retaining the benefits of strictly sequential code.
- 9 How do such tasks pause while waiting for non-blocking network based I/O?
- 10 COROUTINES (Are FUN!)
- 11 BUT WHAT ABOUT CALLBACKS? How do I handle the result of a coroutine?
- 12 4 FUTURES AND TASKS (Are also FUN!)
- 13 A DHT EXAMPLE HASHING, DISTANCE AND LOOKUPS
- 14 GET() & SET() REQUIRE A LOOKUP. All interactions are asynchronous. Lookups are also parallel (concurrent).
- 15 WHAT ABOUT NETWORKING?
- 16 6 & #7 STREAMS, TRANSPORTS AND PROTOCOLS (Are also a lot of FUNI)
- 17 FINAL THOUGHTS... • 100% unit test coverage