Book Review: Foundations of Python Network Programming

I received a review copy of Brandon Rhodes’ Foundations of Python
Network Programming
from Apress a few weeks ago, but had to wait to
read it until my own book was complete. I finished reading it this
weekend, and it was worth the wait.

Quick Review

Inspired by Gene Ambaum and Bill Barnes’ review short-cuts, this is
my review for the impatient reader.

Why I picked it up: I know Brandon through PyATL and was
confident that his years of experience would ensure that he put out a
high quality book. He more than met my expectations.

Why I finished it: The conversational tone made it easy to zip
through the sections covering material I was familiar with, saving
more time to study the rest more completely.

I’d give it to: Any Python programmer who wants a better
understanding of the fundamentals of network programming. Even an
experienced Python programmer will learn a few new tricks from the
sections covering more modern tools like ZeroMQ and paramiko.

Review

This is the second edition of Foundations of Python Network
Programming
. The first edition by John Goerzen was released in 2004,
and while a lot has changed in the way we use computer networks since
then the fundamentals remain constant. Brandon Rhodes has improved the
second edition by cleaning up the old examples that are still
relevant, updating or replacing the ones that became obsolete, and
adding new material. The results benefit from Brandon’s high level of
expertise and depth of knowledge in networking.

The book covers a broad range of topics, and is organized so that each
section builds on the knowledge of the previous chapters. The
discussions move from from raw TCP and UDP to encryption with TSL, and
then on to application protocols like HTTP, SMTP, POP, IMAP, and ssh.
Each section explains not just how to do a task, but why doing it
that way works.

The examples in the book are clear and illustrate the concepts
described in the text. There are a few places where the exposition
would benefit from a diagram or two (especially in the description of
TCP message windows), but the explanation given does stand on its own.

Every chapter of Foundations of Python Network Programming is filled
with practical advice. After establishing the fundamentals of
networking in the first few chapters, the book goes on to cover
architectural issues that come up when creating client server
applications. The different uses for RPC and message queue
architectures are covered, as well binary versus text wire protocols.
The latter chapters, which cover higher level protocols, discuss
best-of-breed libraries, removing much of the guesswork for Python
programmers choosing tools for new projects.

Recommendation

I recommend Foundations of Python Network Programming for
programmers who want to move beyond the usual web framework-based
development paradigm to learn more about what is going on behind the
scenes. It is concise, but written in a conversational style that
makes it easy to read. After reading the book, you will have a good
grounding in the fundamentals of networking and be introduced to many
more complex subjects. Brandon includes a number of references to
other sources of more information, as well, for readers who want to go
beyond the fundamentals covered here.