Python concurrency and parallelism concepts like Multiprocessing, Multithreading, Coroutine, Asynchronous
I/O will be explained. We will learn to write simpler code with improved response time and throughput.
Python concurrency concepts (like Multiprocessing, Multithreading, Coroutines, Asynchronous I/O ) will be explained in this tutorial. These are very relevant to production level code. If we can can apply these, then in many cases existing codes can be refactored and possibly we can make them simpler, improve response time and overall throughput (wherever applicable like a network server application). The concurrency models are equally important when implementing new applications.
An outline of the tutorial with approximate breakup of time is given below:
Process Based Parallelism (15 mins.)
* Brief Overview of Process Management in Linux
* Introduction to multiprocessing module
* Parallelizing the execution of a function across multiple input values
* (Data parallelism using pool of worker processes)
* Communication between Processes - Pipes/Queues
* Synchronization between processes
* Sharing data between processes using Shared Memory
Coroutines (10 mins.)
* Overview of Coroutines
* Implementing Coroutine like functionality using "Extended Python Generators" (Python 2.5+)
* Coroutines by leveraging sub generator delegation
* Coroutines with async/await syntax
ProcessPoolExecutor, ThreadPool Executor (10 mins.)
* ThreadPoolExecutor
* ProcessPoolExecutor
* Future Objects
Asynchronous I/O, event loop, coroutines and tasks (25 mins.)
* Event Loop
* Writing single-threaded concurrent code using coroutines
* Multiplexing I/O access
* Using Transport and Protocol classes for implementing Client/Server applications
Solving an assignment (30 mins.)
Algorithms, Parallel Programming
Domain Expertise:some
Python Skill Level:basic
Link to talk slides:https://drive.google.com/drive/folders/1G8zXvtEzKXcG8wCbjC6nrhbzZMNyqCgY
Abstract as a tweet:Write simpler, faster code with Python concurrency and parallelism..