couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <>
Subject Re: drill into a doc with a GET?
Date Thu, 08 Jan 2009 22:59:44 GMT

On 09/01/2009, at 2:29 AM, Dean Landolt wrote:

> I was going to pass that in the first time the debate raged but  
> decided it
> was best for me to stay the hell out (I have no need for JSON- 
> update). But
> as far as guidance for an RFC goes, it could be a great start. While  
> xquery
> is a ugly beast, the xquery-update facility is fairly elegant.
> The problem is it requires something like xpath to work, and while  
> json-path
> exists, evaluation is not pure json and requires a javascript  
> interpreter,
> which breaks with couch's design philosophy.
> <>

There is a simple solution for PATCH, using list of edits, a  
declarative path syntax and a few primitive edit operations. I  
described this in this list - subject "partial/diff updates?". It  
requires no javascript interpreter, in the same way that json doesn't.  
It's a convenient and suitable format/mechanism both for fire-and- 
forget partial updates i.e. you want to code an update to a document,  
and for tree-diff algorithm implementations to produce.

IMO the issue for PATCH is not working out what to do. The PMC have  
asserted that no such mechanism will be incorporated unless the diff  
format is an RFC/ID. IMO that's not necessary, nor is that the correct  
role of the PMC in an Apache context, but PATCH can be easily added in  
a private fork, so I'm not concerned.

Antony Blakey
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

There are two ways of constructing a software design: One way is to  
make it so simple that there are obviously no deficiencies, and the  
other way is to make it so complicated that there are no obvious  
   -- C. A. R. Hoare

View raw message