[Zope-dev] XMLRPCMethod product

Amos Latteier amos@aracnet.com
Tue, 26 Oct 1999 14:01:06 -0700


At 04:21 PM 10/26/99 -0400, Andrew M. Kuchling wrote:
>>Well, you could acquire the server URL. This would improve flexibility.
>
>Acquire it from where?  I'm not entirely sure what you're suggesting
>here; a Folderish XMLServer object that contains several XMLMethod
>objects?

No just make the server URL a property of the XMLRPC Method, say
'xmlrpc_server_url' Then you could set this property on containing Folders.
This would allow XMLRPC Methods with unset server urls to acquire them.

>>The Zopish thing to do (not that I can speak to whether this is always
>>right or not) is to wrap access to external resources like the filesystem,
>>and databases. Probably Chris or Jim could comment on the security
>>implications of this better that I can.
>
>Hrm... this is at war with my primitive urge for flexibility.  On the
>other hand, implementing it with a single object would require
>implementing a __getattr__ hook, to make rpcserv.foo.whatever() work,
>and isn't implementing __getattr__ frowned upon when using
>acquisition?  (Does anyone have pointers to an explanation of the
>problems doing this?)

Actually its ZODB that frowns on overriding __getattr__. However, if
there's any group of people who are licensed to break these kind of rules
my guess is that your one of them ;-) Jim as always has the details.

>>My guess is that a simple 'cache for N hours' setting on methods would
>>provide much of the needed functionality with very little complexity.
>
>Perhaps; in the meantime, I've sent off an e-mail to the XML-RPC
>mailing list in an effort to raise some discussion about caching.

Great! I like Paul's idea of using standard HTTP headers for this. This
solution would make it a snap on the client side. Getting Frontier and
other servers to set the right HTTP headers is another story all together...

-Amos