Skip to content

Latest commit

 

History

History
94 lines (33 loc) · 1.86 KB

backends.rst

File metadata and controls

94 lines (33 loc) · 1.86 KB
LastChangedDate

$LastChangedDate$

LastChangedRevision

$LastChangedRevision$

LastChangedBy

$LastChangedBy$

The Evolution of Finger: pluggable backends

Introduction

This is the fifth part of the Twisted tutorial Twisted from Scratch, or The Evolution of Finger <index> .

In this part we will add new several new backends to our finger service using the component-based architecture developed in The Evolution of Finger: moving to a component based architecture <components> . This will show just how convenient it is to implement new back-ends when we move to a component based architecture. Note that here we also use an interface we previously wrote, FingerSetterFactory , by supporting one single method. We manage to preserve the service's ignorance of the network.

Another Back-end

finger19b_changes.py <listings/finger/finger19b_changes.py>

listings/finger/finger19b_changes.py

Full source code here:

finger19b.tac <listings/finger/finger19b.tac>

listings/finger/finger19b.tac

We've already written this, but now we get more for less work: the network code is completely separate from the back-end.

Yet Another Back-end: Doing the Standard Thing

finger19c_changes.py <listings/finger/finger19c_changes.py>

listings/finger/finger19c_changes.py

Full source code here:

finger19c.tac <listings/finger/finger19c.tac>

listings/finger/finger19c.tac

Not much to say except that now we can be churn out backends like crazy. Feel like doing a back-end for Advogato , for example? Dig out the XML-RPC client support Twisted has, and get to work!