[Twisted-Python] pb.Cacheable doc question

Stephen Waterbury stephen.c.waterbury at nasa.gov
Fri Oct 8 10:59:05 EDT 2010


On 10/08/2010 09:25 AM, exarkun at twistedmatrix.com wrote:
> On 5 Oct, 08:09 pm, stephen.c.waterbury at nasa.gov wrote:
>> First, the "PB Copyable: Passing Complex Types" doc is
>> *great* and the examples are excellent -- my compliments to
>> all who contributed!
>>
>> My question is about the pb.Cacheable section
>> (http://twistedmatrix.com/documents/current/core/howto/pb-
>> copyable.html#auto9)
>> -- specifically the first sentence:  'Sometimes the object you
>> want to send to the remote process is big and slow. "big" means
>> it takes a lot of data (storage, network bandwidth, processing)
>> to represent its state.  "slow" means that state doesn't change
>> very frequently.'
>>
>> I would think that the product of its size and its rate of change
>> is the applicable metric -- i.e.:  the bigger the object is *or*
>> the faster it changes (not the slower), the more applicable
>> Cacheable is, no?
>
> That seems plausible.  I wonder if the rate comment is motivated by
> something else, like the chance of the remote cache being out of date
> when the remote side wants to use some of its data.  This would increase
> with the rate of change, but I don't know if it really matters.  I
> haven't ever actually used a Cacheable myself, as far as I can recall.

Thanks, jp!  Fair enough, but that seems equally applicable to
Copyable -- a copy could as easily be stale as a cache, I'd think.
(Maybe more easily, if it takes longer to update.)

So you've just used Copyable, not Cacheable?
I wonder if anyone has used it ... maybe I'll be the first!  Ooooo.  :)

Cheers,
Steve




More information about the Twisted-Python mailing list