POST in REST

[ccing www-archive]

I just came across your "REST, RPC, mountains, molehills, and a
retraction (sort of)" [1] and I *love* the unix/plan9 "everything is a
file" association.  It makes soooo much sense (to this old unix
hacker, at least, but I suspect I'm not the only one.)  Has this been
talked about much elsewhere?

So GET == get the contents of the file
   PUT == replace the contents of the file
   DELETE == remove the file
   POST == ?

TimBL tells me that POST was originally meant to be "create"; you'd
POST to one resource to create a nearby, related resource.  But I've
never seen it used directly that way -- it's used more like ioclt,
like "talk to the man/kernel/server behind the curtain," breaking the
system's simplicity of interface.   How does it seem to generally be
viewed by REST folks...?

I've also had trouble with the use of the word "resource" to mean
things-themselves (like cars and dogs) instead of files.  But I think
I've got it: in an OOP system, each object is stored in some bunch of
memory (contiguously in C/C++, probably spread out in perl/python).
The thing itself (my dog Taiko) is represented in the computer by some
OOP "object" at address 0x00f754c0; if we want to talk on the web
about him, I also give him a URI (http://hawke.org/taiko) and a GET of
that address will fetch some marshalled form of the data at
0x00f754c0.  Does that all sound about right?  

(I do have a problem with this glossing over the difference between
things and files about the things, which is that files often contain
data on many things and things are often mentioned in many files --
but in good OOP, that's not supposed to happen.)

(the light dawns outside my window, and in my brain....)

    -- sandro

[1] http://www.xent.com/pipermail/fork/2001-August/002801.html

Received on Wednesday, 27 November 2002 06:54:13 UTC