[Twisted-Python] Handling PBConnectionLost errors

Daniel Miller daniel at keystonewood.com
Fri Jul 27 14:57:59 MDT 2007


On Jul 25, 2007, at 11:09 AM, Phil Mayers wrote:
> First question: why is your PB server allocating "request IDs" and
> storing hashes of them. You could just return a pb.Referenceable to  
> the
> client, backed by a normal python object (with a normal object
> lifecycle) on the server.

That's something I hadn't thought of. A referenceable might simplify  
my problem a bit.

> Regarding the retry mechanism: It looks to me like you're treating PB
> like an RPC mechanism, and finding that the nature of networks (they
> fail, unpredictably) is tripping you up. Try thinking of it in a more
> message-oriented way.
>
> I would implement it something like this, using the python2.5 yield  
> and
> inlineCallbacks functionality:
>
> <snip>
>
> Your example is a bit theoretical, so it's difficult to see if this
> would work for you.

I'll have to give that a deeper look later, but thanks a lot for the  
ideas and insight.

~ Daniel





More information about the Twisted-Python mailing list