Current, working example of peer to peer replication?

P2P is not an off-the-shelf feature of Couchbase Lite. You can build a P2P system out of the components we’ve provided, but it’s not trivial. I would love for us to add the higher layers that would make it easy to deploy P2P, but we just haven’t had the time.

  • There is a branch of our Grocery-Sync sample app that demonstrates a simple working P2P system. I wrote it for last year’s Connect conference. The P2P code in it is separable from the app and should be useable in other apps, or at least you can look at it and rewrite it if you’re not using Swift.
  • Sorry about that; I’ve filed ticket to get the docs updated.
  • The React Native package is not an official supported product (that’s why it’s in couchbaselabs) although some Couchbase engineers are working on it. Their README doesn’t make this clear, and I’ve sent a request to clarify it.
  • Hm, kCFErrorDomainCFNetwork is defined in <CFNetwork/CFNetworkErrors.h>. -1005 is kCFURLErrorNetworkConnectionLost, i.e. the peer closed the socket unexpectedly. So look at the peer you were connecting to — it probably got an error and aborted the connection.