Update replication.md

- Update all examples to use new APIs.
- Add new section about deprecated APIs.