I am struggling to differentiate between all of the different couch* technologies that are out there. I've been flip-flopping between using CouchDB and using Couchbase Server for an Android game that I'm developing and the lack of documentation is frustrating.
My understanding of the technologies:
CouchDB - A no-SQL database that has been under development for the last few years and is communicated with using a RESTful API. It has
been abandoned by its chief developers in favor of working on
Couchbase Server.
Couchbase Server - An enterprise solution to a large database where low-latency is paramount. It keeps 'hot' data in memory using
memcached but data is persisted to a CouchDB database.
Couchbase Mobile - A mobile implementation of CouchDB <--Legacy
TouchDB - A mobile implementation of CouchDB.
Ektorp - A framework that allows a developer to talk to and sync with a CouchDB instance from Java.
What's missing in my list is a framework to talk to Couchbase Server from Android (and eventually iOS).
Does such a framework exist?
I'm assuming that you don't want Couchbase Server on Android, but rather you want to have your Android app talk to a Couchbase Server instance on a remote server somewhere.
The primary interface for Couchbase Server is memcached, and so any memcached library for Android will work. If needed, any of the remaining Couch calls are simple HTTP calls.
To sync an application to Couchbase Server, typically an application built atop TouchDB, the framework you're seeking is Mobile Syncpoint as listed on the Couchbase wiki. It's an Open Source work in progress, but coordinates for dev mailing lists, and concepts link off of that wiki.
Typically you'd use Ektorp atop TouchDB, then use Mobile Syncpoint to sync to Couchbase Server running in a datacenter somewhere.
Related
I want Couchbase to first temporary store the data, and then automatically sync it with Server. How do I achieve this ?
For example, In note-making app, I add a note and Couchbase should automatically add it to the Server.
You're in luck! The requirement you've described is exactly how Couchbase Mobile works.
Couchbase Mobile is comprised of two parts:
Couchbase Lite: A stand-alone embedded database that you can use directly within your mobile app.
Sync Gateway: a synchronization mechanism that securely syncs data between mobile clients and server.
So, back to your question. In order to achieve what you're looking for you would first create an instance of your Couchbase Lite database. From there, as you would expect, you can perform basic CRUD operations, query data, etc. You can find more information on the built-in capabilities here:
iOS (Swift)
iOS (Obj-C)
Android (Java)
Xamarin (C#)
Once you've created an embedded database you can start replication (synchronization) on it by using the Sync Gateway integration that comes with the Couchbase.Lite and Couchbase.Lite.Enterprise SDK component for iOS, Android, or Xamarin.
I recommend checking out the following tutorials for using Couchbase Lite and Sync Gateway:
iOS: Data Sync Fundamentals
Android: Data Sync Fundamentals
Xamarin: Data Sync Fundamentals
You are looking for the Couchbase Sync Gateway: https://docs.couchbase.com/sync-gateway/2.1/index.html
It's possible to connect an Android application directly to a Couchbase server database?.
It's possible to get a Document from Couchbase's bucket and use it from an Android application?.
Thank you.
tl;dr: Use Sync Gateway.
Couchbase Sync Gateway is designed to be a web edge service that you use to access data. In the most typical scenario Sync Gateway connects to a back end Couchbase Server cluster.
You could in theory use one of the client libraries to access Couchbase Server directly. You really don't want to do this for several reasons.
The client libraries have different expectations around network latency and availability.
They don't currently (as of Couchbase Mobile 1.4) support the meta data needed for syncing.
You'd need to expose your server which raises your security risk profile
The system architecture has all this in mind, which is why it's designed the way it is.
Background
I have a EC2 instance with a RDS instance(MYSQL) associated with it.
I want to use a android app to execute queries on that MYSQL instance.The Android sdk of amazon does not support RDS.
Problem
How do I connect my android app with RDS instance?Is it possible to use RDS(MYSQL) with an android application without sdk support?
RDS is not a database engine. It's a service that manages the infrastructure for you that's required to maintain a highly available and fault tolerant database. It supports a number of different engines such as MySQL as you mentioned. Please read the docs for more information.
You need to connect to your RDS MySQL instance the same way you would connect to any MySQL database. Using a library that supports MySQL, and using the hostname, username and password for your database.
However, it's probably not the best design to have phone clients connecting to your database remotely. The best thing to do would be to put a REST API on AWS that interfaces with your database.
Having n users connected to your database from each handset using your app is probably a bad idea. It means you need to have more power in your database, greatly hinders your scalability and makes things less secure as the database is exposed to the internet. With an API in front of it, you can build a much more fault tolerant, scalable and solution.
The "cloud way" to build mobile apps is to (within reason) build your application logic on the cloud and simply have your client code connect to your API. This way you can spread to more platforms (eg. IOS, Web) much more easily as you won't have to manage separate application level code for each platform. You'll just need to manage code that integrates with your already existing API.
Take a look at this whitepaper. Ignore the web server tier and focus on the App Server and Database tiers. This is probably the best design to go by.
Background
I have a EC2 instance with a RDS instance(MYSQL) associated with it.
I want to use a android app to execute queries on that MYSQL instance.The Android sdk of amazon does not support RDS.
Problem
How do I connect my android app with RDS instance?Is it possible to use RDS(MYSQL) with an android application without sdk support?
RDS is not a database engine. It's a service that manages the infrastructure for you that's required to maintain a highly available and fault tolerant database. It supports a number of different engines such as MySQL as you mentioned. Please read the docs for more information.
You need to connect to your RDS MySQL instance the same way you would connect to any MySQL database. Using a library that supports MySQL, and using the hostname, username and password for your database.
However, it's probably not the best design to have phone clients connecting to your database remotely. The best thing to do would be to put a REST API on AWS that interfaces with your database.
Having n users connected to your database from each handset using your app is probably a bad idea. It means you need to have more power in your database, greatly hinders your scalability and makes things less secure as the database is exposed to the internet. With an API in front of it, you can build a much more fault tolerant, scalable and solution.
The "cloud way" to build mobile apps is to (within reason) build your application logic on the cloud and simply have your client code connect to your API. This way you can spread to more platforms (eg. IOS, Web) much more easily as you won't have to manage separate application level code for each platform. You'll just need to manage code that integrates with your already existing API.
Take a look at this whitepaper. Ignore the web server tier and focus on the App Server and Database tiers. This is probably the best design to go by.
I am developing an Android Application on Ionic framework and using Couch/Pouch DB. Can anyone suggest the hosting server on which I can host my application for best compatibility with the database.
AngularJS wrapper for PouchDB
How to code your CouchDb and PouchDb replication for mobile or web apps.
CouchDb Hosting Services:
Cloudant
Iris Couch
Couchappy
How to setup your own CouchDb hosting:
How To Install CouchDB and Futon on Ubuntu 12.04 - Digital Ocean
Secure CouchDB by using SSL/HTTPS
Docker + CouchDb:
Dockerizing a CouchDB Service
GitHub: Yet Another Dockerized CouchDB
Dockerized CouchDB 1.6.0 with stud SSL terminator
Check This link for hosting couchdb
https://www.iriscouch.com/
iriscouch provide couchdb hosting on cloud.It is free till your monthly bill is below 5$.
it is cost you based on storage allocated by couchdb data, http read and write request.
your serverside data will be in iriscouch, and it is also providing security for access data.
iriscouch is best if you are thinking to go with couchdb.