--- In [email protected], "Mike
Glendinning" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], Bill de hOra 
> <bill@> wrote:
> >
> > If we had a trace on the wire, it would look like a regular HTTP 
> > request.  There's no embedded method call in the request body (or 
> the 
> > URL), unless we want to argue that GET is an RPC.
> > 
> 
> Bill,
> 
> Sorry for the late response, but I've been distracted on other things 
> for the past couple of days.
> 
> I didn't mean to pick on you, but I do see the "RPC is bad" meme 
> being parroted quite a lot and not subject to much discussion or 
> justification.  So I have been looking for an opportunity to prompt 
> more discussion.  I'm not so sure that RPC is intrinsically bad and 
> think that the truth is, as always, somewhat more nuanced.
> 
> To explore further and address your points as well as those from 
> Stefan and Miran, let's look at some definitions of RPC.  From the 
> classic paper by Birrell/Nelson [1], we have:
> 
>    "...it is proposed that [procedure calls] be extended to provide 
> for transfer of control and data across a communication network.  
> When a remote procedure is invoked, the calling environment is 
> suspended, the parameters are passed across the network to the 
> environment where the procedure is to execute [...], and the desired 
> procedure is executed there." (Section 1.1)
> 
> Quite a few years later, a certain student wrote the following in his 
> doctoral dissertation [2]:
> 
>    "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." 
> (Section 6.5.2)
> 
> By both of these definitions, your code example below is RPC:
> 
>   resp, content = h.request("http://example.org/people/anne";, "GET")
> 
[snip]

>From this POV, we could certainly argue that issuing an HTTP GET
request is RPC per definitions above. After all, the client sends a
request over the network to the server, where the request ultimately
triggers GET's implementation … But here we descend to lower, more
technical details. And perhaps to discussions such as
'request-response style is derivative of RPC style'.

>From the higher planes, where most of the recent RPC-is-bad debates
are being conducted, there is one big differentiator between RPC style
(the, as you said earlier, parroted "bad RPC") and REST style –
RESTful interface is uniform and constrained to a fixed number of
methods. Therefore, in its "low-level RPC-ish implementation" you
don't have arbitrary procedure calls flying around, but only a few
uniform ones (which in case of HTTP correspond to implementations of
HTTP verbs).

Regards,
    Miran

Reply via email to