0

I am learning about couchbase. It's my first experience with NoSQL databases.

In the case of a central server and many users with mobile devices. I want every user on your database has different data. I have doubts about the sync.

To synchronize, the server will have a database per user? A database per user sounds to many databases ... otherwise I do not understand how to differentiate user data.

Is it possible to communicate between server and device through couchdatabase?. Is it good strategy for communication with the device to write to the replica that is in the server and Couchbase is responsible for making the communication? Where I can find an example of this?

borrrden
  • 33,256
  • 8
  • 74
  • 109
user60108
  • 3,270
  • 2
  • 27
  • 43

1 Answers1

1

Some of these questions are unclear, but I will attempt to answer:

The server will not have a database per user. It only has the databases (or "buckets") that you set up ahead of time. User data is separated by a mechanism called channels.

Communication between server and device is the exact point of Couchbase Lite. In this scenario, you must make all changes go through Sync Gateway in order for replication to function properly. This is handled for you by Couchbase Lite, so you just need to point it to a Sync Gateway instance and let it take care of replicating between various devices.

borrrden
  • 33,256
  • 8
  • 74
  • 109