pycon logo

PyCon 2011 Atlanta

March 9th–17th

Log in or Sign Up

Dealing with Concurrency in Large-Scale Systems

log in to bookmark this presentaton

Experienced / Talk
The OpenStack project is an open source, standards-based, cloud computing platform that is, of course, written in Python. Creating such a distributed, scalable solution involved solving many problems that dealt with concurrency of both external requests and internal processing. In this talk we'll discuss several of these issues and the solutions we implemented for them.

Abstract

Creating both the Compute and Object Storage parts of the OpenStack Cloud involved solving many issues that dealt with concurrency, which can be problematic in Python due to the GIL. We considered several approaches to these problems, and eventually came up with solutions that worked best in each case.

Some issues, such as handling thousands of simultaneous API connections, were originally handled with Twisted, but we changed that code to use Eventlet instead, as it simplified a good deal of the code while providing the same ability to avoid blocking I/O. Internally, a lot of the problems with concurrency were solved by coding in a message-based asynchronous style instead of using synchronous calls.

The talk will include several examples of the different types of problems that were encountered, and the solutions we came up with for each, and an explanation as to why one approach was chosen over another. It will be informative for developers new to asynchronous programming as well as those who have experience with these issues.