Archives
Part 12: A Poetry Transformation Server
This continues the introduction started here. You can find an index to the entire series here.
One More Server
Alright, we’ve written one Twisted server so let’s write another, and then we’ll get back to learning some more about Deferreds.
In Parts 9 and 10 we introduced the idea of a poetry transformation [...]
Part 11: Your Poetry is Served
This continues the introduction started here. You can find an index to the entire series here.
A Twisted Poetry Server
Now that we’ve learned so much about writing clients with Twisted, let’s turn around and re-implement our poetry server with Twisted too. And thanks to the generality of Twisted’s abstractions, it turns [...]
Part 10: Poetry Transformed
This continues the introduction started here. You can find an index to the entire series here.
Client 5.0
Now we’re going to add some transformation logic to our poetry client, along the lines suggested in Part 9. But first, I have a shameful and humbling confession to make: I don’t know how to write [...]
Part 9: A Second Interlude, Deferred
This continues the introduction started here. You can find an index to the entire series here.
More Consequence of Callbacks
We’re going to pause for a moment to think about callbacks again. Although we now know enough about deferreds to write simple asynchronous programs in the Twisted style, the Deferred class provides [...]
Part 8: Deferred Poetry
This continues the introduction started here. You can find an index to the entire series here.
Client 4.0
Now that we have know something about deferreds, we can rewrite our Twisted poetry client to use them. You can find client 4.0 in twisted-client-4/get-poetry.py.
Our get_poetry function no longer needs callback or errback arguments. Instead, it [...]
Part 7: An Interlude, Deferred
This continues the introduction started here. You can find an index to the entire series here.
Callbacks and Their Consequences
In Part 6 we came face-to-face with this fact: callbacks are a fundamental aspect of asynchronous programming. Rather than just a way of interfacing with the reactor, callbacks will be woven into the [...]
Part 6: And Then We Took It Higher
This continues the introduction started here. You can find an index to the entire series here.
Poetry for Everyone
We’ve made a lot of progress with our poetry client. Our last version (2.0) is using Transports, Protocols, and Protocol Factories, the workhorses of Twisted networking. But there are more improvements [...]
Part 5: Twistier Poetry
This continues the introduction started here. You can find an index to the entire series here.
Abstract Expressionism
In Part 4 we made our first poetry client that uses Twisted. It works pretty well, but there is definitely room for improvement.
First of all, the client includes code for mundane details like creating network sockets [...]
Part 4: Twisted Poetry
This continues the introduction started here. You can find an index to the entire series here.
Our First Twisted Client
Although Twisted is probably more often used to write servers, clients are simpler than servers and we’re starting out as simply as possible. Let’s try out our first poetry client written with Twisted. The [...]
Part 3: Our Eye-beams Begin to Twist
This continues the introduction started here. You can find an index to the entire series here.
Doing Nothing, the Twisted Way
Eventually we are going to re-implement our asynchronous poetry client using Twisted. But first let’s write a few really simple Twisted programs just to get the flavor of things. As [...]