Blurb from back cover:Twisted is an open source network-application framework written in the Python programming language. As elegant as Python, Twisted brings power and flexibility to Python programmers. Because Twisted is asynchronous, your programs won't lock up while waiting for a response from the network. It's also event-driven - just write code for the network events you want to handle and let Twisted do the rest. A dedicated corps of developers work hard to keep Twisted extremely stable and secure.

In Twisted Network Programming Essentials, author and experienced Twisted developer Abe Fettig starts you on a journey to Twisted programming mastery. Begin by downloading and installing the Twisted framework. Next, progress to sending TCP/IP messages between simple clients and servers. And then the fun really begins! Twisted can do far more than send and receive messages using low-level protocols such as TCP/IP. The Twisted networking framework makes working with higher level protocols a breeze.

Introduction
Twisted is fast becoming the framework for network programming in Python. Its asynchronous, event-driven approach to networking is respected as a powerful and flexible component in many modern Python projects from newsgroup and torrent clients to web spiders, browsers and user-agents.

Twisted Network Programming Essentials introduces Twisted from the bottom up, each chapter building on its predecessors to deliver a comprehensive description of the Twisted framework.

Chapter Synopsis & Review Comments
Chapter 1, as is customary for such books, describes the procedure for installing Twisted, configuring your system to work with Twisted, and using the documentation.

Chapter 2 dives straight in at the deep end, building simple clients and servers. This is a refreshing change from the many books which seem to think you need three chapters on the philosophy behind the project, before you get to see how to actually use it!

Chapter 3 discusses web clients, an important arena for Twisted and for Python in general. Examples are given throughout and the commentary is concise yet thorough.

The next logical step is taken in chapter 4, which looks at web servers. The Twisted components provided for working with HTTP requests and responses are illustrated and SQL-based database storage is introduced. The chapter rounds off with a proxy example.

Web Services and RPC are a hot topic, and chapter 5 embraces these and shows how Twisted supports these concepts. XML-RPC is covered in detail; this is the technology behind many so-called AJAX (Asynchronous JavaScript and XML) websites (Google Gmail is a good example of such a site).

Chapter 6 is of interest to the security minded amongst you, covering the authentication services offered under Twisted.

NNTP (a news protocol) is covered in chapter 9, which combines the client and server aspects.

SSH is introduced in chapter 10. SSH is becoming an important protocol as many look for methods of securing their connections to a wide variety of services. Twisted's SSH support provides an easy way to wrap other services in a secure channel.

Chapter 11 covers the necessary evils of services, processes and logging. The background administrative stuff that no one likes doing, but is nonetheless essential to the smooth operation of any service. Emphasis is placed on using Twisted's framework to make these tasks easier and more automated.

Style and Detail
This book is symbolic of everything that is great about Python and about Twisted itself. The feeling you get from reading this is that everything fits together smoothly, that all eventualities have been covered, and that the entire system just works. Indeed, this is often the case when programming in Python using Twisted, and Twisted Network Programming Essentials captures this perfectly.

The examples throughout are usable, complete, and well commented. Many books provide small, contrived examples, with no utility beyond the book itself, but this book presents entire programs that can be used and extended with ease.

The book emphasises the time savings and increased stability and flexibility which may be obtained through using Twisted, as opposed to plain Python sockets, but does not emphasise much the importance of Python itself, here.

Conclusion
With a topic such as Twisted, there is so much to explore that this book does an excellent job of condensing the material down into something readable. My only complaint would be that there is little linking between related sections. For instance, the mail and news sections are presented separately, when many mail clients act as newsreaders also. An example of combining several protocols into one application would have served well in completing this book.

As it stands, for the experienced Python programmer this book is unbeatable. It is not, however, a book for those unfamiliar with Python. It makes no attempt to explain "the Python way", but does well covering its own topic, since many other excellent books exist on Python itself.

This review is copyright 2006 by the author, Andrew J. Bennieston, and Security-Forums Dot Com, and may not be reproduced in any form in any media without the express permission of the author, or Security-Forums Dot Com.