User's "My Data"

Hello,

I want users to have their own personal data. For instance I want users to have a schedule of meetings. What is a good strategy for doing this with couchbase? I'm using couchbaseLite on Android. Please give me an outline of the steps necessary to provide this functionality.

Can people register in the app, then the app would create a User document with their User information?
Should that User document contain id/references to other documents that represent meetings?
Should I use channels? How can that help me with this solution?
Should I use persona for an authentication mechanism? What would a user have to do if I used this mechanism. Is authentication necessary?

Any other suggestions?

Thanks much.
Brian

I was trying to update my comment to you Jens but the system was not allowing me to do so. I wanted to point out that Im building a users "My Data" so a user would have a list of Meetings. This in regards to my question and your comment about the user reference in the Meeting document rather than the meeting references in the User doc (or another document I guess that links the two)

1 Answer

« Back to question.

>Can people register in the app, then the app would create a User document with their User information?

You can do that if you want to have a document that represents the user. This would help other users to find that user, for example. The CouchChat example does this.

>Should that User document contain id/references to other documents that represent meetings?

It's better the other way around, if the dependent documents contain the ID of the user that owns them.

>Should I use channels? How can that help me with this solution?

I don't know; you haven't said how you want users to interact. Can users see each others' data?

>Should I use persona for an authentication mechanism? What would a user have to do if I used this mechanism. Is authentication necessary?

http://docs.couchbase.com/sync-gateway/#persona
The client app needs to run a Persona login flow in a WebView to get the auth token to send to the server. We have an iOS library to do this (https://github.com/couchbaselabs/browserid-ios) but not one for Android.

Thanks Jens,

So you think it would be better for a Meeting document to contain a list of many users that are associated with the Meeting rather than each user have a reference to a Meeting?

No users can't really see other users data. So I guess you were saying this would mean no need for channels?

They might want to message each other, so having a User document may be a good thing.

It seems if I have a user log into our app, then a logged in user accesses couchbase data via the sync url I don't need to setup any persona authentication. Would you agree with that?

Thank you very much.
Brian