incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bsquared <>
Subject Re: per-user databases & collaboration problem
Date Wed, 23 May 2012 18:02:13 GMT
Gregor Martynus <> writes:

> Hey everyone,
> Imagine the following setup: 3 databases with 2 cont. replications:
> "user/joe"
>       ||
>       || cont. replication (filtered)
>       ||
>       \/
> "shared/123"
>       ||
>       || cont. replication
>       ||
>       \/
> "user/sarah"
> Joe (user/joe) is sharing a list of documents with an extra database (shared/123) and
a filtered replication. Sarah
> (user/sarah) subscribed to the Joe's shared documents with another cont. replication.
> So far, so awesome. 
> And now the Problem:
> 1. Sarah deletes Joe's documents and stops the replication.
> 2. Sarah changes her mind, she wants to have the documets back again
> 3. it doesn't work, because new revisions have been added for each deleted document,
the shared documents do not get replicated because of the conflicts.
> And here I am, and don't see  a "couch way" to solve this problem. Neither do I see a
simple workaround.
> Is there anything you can think of, to solve or work around this problem? Or is this
kind of "sharing" between user databases broken by design?

I am working on something with a similar replication design. 

 A - CouchAppPortal <->  \
                          B - SharedDataBase (db security, filters)
 C - CouchAppPortal <->  / 

 Joe uses CouchAppPortal A, he has private data, shared
 content he has created and shared content he has not created.

 Sarah uses CouchAppPortal C, she has private data, shared
 content she has created and shared content he shas not created.

 You may continue the list of users...

 Joe may delete any of _his_ documents.  Sarah may delete any of _her_

 Joe may not delete any of Sarah's documents.  Sarah may not delete any
 of Joe's documents.

A specific document type for each SharedDataBase in each
CouchAppPortal maintains the metadata for the SharedDataBase.
This can include a document blacklist, which can be integrated into my
replication filter.

I have not tested this yet, so I am not sure how replication will affect
the rules.  I will have to create a test when I get stuck on my present task.

I welcome any feedback.


View raw message