t.s.pb : module documentation

Part of twisted.spread View Source

Perspective Broker

"This isn't a professional opinion, but it's probably got enough internet to kill you." --glyph

Future Plans: The connection APIs will be extended with support for URLs, that will be able to extend resource location and discovery conversations and specify different authentication mechanisms besides username/password. This should only add to, and not change, the existing protocol.

Important Changes

New APIs have been added for serving and connecting. On the client side, use PBClientFactory.getPerspective() instead of connect(), and PBClientFactory.getRootObject() instead of getObjectAt(). Server side should switch to updated cred APIs by using PBServerFactory, at which point clients would switch to PBClientFactory.login().

The new cred support means a different method is sent for login, although the protocol is compatible on the binary level. When we switch to pluggable credentials this will introduce another change, although the current change will still be supported.

The Perspective class is now deprecated, and has been replaced with Avatar, which does not rely on the old cred APIs.


This is a broker for proxies for and copies of objects. It provides a translucent interface layer to those proxies.

The protocol is not opaque, because it provides objects which represent the remote proxies and require no context (server references, IDs) to operate on.

It is not transparent because it does not attempt to make remote objects behave identically, or even similiarly, to local objects. Method calls are invoked asynchronously, and specific rules are applied when serializing arguments.
AuthorGlyph Lefkowitz
Class ProtocolError This error is raised when an invalid protocol statement is received.
Class DeadReferenceError This error is raised when a method is called on a dead reference (one whose broker has been disconnected).
Class Error This error can be raised to generate known error conditions.
Class RemoteMethod This is a translucent reference to a remote message.
Function noOperation Do nothing.
Class PBConnectionLost Undocumented
Function printTraceback Print a traceback (string) to the standard log.
Interface IPerspective per*spec*tive, n. : The relationship of aspects of a subject to each other and to a whole: 'a perspective of history'; 'a need to view the problem in the proper perspective'.
Class Avatar A default IPerspective implementor.
Class AsReferenceable AsReferenceable: a reference directed towards another object.
Class RemoteReference This is a translucent reference to a remote object.
Class Local (internal) A reference to a local object.
Class CopyableFailure A flavors.RemoteCopy and flavors.Copyable version of twisted.python.failure.Failure for serialization.
Class CopiedFailure Undocumented
Function failure2Copyable Undocumented
Class Broker I am a broker for objects.
Function respond Respond to a challenge.
Function challenge I return some random data.
Class PBClientFactory Client factory for PB brokers.
Class PBServerFactory Server factory for perspective broker.
Interface IUsernameMD5Password I encapsulate a username and a hashed password.
Class _RemoteCacheDummy Ignore.
Class _PortalRoot Root object, used to login to portal.
Class _JellyableAvatarMixin Helper class for code which deals with avatars which PB must be capable of sending to a peer.
Class _PortalWrapper Root Referenceable object, used to login to portal.
Class _PortalAuthChallenger Called with response to password challenge.
def noOperation(*args, **kw): (source)

Do nothing.

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...
def printTraceback(tb): (source)
Print a traceback (string) to the standard log.
def failure2Copyable(fail, unsafeTracebacks=0): (source)
def respond(challenge, password): (source)

Respond to a challenge.

This is useful for challenge/response authentication.
def challenge(): (source)
I return some random data.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.