Lessons Learned with Asyncio - Look Ma, I Wrote a Distributed Hash Table

Lessons Learned with Asyncio - Look Ma, I Wrote a Distributed Hash Table

EuroPython Conference via YouTube Direct link

THE EVENT LOOP

5 of 17

5 of 17

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

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.