Summary

We looked at how to develop network protocols while considering aspects such as the connection sequence, framing of the data on the wire, and the impact these choices will have on the architecture of the client and server programs.

We worked through different architectures for network servers and clients, demonstrating the differences between the multithreaded and event-driven models by writing a simple echo server and upgrading it to a multi-client chat server. We discussed performance issues around threaded and event-driven architectures. Finally, we looked at the eventlet and asyncio frameworks, which can greatly simplify the process of writing servers when using an event-driven approach.

In the next and final chapter of this book, we ...

Get Learning Python Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.