couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@apache.org>
Subject Re: Document Updates
Date Fri, 14 Nov 2008 17:40:47 GMT
On Fri, Nov 14, 2008 at 4:22 AM, Antony Blakey <antony.blakey@gmail.com> wrote:
> I don't think Couch is truly REST. Certainly _bulk_docs isn't. The fact that
> there are URI patterns means it's not REST, at least not if I've understood
> Roy's recent communications/frustrations, such as
> http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven.
>
> In particular, point 4 seems to disqualify any system, (including Couch)
> that needs the documents in the "Reference" section of the Wiki.
>
> To be REST it has to be just like the web. Using links discovered from
> documents, never constructing them according to some scheme.
>

Ah, shaving the yak shed.

But I've been thinking about this as well. If we were to attack this
problem of "High REST" head-on, I think the appropriate course would
be to define a media type application/couch+json or something. The
media type's definition would explain how to get from "id" params to
document URIs, etc. Doing that is all it would take to be (mostly)
RESTful. I think the existence of _bulk_docs POST doesn't break
RESTfulness, either. There's no law that says a system can't define
RESTful resources alongside RPC endpoints.

I'm not sure how meditating on the Zen of REST will help us get
json-diffs right, but it sure can't hurt.

Chris





-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message