YoVDO

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

Offered By: EuroPython Conference via YouTube

Tags

EuroPython Courses Concurrency Courses Event Loop Courses Futures Courses Coroutines Courses Asyncio Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the fundamentals of asyncio in Python through a practical application of building a distributed hash table in this EuroPython 2015 conference talk. Dive into the event loop, coroutines, futures, and networking concepts with real-world code examples. Gain a solid understanding of asyncio's core components, including its ability to handle non-blocking network-based I/O and maintain sequential code benefits without the complexities of threaded concurrency. Learn how to implement key DHT operations like GET() and SET() using asynchronous and parallel lookups. Discover the intricacies of streams, transports, and protocols in asyncio-based networking. By the end of this introductory session, acquire enough knowledge to confidently explore asyncio further and potentially incorporate it into your own projects.

Syllabus

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


Taught by

EuroPython Conference

Related Courses

Years of Bad Ideas
EuroPython Conference via YouTube
Years of Bad Ideas
EuroPython Conference via YouTube
Solving Google Code Jam Problems with PyPy Part 1
EuroPython Conference via YouTube
Solving Google Code Jam Problems with PyPy Part 2
EuroPython Conference via YouTube
A Brief History of Data Storage
EuroPython Conference via YouTube