> On May 15, 2015, at 2:31 AM, Yonah Forst <[email protected]> wrote:
> 
> The environment I'm designing for is a crowded area where iOS devices are 
> communicating via wifi or BTLE. Each device make small changes to the 
> database about once per-minute and needs to propagate these changes to all 
> other devices. The idea is that this is decentralized and should work without 
> connection to the internet (ambitious, I know…)

Mesh networks are tricky, and not just with Couchbase Lite. In a naïve 
implementation where every peer syncs with every other peer, the workload for 
each peer grows as O(N) and the amount of LAN traffic grows as O(n^2). Ouch! 
What you want instead is something like a spanning tree, which uses a small 
number of edges to interconnect all the peers while still keeping the path 
lengths short. Of course then you need coordination between the peers to create 
and maintain the pairwise connections that make up the tree, even as peers come 
and go. And the larger the network gets, the more churn there is as peers go 
on- and offline, and you have to keep that re-routing work from dominating the 
activity.

This has been done and there are real-world systems that use it (Zigbee, etc.) 
but from what I’ve seen, the algorithms are complex. It gets even more complex 
if you want to be robust against malicious peers trying to mess up the routing 
or inject false data.

But yes, the replication system is designed to handle arbitrary topologies 
including multiple hops and/or cycles.

—Jens

-- 
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/4A47296B-476C-4032-903C-C6247B35F2D6%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to