In this chapter, we reused a lot of ideas and concepts that you learned in the previous chapter on performance.
We started with a definition of scalability, and looked at its relation with other aspects like concurrency, latency, and performance. We briefly compared and contrasted concurrency and its close cousin parallelism.
We then went on to discuss various concurrency techniques in Python with detailed examples and performance comparisons. We used a thumbnail generator with random URLs from the Web as an example to illustrate the various techniques of implementing concurrency using multi-threading in Python. You also learned and saw an example of the producer/consumer pattern, and using a couple of examples, learned how to implement resource constraints and limits using synchronization primitives.
Next we discussed how to scale applications using multi-processing and saw a couple of examples using the multiprocessing
module – such as a primality checker which showed us the effects...