[Twisted-Python] New PB API example?
![](https://secure.gravatar.com/avatar/2991a5e8b5fddee8a692eb0c9b4ad56c.jpg?s=120&d=mm&r=g)
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.
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Fri, 29 Aug 2003 11:27:44 -0600 "Boersma, Matt" <Matt.Boersma@arraybiopharma.com> wrote:
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.
Look at twisted.test.test_pb, the last few classes. You don't use an Authorizer at all. -- Itamar Shtull-Trauring http://itamarst.org/ Available for Python & Twisted consulting
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Fri, 29 Aug 2003 11:27:44 -0600 "Boersma, Matt" <Matt.Boersma@arraybiopharma.com> wrote:
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.
Look at twisted.test.test_pb, the last few classes. You don't use an Authorizer at all. -- Itamar Shtull-Trauring http://itamarst.org/ Available for Python & Twisted consulting
participants (2)
-
Boersma, Matt
-
Itamar Shtull-Trauring