Artisanal Async Adventures

By Jonas Obrist

Elevator Pitch

Asynchronous networking may seem hard to understand at first, in this talk I will show this is not the case. In 100 lines of code, I will write a low level async network stack in front of your eyes, explaining how things work as we go. By the end, you should understand how and why async code works!

Description

If you want to write an efficient server, asynchronous networking is an excellent strategy to do so. To build a production ready system, you would use asyncio, tornado, twisted, trio or another popular implementation. However, to fully understand how and why it works, I will ignore these solutions and instead craft an artisanal asynchronous implementation in front of your very eyes. Step by step we will turn a blocking socket server, only capable of handling a single connection at a time, into a beautiful non blocking server that has no trouble dealing with many connections at once. By the end, you should see that asynchronous code is not magical at all, but nevertheless incredibly useful.

Notes

I will live code in this talk, so I will need some sort of hands-free microphone. A microphone stand is perfectly fine.

I am aware that generally live-coding during a talk is considered a terrible idea, however I am confident in my ability to give this talk and have done so twice already. I also have backup solutions should there be a problem with my code.