Post on 06-Jul-2015
description
Couchbase Lite
Ana Baotić
NoSql
Specifics● Data not modeled in tabular relations● Typical structures: graph, tree, key-value pairs● Simpler design ● Horizontal scaling● Used for big data and availability applications
Drawbacks● Consistency ● Lack of standardized interfaces and full ACID support● Use of low level query languages
Database mechanisms
Documents (JSON) are building blocks, handled one at a time
● Reading– Key-based lookup mechanism– Client provides the key(s range)
● Writing– Key-based update mechanism– Documents are updated (low latency)
● Push and pull replication
● Conflict management support
Document content
Adding CouchBase Lite
Adding CouchBase Lite
Creating a database
Create, update, delete
Replication
● Key feature that enables document syncing– Pull, remote to local
– Push, local to remote
– Sync, configuration consisting of pull and push
● Continuous replication– Open connection, acts upon detected change
– Connectivity change aware!
– cannot get a marker on the map by an id
● One shot replication
– Active until changes are copied● Persistent replications vs non-persistent● Filters
Replication example
Demo app example
● Cloudant used for the data layer
– NoSql database as a service– RESTful API– https://cloudant.com/product/cloudant-features/
● GitHub repo
– https://github.com/abaotic/CouchBaseLite-Demo
Links● NoSql wiki
– http://en.wikipedia.org/wiki/NoSQL
● Couchbase tutorial
– http://docs.couchbase.com/couchbase-lite/cbl-android/cbl-android-1.0b2/#tutorial
● Cloudant server
– https://cloudant.com/
● CouchBase Lite Github repo
– https://github.com/couchbase/couchbase-lite-android
● CouchBase Lite demo
– https://github.com/abaotic/CouchBaseLite-Demo
Thank you!