Hi everyone, I was experimenting with what CouchDB replicator might look like in CouchDB 4.x and came up with this RFC https://github.com/apache/couchdb-documentation/pull/581.
The basic idea is to use couch_jobs for scheduling and coordination. So far in the FDB (CouchDB 4.x) prototype branch couch_jobs is used for indexing, removing expired deleted databases, so this would be a 3rd re-use case. The design in the RFC tries to remain as compatible as possible with the CouchDB <= 3.x version, in other words it doesn't alter the replication protocol itself i.e. what happens once a job starts running and how it talks to the source and target endpoints, and also tries to keep the monitoring APIs (_active_tasks, _scheduler/*) relatively intact. The experimental work is in a draft PR https://github.com/apache/couchdb/pull/3015, I got it to a point of being able to add jobs via _replicator db doc updates and the _replicate/ endpoint. The monitoring endpoints also seem to work and have a smaller implementation footprint as we just fold over all the job data in couch_jobs, and before we had to make rpc calls and fetch data via fabric and such. Please take a look and let me know what you think of it Thank you, -Nick