wip: ddoc replication

Change-Id: Ied4b77e9fd3ed7f950fc686218ea754d39f0a8f9