[Twisted-Python] Supporting new types with PB

Jp Calderone exarkun at divmod.com
Tue Aug 17 01:29:48 MDT 2004


David Bolen wrote:
> I've been trying to get Perspective Broker to cooperate for the
> transmission of mx.DateTime values across a remote session (we use
> them for some of our components which are referenceable objects) and
> was hoping to solicit input on the simplest or most appropriate way to
> handle things.
> 

   A major shortcoming of the current version of jelly is the inability 
to register external serialization functions for new types.

   Brian Warner has been working on a new version for some time, and I 
believe he is quite close to completing it (but he has been quite close 
to completing it for some time).  It addresses this problem quite 
completely.

   Until it is ready, though, I don't know of any good solutions.  The 
approach I have taken in my software is to copy the definition of 
twisted.spread.jelly._Jellier.jelly, add support for external 
serialization function registration (via adapters in my case), and then 
replace the original function with a reference to this new function at 
runtime (generally immediately after startup).

   This works reasonably well, but has obvious significant drawbacks.  I 
can't think of much else to suggest, though, except perhaps to get in 
touch with Brian and ask him if there's anything you can do to help 
speed along the completion of the new version.

   Jp




More information about the Twisted-Python mailing list