asyncio, multiprocessing – missing link

In this blog post you learn first some basic design patterns in python asyncio to have a common knowledge for the further parts of this article. It also shows possible problems which occur during development with asynchronous programming in general.

I also recommend here to read my other post on parallelism.

The second part first gives an introduction to pythons multiprocessing world and then dives into occurring problems when using more than one event loop simultaneous.

The last part examines the underlying multiprocessing architecture of python which is not very compatible with python asynchronous programming implementation and sketches some possible solution on inter process communication between different event loops.

At the end one could write a high performance multi event loop software but still with some unsolved problems.

Disclaimer

You need to have at least basic knowledge about asyncio or asynchronous programming. Including a mental model for coroutines and what await, async keywords do. If you do not have such model in you head, this article may not be worth to read it.
Myself learned asyncio from the python docs and later used this book

Title Photo – r2hox / CC2

Leave a Comment

Your email address will not be published. Required fields are marked *