Summary

In this chapter, we looked at some common architectural patterns of building software. We started with the Model View Controller architecture, and looked at examples in Django and Flask. You learned about the components of an MVC architecture, and learned that Django implements a variant of MVC using templates.

We looked at Flask as an example of a micro framework that implements the minimal footprint of a web application by using a plugin architecture with additional services that can be added on.

We went on to discuss the event-driven programming architecture, which is a kind of asynchronous programming using co-routines and events. We started with a multiuser chat example using the select module in Python. From there, we went on to discuss larger frameworks and libraries.

We discussed the architecture of Twisted and its components. We also discussed Eventlet and its close cousin gevent. For each of these frameworks, we saw an implementation of the multiuser chat server.

Next, we took up microservices as an architecture, which builds scalable services and deployments by splitting the core business logic across multiple services. We designed an example of a restaurant reservation application using microservices, and briefly looked at the landscape of Python web frameworks, which can be used to build microservices.

Toward the end of the chapter, we saw the architecture of using pipes and Filters for serial and scalable data processing. We built a simple example of actual pipes using the multiprocessing module in Python, which mimicked a Unix pipe command. We then looked at the technique of building pipelines using generators, and saw a couple of examples. We summarized techniques for building pipelines and frameworks available in the Python third-party software ecosystem.

This brings us to the end of the chapter on application architectures. In the next chapter, we will look at deployability, namely the aspect of deploying software to environments such as production systems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.191.134