Start replication to paired servers on desktopcouch startup

Bug #416581 reported by Stuart Langridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
High
Chad Miller

Bug Description

On desktopcouch startup, it should:

1. look for a database called "management"
2. look in that for records defining a paired server (record type and schema not quite defined)
3. look in that database for a record defining the database replication exclusion list (record type and schema not quite defined)
4. for each paired server: send an authenticated continuous replication request to desktopcouch for every database that is not in the exclusion list and is not "management"

This will make replication happen.

Related branches

Stuart Langridge (sil)
Changed in desktopcouch:
assignee: nobody → Stuart Langridge (sil)
Revision history for this message
Stuart Langridge (sil) wrote :

Exclusion list should be a MergeableSet listing database names.

Paired server record should define:
server: a server name or IP address (name for preference, .local names for machines on the lan)
oauth: {
  consumer_key: string,
  consumer_secret: string,
  token: string,
  token_secret: string
}
database_name_prefix: string, a prefix to add to DB names when replicating to this server

Revision history for this message
Stuart Langridge (sil) wrote :

Paired server record should also contain

pull_from_server: true

if localhost is expected to do both push replication (as standard) to this server *and* pull replication *from* this server. If this entry is absent, do push replication to this server only.

Revision history for this message
Chad Miller (cmiller) wrote :

Instead of "database_name_prefix", how about "database_name_format", so "prefix_%s_suffix" ?

Also, I'm wary of changing the name, if it's ever possible the far end will inject the new database name into our replication upstream somewhere.

Revision history for this message
Chad Miller (cmiller) wrote :

pairing_identifier: str(uuid) (the primary identifier, as names collide, and addresses vary)
server: a server name or IP address (name for preference, .local names for machines on the lan)
oauth: {
  consumer_key: string,
  consumer_secret: string,
  token: string,
  token_secret: string
}
database_name_prefix: string, a prefix to add to DB names when replicating to this server

Revision history for this message
Stuart Langridge (sil) wrote :

Remove database_name_prefix, and assume we always replicate to a database the same name on the remote end. (If this is a problem, for example if you have many users' databases on the server and two users may have databases with the same name, then have a proxy which redirects based on oauth token.)

Joshua Blount (jblount)
Changed in desktopcouch:
status: New → Triaged
Chad Miller (cmiller)
Changed in desktopcouch:
assignee: Stuart Langridge (sil) → Chad Miller (cmiller)
importance: Undecided → High
status: Triaged → In Progress
Chad Miller (cmiller)
tags: added: cmiller-k-alpha6
Chad Miller (cmiller)
Changed in desktopcouch:
milestone: none → w21-karmic-alpha6
Chad Miller (cmiller)
Changed in desktopcouch:
status: In Progress → Fix Committed
Chad Miller (cmiller)
Changed in desktopcouch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.