pluggable replicator api, and port existing pull and push to use it