Optimize Performance and Scalability with Parallelism and Concurrency

Type:
Tutorial
Audience level:
Intermediate
Category:
Concurrency
March 8th 9 a.m. – 12:20 p.m.

Description

From how the operating system handles your requests through design principles on how to use concurrency and parallelism to optimize your program's performance and scalability. We will cover processes, threads, generators, coroutines, non-blocking IO, and the gevent library.

Abstract

Abstract

How processes, threads, coroutines, and non-blocking IO work from the operating system through code implementation and design principles to optimize Python programs.  The difference between parallelism and concurrency and when to use each.

The premise is that to make an informed decision you need to know what is happening under the hood.  Once you understand the low level functionality, you can make the correct decision in the design phase.

The emphasis is on practical application to solve real world problems.

Outline

  • How the operating system handles traps and interrupts
  • Scheduling
  • Processes
  • Threads
  • The GIL
  • Generators
  • What is a coroutine?
  • What is a Python coroutine?
  • Blocking/Non-blocking I/O.
  • Parallelism versus Concurrency
  • How do these work with CPython, Pypy, and Stackless
  • Greenlets and libevent (gevent)
  • Design principles
  • Example networked application
  • Performance results
  • What are other the other options?