= new URL("http://10.8.4.3:55000/votingapp"); Replication r = Replication.createPushReplication(url); r.start(); Result doc1 doc1 Listener listener = new Listener(manager, 55000); listener.start(); Push replication A B
port 55000 Service name jamiltz Service type _peersync._tcp Device A register a service Listen for all services and handle those with service type _peersync._tcp Device B discover services 1. Broadcast service 2. Hostname resolution 3. Return IP address 4. Start pull or push replication
_rev: 2-c31b Couchbase Lite Sync Gateway Replicating Documents & Revisions Sync Gateway: "What’s new since we last spoke?" Couchbase Lite: "I added rev #3-a9ff of doc1." Sync Gateway: "That’s new to me!" Couchbase Lite: "I’ll send it over…"