xmlrpclib.Server vs xmlrpclib.ServerProxy
Fredrik Lundh
fredrik at pythonware.com
Sun Mar 17 07:58:02 EST 2002
Bengt Richter wrote:
> >the original code used Server -- after all, the object is
> >representing a remote server.
> ^^^^^^^^^^^^
> But not functioning as?
if you look at it strictly from the client end, that object
represents, functions as, and for all practical purposes
*is* the server.
the fact that the actual service provider might be running
on another machine is almost entirely irrelevant.
# client configuration
# define what services we'll use later on
spam = xmlrpclib.Server[Proxy](URL)
egg = Egg() # local
#
# client implementation
spam.cook()
egg.fry()
> This is in good part an English usage issue, but
> IMO the term 'proxy' should not be used except when the
> proxy duplicates the function and stands transparently
> in place of that for which it is a proxy.
in this case, the term is used in its GOF sense: the ServerProxy
object is a "remote proxy", a "local representative for an object
in a different address space".
(strictly speaking, the server wrapper creates method proxies on
demand, and it's the method proxy that talks to the remote server,
but that's an implementation detail)
</F>
More information about the Python-list
mailing list