[Twisted-Python] Re: Disabling PB (de)serialization
nico at tekNico.net
Thu Sep 1 10:08:11 EDT 2005
> I'd like to make a PB proxy "transparent". It should be able to get
> serialized data via PB without deserializing it, and forward it via PB to
> another proxy, without having to serialize it again. The second proxy will
> receive the data, and serialize it before sending it to the final destination.
That's not quite right, let me try again.
Let's say we have two machines, called 1 and 2. A Twisted process on
machine 1 (TP1) wants to send something via PB to a Twisted process on
machine 2 (TP2). However, we won't let them talk directly, but will make
them go through two proxies, PX1 on machine 1, and PX2 on machine 2.
Then the calling chain is made of three PB calls:
TP1 --PB--> PX1 --PB--> PX2 --PB--> TP2
Each PB call implies one serialization and one deserialization of data:
TP1 -ser-|-deser-> PX1 -ser-||-deser-> PX2 -ser-|-deser-> TP2
Only the first serialization, and last deserialization, are really
necessary. The chain should become like this:
TP1 -ser-|--> PX1 --||--> PX2 --|-deser-> TP2
TP1 serializes, and TP2 deserializes. PX should deal with the serialized
data without changing them in any way.
What's the best way to go for this?
Nicola Larosa - nico at tekNico.net
Lately there's an abundance of improvised censors, and suppliers of
free good advice. What's that, you're out of bad example? Ask again
your usual wholesaler, surely scarcity is just momentary.
-- N. Larosa, Luglio 2005
More information about the Twisted-Python