couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <antony.bla...@gmail.com>
Subject Re: Document Updates
Date Thu, 13 Nov 2008 21:49:22 GMT

On 14/11/2008, at 3:13 AM, Noah Slater wrote:

> On Thu, Nov 13, 2008 at 06:40:44PM +0200, Ayende Rahien wrote:
>> I think that this should be pretty easily done using:
>> a) well defined pretty format output
>> b) standard diff
>>
>> The reason for (a) is that you need this to get line breaks, which  
>> are
>> critical to diffing correctly.
>
> It's a bit more complex than that, canonicalised JSON is still in  
> it's infancy,
> so we would have to get the community to adopt that first. I know  
> that people
> have been discussing JSON diffs before, may be worth looking up  
> what's already
> been done on this.

Given the XML/JSON isomorphism, I wonder if something like this: http://www.springerlink.com/content/r1t6h8631868k615/

  would be a good start for computing a diff.

The relevent section from XQuery Update, http://www.w3.org/TR/xquery-update-10/#id-update-primitives

, might be useful starting point for defining a JSON-encoded  
(recursive) EDL-based structural diff.

IME a structural diff is better for these purposes than a traditional  
text-diff over a canonicalized format. It's certainly easier to  
generate for clients.

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

On the other side, you have the customer and/or user, and they tend to  
do what we call "automating the pain." They say, "What is it we're  
doing now? How would that look if we automated it?" Whereas, what the  
design process should properly be is one of saying, "What are the  
goals we're trying to accomplish and how can we get rid of all this  
task crap?"
   -- Alan Cooper



Mime
View raw message