Vaidik Kapoor

Vaidik Kapoor

Audience level:
Intermediate
Thursday
3:30 p.m.–4:15 p.m.

Understanding Non-blocking IO

Description

Have you ever wondered how the whole Non-Blocking IO thing works? As a web developer, you may have heard of Non-Blocking network libraries and web servers, you may even know what they actually do or probably you have even used them, but do you really know what is going on behind the scene? In this talk, we are going to see how Non-Blocking IO is implemented and understand the concept better.

Abstract

As an engineer working on any web stack, you may have heard about Blocking and Non-Blocking IO. You may as well have used any framework or library that supports Non-Blocking IO. After all, they are very useful as you don't want to block execution of other tasks while one task is waiting to complete a network call to another service (like HTTP call to an API or may be a TCP call to your database). This also helps us handle a lot more connections than we possibly could with blocking IO. Python supports Non-Blocking IO, but we always use some existing 3rd party library that hides all the gory details and makes it all look like black magic to the uninitiated. But there is nothing like black magic.

This presentation will be an introductory talk focused at explaining how Non-Blocking IO works, which is the basis of libraries like Gevent, Tornado and Twisted. We will learn about how Non-Blocking IO can be implemented using the most basic modules that form the base for the above mentioned libraries. Hopefully after this talk, Non-Blocking IO will not be an unsolved mystery for you anymore. The topics that we will try to touch upon are:

  • What is Non-blocking IO? Why do we need it?
  • Difference between Asynchronous and Non-Blocking
  • Understanding the Select system call
  • Implementing Non-Blocking IO using select module
  • Introduction to event loops, for Non-Blocking IO
  • select vs poll vs epoll vs kqueue
  • Libraries for Non-Blocking IO in Python and what they offer:

Platinum Sponsors:


Silver Sponsors:


Partners: