Channels for a forum Mobile app


#1

Hello
As part of my postgraduate I choose a project to work on Couchbase light and sync gateway.
The project goal is to build a forum app for Iphone and Android.

I would like to understand how can I choose the channel id for sync gateway in this case for the post document store?
I have to say that I am still new in couchbase world and need some help.

here is the forum post document I am thinking to use;
{
“PostId”:“post-2ed202ac08ea9033665e853a3dc8bc4c5e78f7a6cf8d55910df230567037dcc4-15”,
“type”: “post”,
“userID”:“2ed202ac08ea9033665e853a3dc8bc4c5e78f7a6cf8d55910df230567037dcc4”,
“userName”:“user526262”,
“country”:“France”,
“TopicID”:“90002891”,
“Topic”:“please help me with your knowledge”,
“CategID”:“15”,
“Category”:“Shopping”,
“text”:“reply1”,
“DateTime”:"“Mar 13, 2015 9:00:20 PM”"
“about”: {
“PostId”: “post-4fgtyeye561h29033665e853a3dc8bc4c5e78f7a6cf8d55910df230567037tgbr-10”,
“type”: “post”,
“userID”:“4fgtyeye561h29033665e853a3dc8bc4c5e78f7a6cf8d55910df230567037tgbr”,
“userName”:“user101”,
“country”:“USA”,
“text”:“First Message”,
“DateTime”:"“Mar 12, 2015 3:00:01 AM”"
}
}

Thanks
Wissa


#2

The guide on channel usage in the Sync Gateway documentation is probably the best place to start - it covers how to define channels using the sync function.

http://developer.couchbase.com/mobile/develop/guides/sync-gateway/channels/index.html


#3

thanks @adamf for the link.
In my case, does it make sense to use the topic of the post (topic id ) as a channel id?