[XML-SIG] WSDL library ?
Paul Prescod
paul@prescod.net
Wed, 13 Feb 2002 08:49:28 -0800
Rich Salz wrote:
>
> > If you want to scale I'd say you shouldn't use RPC.
>
> Please define what you mean by RPC when you say this.
Oh dear...I don't have time for another debate about this this week. And
surely you've seen a lot of it on xml-dist-app.
Here's Fielding's definition: "What distinguishes RPC from other forms
of network-based application communication is the notion of invoking a
procedure on the remote machine, wherein the protocol identifies the
procedure and passes it a fixed set of parameters, and then waits for
the answer to be supplied within a return message using the same
interface. Remote method invocation (RMI) is similar, except that the
procedure is identified as an {object, method} tuple rather than a
service procedure."
When I say RPC I mean Remote Procedure Call, which means that it is a
form of networking that treats network interactions as procedure calls
in a programming language. In my experience, the more you try to do
networking as "procedure calls" the more problems you have with scale.
On the other hand, for ease of use, RPC can't be beat.
For instance if a Python call looks like
stock = foo.getStockQuote("MSFT", some_date)
then it is very tempting to turn this into a network call of
<getStockQuote><string>MSFT</string><string>some_date</string></getStockQuote>.
This works great for small systems but I feel it is the wrong approach
for big ones. First, you need to have some way to say if it is cachable.
Let's say:
stock = foo.getStockQuote("MSFT", some_date, _withcache=1)
Next problem is extensibility. This is very poorly extensible. So you
might decide to use keyword arguments instead:
stock = foo.getStockQuote(stock_name = "MSFT", date = some_date,
_withcache=1)
It's starting to look less and less like a normal Python procedure call
and more and more like some kind of networking protocol. I could go on,
describing more and more permutations to make this procedure call
networking friendly.
Many people agree with me thus far. I happen to be among a small
minority that thinks that the logical endpoint of this is:
stock = http.GET("http://www.stocks.com/%(stockquote)s/%(some_date)s")
And as I'm short of time for the whole discussion, here are a few URIs:
* http://www.xml.com/pub/a/2002/02/06/rest.html
* http://internet.conveyor.com/RESTwiki/moin.cgi/
* http://internet.conveyor.com/RESTwiki/moin.cgi/RestFaq
* http://www.itworld.com/nl/xml_prac/01312002/
Paul Prescod