xmlrpclib.Server vs xmlrpclib.ServerProxy

Magnus Lie Hetland mlh at vier.idi.ntnu.no
Mon Mar 18 17:08:34 EST 2002


In article <eJKk8.25431$n4.4999276 at newsc.telia.net>, Fredrik Lundh 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.

Well, that's one way of seeing it; but it *is* an xmlrpc *client*, no?
Of course, any "proxyish" client could be said to represent a server,
but calling them servers seems to muddle things, IMO.

I haven't had any problems with the Server naming, really; it just
seems a bit odd when I have a server object on each end of the
network... And things become even weirder when I write peer-to-peer
stuff, where one object is both client and server... Or, in this case
"server and server". Then it *is* one and *represents* the other
(through the proxy class).

>the (rather lame) ServerProxy alias was added later, after
>enough people had flamed me over the original naming...

OK. I just saw you using it in some code somewhere, and assumed that
perhaps it was the (i.e. your) preferred usage. I guess it wasn't,
then :)

>> 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...

Pay for? How so? By having to load the code? Oh, well. I didn't really
see this as a realistic wish anyway.

></F>

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org



More information about the Python-list mailing list