couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [couchdb] 01/02: update README
Date Mon, 09 Oct 2017 06:50:01 GMT
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository

commit 697ab2dcd30f8d73eea93bcafb9c1ed74f7fb9d7
Author: Jan Lehnardt <>
AuthorDate: Mon Oct 9 08:45:44 2017 +0200

    update README
 src/couch_peruser/ | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/couch_peruser/ b/src/couch_peruser/
index 70f8348..64a0518 100644
--- a/src/couch_peruser/
+++ b/src/couch_peruser/
@@ -1,6 +1,6 @@
 # couch_peruser [![Build Status](](
-couch_peruser is a CouchDB daemon that ensures that a private per-user
+couch_peruser is a CouchDB application that ensures that a private per-user
 database exists for each document in _users. These databases are
 writable only by the corresponding user. Databases are in the form:
@@ -15,3 +15,20 @@ correctly implement in just about any language, especially JavaScript
 and Erlang. Other encodings would be possible, but would require
 additional client and server-side code to support that encoding. This
 is the simplest scheme that is obviously correct.
+## Implementation Notes
+The module itself is a `gen_server` and it implements the `mem3_cluster`
+In a CouchDB cluster, the module runs on each node in the cluster. On startup,
+it launches a changes listener for each shard of the `authentication_db`
+In a cluster, when a change notification comes in (after a user doc has been
+created/updated/deleted), each node independently calculates if it should
+handle the notification based on the current list of active nodes in the
+cluster. This ensures that we avoid trying to update the internal `_dbs`
+concurrently and causing conflicts. It also ensures that at least one node
+does handle a notification. The mechanism that handles this does survive
+cluster reconfigurations transparently.

To stop receiving notification emails like this one, please contact
"" <>.

View raw message