CouchBase WEB(AngularJS), Android(Native), IOS(Native) - couchbase

I'm planning to build an application that runs on WEB(AngularJS), Android(Native), IOS(Native).
I have experience with MongoDB, but I found CouchBase which sounds really good for me.
I read documentation and I found out I need to use sync_gatway to sync my mobile databases with main database server and reverse, until now everything is fine.
I also need to use "channels" to share records with multiple users.
The problem comes when I need to implement this for web application.
In their documentation on "Working with web applications" they explain how "bucket shadowing" is working, but they also say:
Bucket shadowing is meant to enable sync for existing Couchbase Server
apps. If you are creating a new app with both mobile and web clients,
we recommend starting with the Sync Gateway REST APIs, and connecting
backend services using the Changes Worker Pattern.
After reading Sync Gateway REST API I found out I'm limited to facebook and persona authentication. So I can't use my own authentication mechanism?
Also, there is nothing specified in REST API about channels?
Is there any example project or more documentation about this? I couldn't find anything :(
If someone has experience with this, please explain how this works.
Thanks

There is also Custom (Indirect) Authentication available on Sync Gateway, which you can use for any type of auth you need.
But you have to hide Sync Gateway's Admin API under your backend layer.
As for the channels: it is responsibility of Sync Function to route different documents to necessary channels based on Document data.
Here is a good video that describes how to build production architecture around Couchbase Lite.

I'm probably late for the party - but as of today I'd recommend taking a look in the PouchDB project for the WEB AngularJS side - they match pretty well and will sync with Couchbase.
Regarding authentication, I just released an article on that topic, find it here. Hope this helps somebody

Related

Considering Tyk API Gateway - open source version

Project background: Building an API driven Learning Management System. The back-end system will be receiving data from multiple systems and interfaces: web, mobile, VR.
Looking at API Gateways to front our APIs. Preferably an Open Source API gateway but need to be sure that the support and service is available. Tried out Tyk.io and it feels like it might be the way to go. Been reading other StackOverflow threads around this and looks like TYK's gateway fairs quite well against the likes of Kong and WSO2.
Main areas of consideration for us are:
Rate-limiting
Open ID Connect authentication
Analytics
Scalability
Hybrid model of hosting - combination of on-prem and cloud depending on compliance requirements of educational institutes (Probably rules of AWS' gateway)
It would be really helpful if anyone who is using or has used TYK.io for their production projects can share their experience, especially for enterprise clients/projects.
Full disclosure: I work for Tyk, so of course think that Tyk is the best fit for your project ;)
Seriously, though - Tyk can do all those things you’re after. Here are some links to the documentation for each item that is big on your list:
Rate-limiting
Open ID Connect authentication
Analytics
Scalability
Hybrid model of hosting
You can also post on the Tyk community for help, if you haven’t already, or search to see what else others have said.
The Tyk Open Source API Gateway will do everything you need, even outputting analytics to difference sources, like ElasticSearch, Mongo or just CSV.
In addition, you can also use our API Management Platform to control your open source gateway. The Tyk API Management platform includes a Dashboard with analytics and out-of-the-box developer portal. Tyk is free to use, under a developer license, to manage a single gateway node, ideal if you are doing a POC.
Hope this helps and please keep in touch to let us know more about your use case.

Connect Sproutcore App to MySQL Database

I'm trying to build my first Sproutcore App and I struggle to connect it to a MySQL-Database or any datasource other than fixture. I can't seem to find ANY tutorial except this one from 2009 which is marked as deprecated: http://wiki.sproutcore.com/w/page/12413058/Todos%2007-Hooking%20Up%20to%20the%20Backend .
Do people usually not connect SC-Apps to a Database? If they do so, how do they find out how to? Or does the above mentioned tutorial still work? A lot of gem-commands in the introduction seems to already differ from the official Sproutcore getting-started-guide.
SproutCore apps, as client-side "in-browser" apps, cannot connect directly to a MySQL or any other non-browser database. The application itself runs only within the user's browser (it's just HTML, CSS & JavaScript once built and deployed) and typically accesses any external data via XHR requests to an API or APIs. Therefore, you will need to create a service wrapper around your MySQL database in order for your client-side app to be able to load and update data.
There are two things worth mentioning. The first is that since the SproutCore app contains all of your user interface and a great deal of business logic, your API can be quite simple and should only return raw data (such as JSON). The second is that, I should mention that the client-server design, while more tedious to implement, is absolutely necessary in practice, because you can never trust the client side code, which is in the hands of a possibly nefarious user. Therefore, your API should also act as the final gatekeeper to validate all requests from the client.
This tutorial I found helped me a lot. Its very brief and demonstrates how to implement a very simple login-app, how to send post-requests (triggered by the login-button-action) to the backend-server and how to asynchronously process the response inside the Sproutcore-App:
http://hawkins.io/2011/04/sproutcore_login_tutorial/

technology behind html based chat systems like facebook and google talk

Can anyone give me a brief rundown of how Facebook and Google Talk work, are there persistent connections involved similar to the classic Java based chat systems whereby a server manages the connections and directs messages to the necessary destination or are they stateless? I'd like to create something similar to these but I'm not sure where to start and if I need to have custom services running on a server I may have to rethink my approach.
I'm not after a full-blown explanation but I am interested to know if there's a stateless approach that doesn't require services running on a server. If Html5 is required that's ok.
Both use the Jabber protocol: http://www.jabber.org/

Google Web Engine Api Channel vs Node.js+Socket.io

Please, help me to choose which one to use for my university project (I want to develop a shared multiuser whiteboard).
In particular, I am interested in the performance of message exchange between users and server using Channel API and Socket.io: which one is quicker and why?
I have implemented an initial version of the whiteboard http://jvyrushelloworld.appspot.com/ by following this tutorial: http://blog.greweb.fr/2012/03/30-minutes-to-make-a-multi-user-real-time-paint-with-play-2-framework-canvas-and-websocket/ The code I used is pretty much the same, except for the side and message exchange method: I used python, Google Channel API for message exchange; the guy who wrote the tutorial used Play 2 framework and Web sockets.
As you see, the web socket tutorial version works much faster (don't know if it is my mistake or google api channel performance issue). Of course, a lot of optimization can be done to improve the performance, but I wonder if it is worth to go on using Channel API for that project or is it better to switch to socket.io?

Database Driven iOS Apps

So this is more of a general question about apps and techniques rather than a specific code question...
When developing an larger app, how would a developer access lots of data from a website. The example I'll use is an app like Yelp. They have both a web-access site and an app, both share the same information. I would imagine that information like that is stored on the website via some sort of MySQL database and the iOS device access's it as needed based on the user's requests.
How might a developer writing an app start something like this? I assume you need to somehow securely tie the MySQL database to iOS and so on. I've seen a lot of techniques on the web, but they all seem very simple and not safe for a large scale app.
Any ideas would be awesome!
The key term you're looking for is "API" (Application Programming Interface).
A Yelp iOS app won't access Yelp's databases directly. There will be a layer (I simplify here somewhat) between that and the iOS app; this layer will provide a series of methods (the API) by which clients can make queries and potentially manipulate remote state.
A common API format is JSON over HTTP, and indeed, this is what the official Yelp API seems to be.
Good starting points would be the documentation for NSURLConnection and NSJSONSerialization, and the Yelp API documentation I link above.