Google Groups

Re: iOS peer to peer replication


sas Apr 30, 2012 6:52 AM
Posted in group: Couchbase Mobile
Hi Chris,

thanks for the fast reply. That sounds great, I'll start looking into
it right away and I'd be happy to publish what I find.

Cheers,
Sven

On Apr 30, 3:34 pm, J Chris Anderson <jch...@couchbase.com> wrote:
> On Apr 30, 2012, at 6:21 AM, sas wrote:
>
>
>
>
>
>
>
>
>
> > Hi all,
>
> > I'm trying to set up peer to peer replication between iOS devices for
> > my app. Out of habit, I've been working with TouchDB but I just
> > realized that I won't be able to replicate between devices with
> > TouchDB, because it does not expose its db via http, right? The REST
> > operations in the framework are resolved through TDRouter and
> > "touchdb://" URLs if I'm not mistaken.
>
> > I don't suppose there's any way to expose a TouchDB on one device in
> > such a way that another could pull directly from it, is there? All the
> > examples I've seen (and implemented) always had a "real" couchdb at
> > the remote end, with the touchdb local. In order to propagate from
> > device to device one would have to go via a this central couchdb hub,
> > which is a setup I want to avoid.
>
> > So to replicate between devices directly, I'd have to go back to the
> > erlang iOS Couchbase [1], don't I?
>
> Don't worry. TouchDB has you covered. I'm sorry I don't know the exact details but I know Jens recently fixed some bugs he found while testing p2p TouchDB replication.
>
> If I wanted to figure out how to implement p2p in my app I'd probably start by looking at the classes and stuff referenced by TouchServ and maybe grep the rest of the project for them.
>
> If you are game to publish something on how to set up p2p I think people will appreciate it.
>
> Chris
>
>
>
>
>
>
>
>
>
> > Cheers,
> > Sven
>
> > [1]http://files.couchbase.com/developer-previews/mobile/ios/nightlybuild...