December 6, 2013

Couchbase M101: Q & A

In our ongoing training series, a number of questions come up each time, I list them out with their respective answers below!

Couchbase M101 - Couchbase Mobile Architecture

Couchbase Lite IOS API Documentation: http://www.couchbase.com/autodocs/couchbase-lite-ios-1.0b1/annotated.html

Q: Are filters the right way to filter out data for specific users?

A: "Filters" are channels, and yes the purpose of channels is two-fold, firstly to be able to only syncronize data relevant to the user (filter) the data, and secondly to reduce the amount of data transfer required, saving bandwidth and unnecessary downloading which is good for mobile devices.

Q: Can I know more details on partner integrations and usage? 

A: These partnerships are relatively new, so there aren't a ton of example applications yet, but there are some already. All three of these initial partner integrations are for app building mechanisms that are alternatives to pure native development as native/HTML5 hybrid apps. So we have Couchbase Lite plugins for PhoneGap, Appcelerator Titanium and Xamarin at this time.

Q: Can you define a broadcast channel that syncs to all users?

A: The solution to that is simply to create a channel that you associate all users to. For instance you can call it "broadcast" and use access() so subscribe all users to that channel. Any document that is associated with that channel will go to every user.

Q: Is the phonegap plugin now public and can be used with phonegap build?

A: Yes it is, if you want a quick guide, follow the instructions on the sample project: https://github.com/couchbaselabs/TodoLite-PhoneGap It should soon be in the list on the build.phonegap.com website, not sure exactly when but soon.

Q: We want to channel content based on device or mac, is that possible?

A: Very easily, basically in the app when you create the user registration document, you can also add to the channels they are subscribed to by defining platform based ones, so doc.channels: ["mac", "ios"] etc.

Q: Security of data in rest and in transit?

A: SSL is optional and you can configure the sync gateway to use it, or you can put it behind a proxy/gateway that uses it.

Q: How does channels work in case of anonymous users? Can I subscribe the device/user to a specific channel? 

A: Unauthenticated requests are treated as GUEST. If you allow/enable GUEST access, you can also subscribe GUEST to channels and synchronize documents in that associated channel just like any other user. You can also create your own sessions and device specific "authorization" cookies, and subscribe them to channels as well.

Q: Device specific channels instead of user/role based channels?

A: A "user" is just a name, it could also be a device.

Q: Custom authentication other than facebook and persona how?

A: In the documentation we have some basic instructions for doing this here: http://docs.couchbase.com/sync-gateway/#custom-indirect-authentication

Q: Also sync gateway release schedule out of beta?

A: GA release is estimated to be sometime in early Q1 2014.

Q: What is the current status of Couchbase Lite for Android?  Is there a truly native implementation complete?  Will there be support for development in Eclipse, not just Android Studio?

A: The entire Couchbase Mobile solution is in Beta, including Android. Couchbase Lite Android is under heavy development along with the rest. The new Couchbase Lite Android API should be released in a few weeks. You can develop in Eclipse currently you are just pulling in the necessary libraries from Maven which you can do with either IDE. If you need Eclipse instructions or guidance I would suggest posting on the Couchbase Mobile google group.

Q: What is the pricing model -- is there a pure community edition?

A: Currently there is only one edition, and as usual with all Couchbase products, is completely open source. We are still in Beta and I am not aware of plans for an Enterprise Edition as of now.

 

Comments