In this chapter, we will analyze a more advanced application of concurrent programming: building a working non-blocking server from scratch. We will cover complex uses of the socket module, such as isolating the user business logic from callbacks and writing the callback logic with inline generators, both instances designed to run concurrently. We will also discuss the use of the await and yield keywords, using an example.
The following topics will be covered in this chapter:
- Using a comprehensive API from the socket module to build a server from scratch
- Basic information on Python generators and asynchronous generators
- How to use inline generators with the await and yield keywords to convert a blocking server to a non-blocking one