couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <>
Subject continuous replication API discussion
Date Mon, 10 Aug 2009 20:09:12 GMT
Hi folks, I committed some code today to enable continuous replication  
between CouchDB servers.  I could use some help defining the client  
API, though.  To recap, replication has always been triggered RPC- 
style by a request like

POST /_replicate -d '{"source":"foo", "target":" 

this request would block until the replication had completed and then  
you'd get a 200 response code and something like

   "ok": true,
   "session_id": uuid(),
   "source_last_seq": 1234,

Well, it doesn't make too much sense to do the same with continuous  
replication because the response will never arrive.  Basically, I  
think we need to answer the following questions:

1. How does a user trigger a continuous replication?  Simplest  
extension of the current API would be

POST /_replicate -d '{"source":"foo", "target":" 
bar", "continuous":true}'

2. How does the server respond to that request?  Perhaps a "202  
Accepted" along with the replication ID?

3. How does a client monitor the progress of a continuous  
replication?  The replication will show up in _active_tasks, but I'd  
like to have a way to get all the history information.  If we return  
the replication ID the client could GET the _local doc with that ID,  
but we probably want a resource that's a bit easier to discover.

4. How can we configure replications that survive a server restart?


View raw message