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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access