Has anyone used couchbase for group messaging? One user types in a message, and it gets synced across the receivers’ devices. Also, is it advisable to do so when the server is already being used for storing and retrieving other data, but the frequency of those read/writes is comparatively lesser.
Couchbase Mobile is build sync scenarios like this in mind.
Group messaging can be implemented in different ways, but one way could be to use channels to represent “chat rooms/groups”.
It could be that the number of messages that are produced and requested by the chatting feature has a volume that would require you to resize the cluster, but this is not different from other data that you would store in CB.
We have a sample app demonstrating this, but I believe the source code is out of date. You can still look at it for ideas, though.
@jens ; could you please explain why the “channel_id” is used in this case? is this a channel for sync gateway?
I am modeling an App forum with Couchbase document store and would need some help!
It’s the ID of the chat room. It’s added to chat-message documents to associate them with that chat room.
And yes, this is also used on the Sync Gateway side to assign messages to channels and grant user access. Take a look at the sync function.