Jen’s session at Couch Connect and subsequent p2p mesh replication app brought 
forward some background ideas for a project.  For this project one of the 
things I’ve been stuck on is the idea of presence information. Let’s assume for 
the moment:

1. We’re making some sort of ‘chat’ app - could be people or systems, just 
something that needs to pass information around.

2. We’re using some sort of soft mesh - maybe a spanning tree or similar but 
designed to deal with and without WAN connectivity to a central coordinating 
server.

3. We’ve solved the authentication/verification of content through 
public/private keys or flying unicorn protocols, or maybe that’s not needed 
because it’s going to be anonymous and there are no spammers/trolls using our 
app. Yes, I realize this is a hard problem and I’m hand waving.

4. There is a desire to know who/what are currently involved in the ‘chat’ 
within some sort of time window (x seconds).

5. We’re using CBL on the ‘devices’.

Let’s be open to other protocols but for this thought experiment I was trying 
to do everything in couchsync protocols. 


Options as I see them:

1. Send a new heartbeat document at the end of time window with id of 
device/person. Pro: easy Con: lot’s of documents that would be difficult/slow 
to clean up.

2. Create a single heartbeat doc per device/person and continue updating it 
when online. Pro: less documents Cons: Lot’s of revisions; possible but 
unlikely revision collisions.


I lean toward #2 with the a follow on idea to keep the ‘presence’ information 
in a separate database from the ‘main’ database. Then, on Y number of database 
changes, do a quick compression to remove the revisions. If there is a revision 
conflict, deal with it somehow.

I’d love anyone’s thoughts on this approach so I can put this particular 
thought process to bed for a while.

Thanks!

-- 
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/F4431333-0004-49FB-8967-ABE77A06B6D2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to