[Twisted-Python] New PB API example?

Boersma, Matt Matt.Boersma at arraybiopharma.com
Fri Aug 29 11:27:44 MDT 2003


Howdy twisters,

I'm writing a Perspective Broker client-server app.  Things have been working fine, but as of recent Twisted builds (1.07 alpha 5?), my server code warns me that code like this:
    app = Application('myserver')
    app.listenTCP(8789, BrokerFactory(MyServer()))
    app.run()
is deprecated.  Specifically, that I should replace BrokerFactory with PBServerFactory.

So I have plunged into catching up with this new API.  And I'm heavily confused.  All the existing HOWTOs and pbxxxx.py examples still use (deprecated) code as above.  And even after searching the mailing list and re-reading the PB tutorials, I'm not getting it.

I'd like my client to use PBClientFactory.login, and for the server to authorize the client by logging in to an Oracle database and running a test query.  (Credentials in this case map directly to Oracle username/passwords--don't flame me, I inherited this system.)  Then the client receives a remotely callable Perspective specific to his or her role in this system.

I'm specifically unclear as to how to use my Authorizer subclass, and if I need to create a Portal subclass and plug it in to PBServerFactory.

If anyone has even a trivial example of how to use the new PB cred APIs, I'd be very grateful if you could share it with me.

This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.





More information about the Twisted-Python mailing list