Implement replication mechanism.
Merge pull request #215 from tbak/2.x

Implement replication mechanism.