couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Barnes <>
Subject Re: Deciding on the structure of documents
Date Mon, 29 Mar 2010 02:16:22 GMT
I would suggest that on replication if the documents conflict and have 
different owners, do a kind of 'asynchronous revision error' - have the 
system choose the earlier 'owner claim' by date, and send an email 
stating 'sorry X, Y has already taken ownership'.

I'm not sure if that would cause further issues regarding whether to 
invalidate content changes made by X, or how best to resolve that sort 
of thing.

On 29/03/2010 12:58 PM, Robert Sanford wrote:
> On Sun, Mar 28, 2010 at 7:20 PM, Patrick Barnes<>  wrote:
>> For the single-document situation: What if multiple people reply to the
>> same post at the same time? The first comment to reach couchdb would succeed
>> in updating the document, and the second comment would result in an error,
>> because the doc revision is now out of date. A single-document situation
>> would require the application logic to handle a revision error, and maybe
>> automatically resubmit. This solution does not scale well - the more traffic
>> and the more comments a site receives, the more likely these revision errors
>> will occur.
> This brings up a question on an app I'm in the process of designing and I'm
> wondering how it works in a multi-node situation.
> In my app a document (almost literally a document actually) can have a
> single caretaker. In some situations the owner can decide they no longer
> wish to act as caretaker and offer up the document to others. That situation
> is easy in that the role of caretaker is explicitly transferred. Or, they
> can simply release "ownership" of the document.In that instance others that
> are assigned the role of Caretaker in the system can then claim the document
> on a first-come-first-served basis.
> In a multi-node system w/ replication what happens if Caretaker D in the
> Dallas office claims the document and prior to any replication occurring
> Caretaker P in the Phoenix office also claims the document?
> How can that sort of situation be handled? In a single-node system it's (not
> quite) trivial to handle but in a multi-node system w/ a time delay between
> replications that are not taking business logic into account that is
> trickier and I don't have my head around it yet.
> rjsjr

View raw message