This book is different from the two last books I read. Indeed, it tackles a specific Python library, Twisted, and how to use it.
Content and opinions
Twisted is a network library aiming at simplifying the developement of network applications. It is based on an event loop for all processing (unfortunately, no word in the book about managing several event loops, as it is the case with GUI-based applications).
After an introduction of what is event programming with simple clients and servers, the reader will be introduced to basic web clients and servers. Twisted proposes a lot of bridges to create webservices with XMLRPC or SOAP. The explanations and the code is pretty clear, and it is easy to do one’s own small distributed application with these blocks.
When authentification is introduced, it is hard to understand at first. Zope interfaces are used, but I didn’t find the explanation of what they are and what the function implements() is and does. One can find out with the context, but a complete introduction of these techniques should be done at this point. Once authentification is understood, other services are exposed, like mail clients and servers (how to send a mail, process the information in the mail to send an answer), as well as NNTP.
SSH is only introduced towards the end of the book. And it is not simply explained as it is mixed with shells. Finally, network applications often are services or dameons, how to create them is done in the last chapter.
This book is good, a lot of explanations and of code (some mistakes can be found here and there) helps understanding the use of the library. Some parts of the book are outdated, so I hope that a new edition will be published soon, and some software tools should be more explained. Every aspect of Twisted is not developed in the book, it’s only Networking Programming Essentials, but once the basics are known, the rest can be learnt with the documentation.
1 thought on “
Book review: Twisted: Network Programming Essentials”