Couchbase Mobile brings the power of NoSQL to the edge. It is comprised of three components:
Couchbase Lite, an embedded, NoSQL JSON Document Style database for your mobile apps
Sync Gateway, an internet-facing synchronization mechanism that securely syncs data between mobile clients and server, and
Couchbase Server, a highly scalable, distributed NoSQL database platform
Couchbase Mobile supports flexible deployment models. You can deploy:
Couchbase Lite as a standalone embedded database within your mobile apps or,
Couchbase Lite enabled mobile clients with a Sync Gateway to synchronize data between your mobile clients or,
Couchbase Lite enabled clients with a Sync Gateway to sync data between mobile clients and the Couchbase Server, which can persist data in the cloud (public or private)
In this learning path you will get started with the Couchbase Lite Android SDK. You will learn how to get and insert documents using the key-value engine, query the database using the QueryBuilder engine, and learn how to sync information between your mobile app and a Couchbase Server using Sync Gateway.
Prerequisites
Before you get started you should take the following prerequisites into consideration:
Familiarity with building Android Apps with Java and Android Studio
Android device or emulator running API level 22 or above
JDK 8 (now embedded into Android Studio 4+)
curl HTTP client
You could use any HTTP client of your choice. But we will use curl in our tutorial. Mac OS Package Manager users can use homebrew. Windows Package Manager users can use winget.
Docker
We will be using Docker to run images of both Couchbase Server and the Sync Gateway — to download Docker, or for more information, see: Get Docker.
Agenda
Quickstart in Couchbase Lite with Android and Java
Quickstart in Couchbase Lite Query with Android and Java
Quickstart in Couchbase Lite Data Sync with Android and Java