The Weekend Read - Issue #2
Another weekend, another weekend read, this time all about the concept of Event Loops
The Script
Build Your Own Event Loop From Scratch In Python by Lezwon Castelino
An Event Loop, also referred to as an Event Dispatcher or a Task Scheduler, is a software design pattern to implement concurrency without the use of threads.
Highlight Elegantly illustrates the difference between concurrent and parallel execution
Build Your Own Event Loop from Scratch in Python — python.plainenglish.io
This post examines the purpose of an Event Loop and how it is implemented within Python
The Movie
The blog post by Lezwon is a self-described attempt to summarize the PyCon 2019 workshop Build Your Own Async by David Beazley.
With 2h+ runtime the video of the workshop is quite long but entirely worth your time: Incrementally, David breaks down the core mechanics of event loops and focuses on the core problems of single-threaded concurrency.
Highlight Elegantly illustrates the relationship between Event Loops and Coroutines and Awaitables.
Build Your Own Async — www.youtube.com
Screencast based on a workshop presented at PyCon 2019.
Notes
When we think of Event Loops, we think of "localized loops" found for example in Javascript or Python. However, Event Loops are not limited to a single subsystem, "distributed loops" may drive entire systems.
Head over to temporal.io and learn how the Temporal Event Loop ensures the reliable and scalable execution of your application.
Temporal.io: Build Invincible Apps — temporal.io Temporal is the open source runtime for running mission critical code atop unreliable, distributed services at any scale.