Great talk Jens!! I'm about halfway through now and it's been SUPER 
informative. 

I'm at the part when you talk about putting the last sequence number in the 
bonjour metadta and initiating a pull from a peer when that number changes. 
Is that method significantly better than just establishing a continuous 
pull replication? (using didFindService/didRemoveService to start/remove 
active replications).

On Saturday, June 13, 2015 at 8:15:34 PM UTC+2, Jens Alfke wrote:
>
> The P2P talk 
> <http://connect15.couchbase.com/agenda/couchbase-mobile-103-building-peer-peer-app-couchbase-mobile/>
>  I 
> co-presented at Couchbase Connect gave me the chance to finally sit down 
> and write a P2P mesh replication demo for iOS. This is something people 
> often ask about here, and I wave my hands and go “blah blah Listener blah 
> blah Bonjour”, but it’s nontrivial to actually implement.
>
> I built it as an extension of Grocery Sync, on a “bonjour-sync 
> <https://github.com/couchbaselabs/Grocery-Sync-iOS/tree/bonjour-sync>” 
> branch, but the P2P code 
> <https://github.com/couchbaselabs/Grocery-Sync-iOS/tree/bonjour-sync/Source/PeerSync>
>  is 
> modular enough that it can be dropped into other iOS or Mac apps. 
>
> The user model is that you pop open a browser that lists the other devices 
> on the LAN running the app, and can choose people to follow (i.e. pull 
> from). That setting is saved persistently, and from then on any time one of 
> those devices is online and has new changes, your app will pull the changes 
> across to you.
>
> As part of building this I found some limitations in Couchbase Lite; for 
> example, SSL cert hostname validation makes it infeasible to use P2P SSL 
> connections. I filed issues and I’ve started putting in some fixes 
> (although not in time for version 1.1.)
>
> My code is for iOS or Mac OS, but in the session I described the 
> techniques in a cross-platform way. And Android supports Bonjour (under a 
> different non-trademarked name) so the platforms should be able to 
> interoperate.
>
> —Jens
>
> PS: The talk also featured Pasin’s photo-sharing app, which he’s announced 
> previously <http://blog.couchbase.com/photodrop>  It’s also very cool, 
> and shows off a completely different technique: using QR code generation & 
> scanning to let two devices securely ‘pair’ and connect to each other.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5a376bf2-d45d-4f20-b322-619e0c986855%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to