[Twisted-Python] Large Transfers

Andrew Bennetts andrew-twisted at puzzling.org
Sat May 10 11:52:18 EDT 2003


On Sat, May 10, 2003 at 08:33:19AM -0700, Uwe C. Schroeder wrote:
> On Saturday 10 May 2003 08:15 am, Moshe Zadka wrote:
> > On Sat, 10 May 2003, "Uwe C. Schroeder" <uwe at oss4u.com> wrote:
> >
> > > Is this really a good thing to do ? Shouldn't pb see that the arguments
> > > are larger than 640k and start paging ?
> >
> > That's *way* to DWIMy, IMHO.
> 
> but it would be more convenient and transparent for the programmer not to have 
> take care of paging :-)

PB isn't about transparency.  Remote method calls are fundamentally
different to local method calls -- they can be arbitrarily slow, they can
even fail due to network outages, and both ends generally need to have a
healthy distrust of the other, to protect against hostile servers and/or
clients.  Attempting to transparently treat remote calls like local calls is
a bad idea.

PB is *translucent*.  It doesn't pretend that remote method calls are the
same as local ones, because pretending they are will cause you grief.
That's why remote calls return Deferreds, rather than blocking.  That's why
you have to do remoteObject.callRemote('method'), rather than just
remoteObject.method() -- originally you could do it the latter way, and it
changed because a remote method calls should be explicit.

Automatically paging huge objects would contradict PB's design philosophy.

640k-should-be-enough-for-anyone-ly yrs, Andrew.





More information about the Twisted-Python mailing list