xmlrpclib.Server vs xmlrpclib.ServerProxy

Bengt Richter bokr at oz.net
Sat Mar 16 15:21:40 EST 2002


On Sat, 16 Mar 2002 16:50:18 GMT, "Fredrik Lundh" <fredrik at pythonware.com> wrote:

>Magnus Lie Hetland wrote:
>> I find ServerProxy to be a more logical name, but the fact that I
>> can't find it mentioned in the docs makes me a bit wary of using
>> it... (On the other hand, ServerProxy is what's documented in the
>> docstring. What is the history behind this duality -- and what is the
>> motivation for the conflicting current usage?
>
>the original code used Server -- after all, the object is
>representing a remote server.
 ^^^^^^^^^^^^
But not functioning as?

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.

I expect a proxy for a server to implement the functionality
it is a proxy for. Likewise a proxy for an object, or a function.
But to my mind something that just provides an interface is not
a 'proxy' for the thing (remote or not) it provides an interface to.

If the interface were e.g., capable of fronting for a remote server
or alternately a local (same machine) server, the local server might
be a proxy (if providing the functionality) for the remote server,
but the interface object would not be a 'proxy' for either IMO.

ServerLAPI might be a better term, for Server-Local-Application-Program-Interface.
I.e., it implies a bit of interfacing code or an object for that purpose,
not proxy server functionality implemented within itself. A separate interface object
for a proxy server might be called ProxyServerLAPI, whereas a module _implementing_
a proxy server would be called ProxyServer, even though they might provide identical
methods for programming access.

>
>the (rather lame) ServerProxy alias was added later, after
>enough people had flamed me over the original naming...
>
>> who thinks that SimpleXMLRPCServer should be called
>> xmlrpclib.Server, with xmlrpclib.ServerProxy being used as the
>> server proxy...
>
>most XML-RPC users don't use/need server functionality,
>and shouldn't have to pay for something they don't use...
>
Regards,
Bengt Richter




More information about the Python-list mailing list