[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Date | Thread | Author

[XML-SIG] WSDL library ?

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.    (01)

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.     (02)

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."    (03)

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.    (04)

For instance if a Python call looks like    (05)

stock = foo.getStockQuote("MSFT", some_date)    (06)

then it is very tempting to turn this into a network call of
<getStockQuote><string>MSFT</string><string>some_date</string></getStockQuote>.    (07)

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:    (08)

stock = foo.getStockQuote("MSFT", some_date, _withcache=1)    (09)

Next problem is extensibility. This is very poorly extensible. So you
might decide to use keyword arguments instead:    (010)

stock = foo.getStockQuote(stock_name = "MSFT", date = some_date,
_withcache=1)    (011)

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.    (012)

Many people agree with me thus far. I happen to be among a small
minority that thinks that the logical endpoint of this is:    (013)

stock = http.GET("http://www.stocks.com/%(stockquote)s/%(some_date)s")    (014)

And as I'm short of time for the whole discussion, here are a few URIs:    (015)

 * 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/    (016)

 Paul Prescod    (017)