This talk with demo was given at the EJUG Austria Java User Group in December 2013. Most of the slides shown here are introduction since the latter part focussed on UI and code demos.
Maintaining • Official Java SDK • Spymemcached • Spring-‐Data-‐Couchbase • @daschl on TwiCer • Core Team of NeCy.io • ContribuGng to Reactor and others
for many thing, but hard to scale RDBMS Scales Up Get a bigger, more complex server Users ApplicaUon Scales Out Just add more commodity web servers Users System Cost ApplicaUon Performance RelaUonal Database Web/App Server Tier System Cost ApplicaUon Performance Won’t scale beyond this point
Database Scales Out Cost and performance mirrors app Uer Users NoSQL Distributed Data Store Web/App Server Tier ApplicaUon Scales Out Just add more commodity web servers Users System Cost ApplicaUon Performance ApplicaUon Performance System Cost NoSQL Technology Scales Out
focused on distributed database technology and surrounding ecosystem • Supports both key-‐value and document-‐oriented use cases • All components are available under the Apache 2.0 Public License • Obtained as packaged so`ware in both enterprise and community ediUons.
On 24x365 Grow cluster without applicaUon changes, without downUme with a single click Consistent sub-‐millisecond read and write response Umes with consistent high throughput No downUme for so`ware upgrades, hardware maintenance, etc. Flexible Data Model JSON document model with no fixed schema. Couchbase Server Core Principles
Docs distributed evenly across servers • Each server stores both acGve and replica docs Only one server acUve at a Ume • Client library provides app with simple interface to database • Cluster map provides map to which server doc is on App never needs to know • App reads, writes, updates docs • MulGple app servers can access same document at same Gme User Configured Replica Count = 1 READ/WRITE/UPDATE ACTIVE Doc 5 Doc 2 Doc Doc Doc SERVER 1 ACTIVE Doc 4 Doc 7 Doc Doc Doc SERVER 2 Doc 8 ACTIVE Doc 1 Doc 2 Doc Doc Doc REPLICA Doc 4 Doc 1 Doc 8 Doc Doc Doc REPLICA Doc 6 Doc 3 Doc 2 Doc Doc Doc REPLICA Doc 7 Doc 9 Doc 5 Doc Doc Doc SERVER 3 Doc 6 APP SERVER 1 COUCHBASE Client Library CLUSTER MAP COUCHBASE Client Library CLUSTER MAP APP SERVER 2 Doc 9
User Configured Replica Count = 1 ACTIVE Doc 5 Doc 2 Doc Doc Doc SERVER 1 REPLICA Doc 4 Doc 1 Doc 8 Doc Doc Doc APP SERVER 1 COUCHBASE Client Library CLUSTER MAP COUCHBASE Client Library CLUSTER MAP APP SERVER 2 Doc 9 • Indexing work is distributed amongst nodes • Large data set possible • Parallelize the effort • Each node has index for data stored on it • Queries combine the results from required nodes ACTIVE Doc 5 Doc 2 Doc Doc Doc SERVER 2 REPLICA Doc 4 Doc 1 Doc 8 Doc Doc Doc Doc 9 ACTIVE Doc 5 Doc 2 Doc Doc Doc SERVER 3 REPLICA Doc 4 Doc 1 Doc 8 Doc Doc Doc Doc 9 Query
SERVER 2 Couchbase Server – San Francisco SERVER 3 SERVER 1 SERVER 2 Couchbase Server – New York OpGmisGc replicaGon Per replicaGon Tunable Parameters OpGmized protocol based on memcached Reliability and performance at scale Cross Data Center ReplicaGon (XDCR)
• Fully asynchronous (Futures & Callbacks) • Builds on the (very mature) Spymemcached Library • Does the heavy liping for you Knows the cluster topology „Routes“ operaUons to target servers Abstracts protocol semanUcs (memcache, h]p,...)
driven h]ps://github.com/mathieuancelin/play2-‐couchbase • Working on: Hibernate OGM support N1QL Query IntegraUon Next GeneraUon SDKs (2.0 API and performance)