1

I am thinking of using Pouchdb and Couchbase (w. Sync Gateway) to implement an online presence system in the style similar to what could be done in the Firebase tutorial linked below.

https://www.firebase.com/blog/2013-06-17-howto-build-a-presence-system.html

Is it possible to do that with these tools? It would be great if someone could give me some hint.

Thanks.

brian
  • 217
  • 2
  • 11

1 Answers1

1

PouchDB itself won't give you any clue when a user is offline or online, so you may want to look into this library: http://github.hubspot.com/offline/docs/welcome/

As for signaling that a user is online/offline to other users, you can definitely do that in PouchDB by just modifying documents. But keep in mind that PouchDB keeps a record of all changes made to a document (think Git), so your history can grow out of control pretty quickly. So you'll probably want to turn on auto_compaction in order to trim old document revisions.

nlawson
  • 11,510
  • 4
  • 40
  • 50
  • Thanks. I looked at it, but it seems like the library only runs on the client and only allows the client to check (for itself) if it's connected to the internet. What I'm asking is more of a server side thing (something that may be hooked into couchbase sync?) that detects when a user goes offline. – brian Apr 10 '15 at 15:56