SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
From 0 to syncing
in 30 min
Ma#hew	
  Revell	
  @ma#hewrevell	
  
Philipp	
  Fehre	
  @ischi
Introduction Couchbase
Couchbase 101
• Distributed	
  key-­‐value	
  store	
  
• Create	
  secondary	
  indexed	
  views	
  using	
  Map	
  Reduce	
  
• AutomaBc	
  key-­‐based	
  parBoning	
  
• Integrated	
  memcached	
  caching	
  layer	
  
• Strongly	
  consistent	
  within	
  a	
  cluster	
  
• Cross-­‐data	
  centre	
  replicaBon	
  
• Intelligent	
  SDKs
Couchbase	
  Organiza1on
• Couchbase	
  operates	
  like	
  a	
  Key-­‐Value	
  Document	
  Store	
  
• Key	
  is	
  a	
  UTF-­‐8	
  string	
  up	
  to	
  256	
  Bytes	
  
• Values	
  can	
  be:	
  	
  
-­‐ Simple	
  Datatypes:	
  strings,	
  numbers,	
  date1me,	
  boolean,	
  and	
  binary	
  
data	
  can	
  be	
  stored	
  -­‐-­‐	
  they	
  are	
  stored	
  as	
  Base64	
  encoded	
  strings	
  
-­‐ Complex	
  Datatypes:	
  dic1onaries/hashes,	
  arrays/lists,	
  can	
  be	
  stored	
  in	
  
JSON	
  format	
  (simple	
  lists	
  can	
  be	
  string	
  based	
  with	
  delimiter)	
  
-­‐ JSON	
  is	
  a	
  special	
  class	
  of	
  string	
  with	
  a	
  specific	
  format	
  for	
  encoding	
  
simple	
  and	
  complex	
  data	
  structures	
  
• Schema	
  is	
  unenforced	
  and	
  implicit,	
  schema	
  changes	
  are	
  programma1c,	
  
done	
  online,	
  and	
  can	
  vary	
  from	
  Document	
  to	
  Document
Couchbase Server 2.0 Architecture
New	
  Persistence	
  Layer
storage	
  interface
Couchbase	
  EP	
  Engine
11210	
  
Memcapable	
  	
  2.0
Moxi
11211	
  
Memcapable	
  	
  1.0
Object-­‐level	
  Cache
Disk	
  Persistence
8092	
  
Query	
  API
Query	
  Engine
HTTP	
  
8091
Erlang	
  port	
  mapper	
  
4369
Distributed	
  Erlang	
  
21100	
  -­‐	
  21199
Heartbeat
Process	
  monitor
Global	
  singleton	
  supervisor
Configura1on	
  manager
on	
  each	
  node
Rebalance	
  orchestrator
Node	
  health	
  monitor
one	
  per	
  cluster
vBucket	
  state	
  and	
  replica1on	
  manager
h#p
REST	
  management	
  API/Web	
  UI
Erlang/OTP
Server/Cluster	
  
Management	
  &	
  
CommunicaBon	
  
(Erlang)
RAM	
  Cache,	
  Indexing	
  
&	
  Persistence	
  
Management	
  
(C)
Supported SDK's
www.couchbase.com/communiBes
• Each	
  supported	
  SDK	
  page	
  has	
  instruc1ons	
  for	
  setup	
  
• PHP,	
  Ruby,	
  and	
  Python	
  clients	
  are	
  wrappers	
  around	
  libcouchbase	
  C	
  
library,	
  so	
  libcouchbase	
  must	
  be	
  installed	
  first	
  
• For	
  other	
  community	
  clients,	
  click	
  on	
  "All	
  Clients"	
  on	
  lea	
  nav,	
  scroll	
  down	
  
the	
  page	
  and	
  you	
  can	
  see	
  clients	
  for	
  Go,	
  Erlang,	
  Clojure,	
  TCL,	
  Perl	
  and	
  
others.
‹#›Couchbase, Inc. Confidential
Easy Scalability
XDCR
Single Node
Type
No Manual Sharding
!
Database manages
data movement to
scale out -
Not the user
Database handles
propagation of
updates to scale
across clusters and
geos
!
Provides disaster
recover / data
locality
Hugely simplifies
management of
clusters
!
Easy to scale clusters
by adding any # of
nodes
FEATURES
Auto Sharding
Couchbase, Inc. Confidential
‹#›Couchbase, Inc. Confidential
Consistent, High Performance
Fine
Grained
Locking
Built-in
Cache
Hash
Partitioning
Allows high
concurrency and
in turn high
throughput via
highly granular
latches
No need of
separate cache
layer
!
Database
manages
actively used
data
Uniform data
distribution
!
Uniform load
distribution – 

NO hotspots
PERFORMANCE
Support a large
number of users
needed for
interactive apps
Massive
Concurrent
Connections
FEATURES
Couchbase, Inc. Confidential
‹#›Couchbase, Inc. Confidential
Always on 24x7 Capability

All admin operations
online
!
•Compaction
•Indexing
•Rebalance
•Backup & Restore
•High availability using
in-memory replication
•Auto or manual
failover
•XDCR for disaster
recovery
Online
administrative
operations
HA via
Replication
DR via XDCR
FEATURES
Online DB upgrades
and HW maintenance
!
Optimized swap
operation to replace
nodes
Online DB
upgrades and
maintenance
Couchbase, Inc. Confidential
‹#›Couchbase, Inc. Confidential
Flexible Data Model
Represent data as
objects instead of
shredding into rows
and columns
!
Create indexes on any
attribute of the
document
Each document can
have a different
structure
!
Easy to change data
without database
changes and downtime
Maintains Native
object
representation
Handles
constantly
changing data
JSON
JSON
JSON
JSONJSON
FEATURES
Data with mixed
structure better
managed via JSON in a
document DB than an
RDBMS
Schema-less for
structured / un/
semi- structured
data
Couchbase, Inc. Confidential
‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential
Couchbase Server Cluster
Basic Operation
User Configured Replica Count = 1
Read/write/update
Active
SERVER 1
Active
SERVER 2
Active
SERVER 3
App Server 1
COUCHBASE Client Library
!CLUSTER MAP
COUCHBASE Client Library
!CLUSTER MAP
App Server 2
Doc 5
Doc 2
Doc 9
Doc
Doc
Doc
Doc 4
Doc 7
Doc 8
Doc
Doc
Doc
Doc 1
Doc 3
Doc 6
Doc
Doc
Doc
Replica Replica Replica
Doc 4
Doc 1
Doc 8
Doc
Doc
Doc
Doc 6
Doc 3
Doc 2
Doc
Doc
Doc
Doc 7
Doc 9
Doc 5
Doc
Doc
Doc
• Docs distributed evenly across
servers
• Each server stores both active
and replica docs
Only one server active at a time
• 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
• Multiple app servers can access
same document at same time
‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential
Add Nodes to Cluster
SERVER 4 SERVER 5
Replica
Active
Replica
Active
Read/write/update
App Server 1
COUCHBASE Client Library
!CLUSTER MAP
COUCHBASE Client Library
!CLUSTER MAP
App Server 2
User Configured Replica Count = 1
Couchbase Server Cluster
Active
SERVER 1
Doc 5
Doc 2
Doc 9
Doc
Doc
Doc
Replica
Doc 4
Doc 1
Doc 8
Doc
Doc
Doc
Active
SERVER 2
Doc 4
Doc 7
Doc 8
Doc
Doc
Doc
Replica
Doc 6
Doc 3
Doc 2
Doc
Doc
Doc
Active
SERVER 3
Doc 1
Doc 3
Doc 6
Doc
Doc
Doc
Replica
Doc 7
Doc 9
Doc 5
Doc
Doc
Doc
Read/write/update
• Two servers added
with

one-click operation
• Docs automatically
rebalance across
cluster
Even distribution of
docs
Minimum doc
movement
• Cluster map updated
• App database 

calls now distributed 

over larger number
of servers

‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential
Fail Over Node
User Configured Replica Count = 1
SERVER 4 SERVER 5
Replica
Active
Replica
Active
App Server 1
COUCHBASE Client Library
!CLUSTER MAP
COUCHBASE Client Library
!CLUSTER MAP
App Server 2
Couchbase Server Cluster
Active
SERVER 1
Doc 5
Doc 2
Doc 9Doc
Doc
Doc
Replica
Doc 4
Doc 1
Doc 8Doc
Doc
Doc
Active
SERVER 2
Doc 4
Doc 7 Doc 8
Doc
Doc Doc
Replica
Doc 6
Doc 3 Doc 2
Doc
Doc Doc
Active
SERVER 3
Doc 1
Doc 3
Doc 6Doc
Doc
Doc
Replica
Doc 7
Doc 9
Doc 5Doc
Doc
Doc
• App servers accessing
docs
• Requests to Server 3
fail
• Cluster detects
server failed
– Promotes replicas of
docs to active
– Updates cluster map
• Requests for docs
now go to
appropriate server
• Typically rebalance 

would follow
Doc 1 Doc 3
Doc
What is Couchbase Lite
JSON	
  Anywhere
On In DataIn Data
TradiBonal	
  Mobile
ApplicaBon	
  Server
REST	
  Services
Complex
Complex Sync
Code While Offline
or Cannot Use App
While Offline
Construction/
Deconstruction of
JSON
RDBMS Style
Local Storage
Mobile	
  DBaaS
DBaaS
REST	
  Services
RDBMS Style
Local Storage
Complex Sync Code
Scaling
Simple
JSON	
  Anywhere	
  -­‐	
  Automated	
  Sync
Synchronization
Automated when
Connectivity Present
Couchbase	
  Lite
The	
  only	
  NoSQL	
  Database	
  for	
  Mobile	
  Devices
Couchbase*
Lite**
iOS*
Couchbase*
Lite**
Android*
Lite
Features	
  
Ultra-­‐lightweight,	
  secure	
  JSON	
  database	
  	
  
Na1ve	
  support	
  for	
  iOS,	
  Android	
  and	
  
REST/HTML5	
  
Powerful	
  conflict	
  resolu1on	
  
Automated	
  Sync	
  
Couchbase	
  Lite
The	
  only	
  NoSQL	
  Database	
  for	
  Mobile	
  Devices
Couchbase*
Lite**
iOS*
Couchbase*
Lite**
Android*
Lite
Features	
  
Ultra-­‐lightweight,	
  secure	
  JSON	
  database	
  	
  
Na1ve	
  support	
  for	
  iOS,	
  Android	
  and	
  
REST/HTML5	
  
Powerful	
  conflict	
  resolu1on	
  
Automated	
  Sync	
  
Couchbase	
  Lite	
  Features
• Use	
  JSON	
  in	
  your	
  Mobile	
  App	
  Data	
  Tier	
  
• Always	
  Work	
  with	
  Local	
  Data	
  on	
  Device	
  
• Modify	
  schema	
  dynamically,	
  super	
  flexible	
  
• When	
  Connected:	
  	
  Create	
  New	
  Data	
  and	
  Change	
  Documents,	
  they	
  
Sync	
  AutomaBcally	
  
• When	
  Not	
  Connected:	
  Work	
  with	
  solid	
  local	
  NoSQL	
  database	
  
• Powerful	
  conflict	
  resoluBon	
  features
The Couch syncing history
Remember this?
CouchDB replication
• Uses	
  the	
  CouchDB	
  replicaBon	
  protocol	
  
• ReplicaBon	
  via	
  HTTP	
  
• Proven	
  to	
  work	
  nicely
Couchbase Sync Gateway
CouchDB	
  replica1on	
  with	
  Couchbase
So what can we do
• Handle	
  user	
  authenBcaBon	
  
• Handle	
  document	
  channels	
  
• Synchronise	
  mulBple	
  devices	
  /	
  applicaBons
channel()
Channels	
  organize	
  what	
  JSON	
  Documents	
  are	
  synchronized	
  
down	
  to	
  which	
  Users
User	
  A
User	
  B
User	
  C
JSON
doc.channels	
  :	
  “food”
JSON
doc.channels	
  :	
  [	
  “food”,	
  “sports”	
  ]
JSON
doc.channels	
  :	
  [	
  “sports”,	
  “travel”	
  ]
channels:	
  food
channels:	
  sports
channels:	
  food,	
  travel
User	
  D	
  creates	
  Content	
  
with	
  Channel	
  associaBon
These	
  Users	
  Subscribed	
  	
  
to	
  Content	
  Channels
User Authentication?
• Facebook	
  
• Mozilla	
  Persona	
  
• OAuth	
  
• Username	
  /	
  Password
Setting everything up
• Install	
  Sync	
  Gateway	
  
• Setup	
  a	
  Sync	
  Gateway	
  config	
  
• Setup	
  the	
  Couchbase	
  Bucket	
  to	
  use	
  
• Install	
  CouchbaseLite	
  (Cocoa	
  Pods	
  anybody?)
DEMO
Ok that was easy, right?
Let’s build a TodoApp
What do we need?
• Manage	
  lists	
  and	
  tasks	
  
• A	
  datastore	
  wired	
  to	
  a	
  view	
  
• User	
  login	
  
• Offline	
  funcBonality	
  
• Cross	
  device	
  usablilty
Demo
Models…
@interface Titled : CBLModel
!
+ (NSString*) docType;
!
- (instancetype) initInDatabase: (CBLDatabase*)database
withTitle: (NSString*)title;
!
@property (copy) NSString* title;
@property (readonly) NSDate* created_at;
!
@end
Listing lists…
// Returns a query for all the lists in a database.
+ (CBLQuery*) queryListsInDatabase: (CBLDatabase*)db {
CBLView* view = [db viewNamed: @"lists"];
if (!view.mapBlock) {
[view setMapBlock: MAPBLOCK({
if ([doc[@"type"] isEqualToString:kListDocType])
emit(doc[@"title"], nil);
}) reduceBlock: nil version: @"1"];
}
return [view createQuery];
}
Setting up the model
[[self.database modelFactory] registerClass:[List class]
forDocumentType:@"list"];
Wire up the Datastore
• Implements	
  a	
  datasource	
  for	
  TableView	
  
• Monitors	
  any	
  changes
Wire up the Datastore
#import <UIKit/UIKit.h>
#import <Couchbaselite/CBLUITableSource.h>
!
@class DetailViewController;
!
@interface MasterViewController : UIViewController
<CBLUITableDelegate>
!
@property (strong, nonatomic) DetailViewController
*detailViewController;
@property (nonatomic) IBOutlet CBLUITableSource* dataSource;
@property (strong, nonatomic) IBOutlet UITableView *tableView;
!
@end
User Login
• Handled	
  via	
  Facebook	
  
• Na?ve	
  Social	
  Login	
  handling	
  in	
  iOS
Setting up Sync
- (void)defineSync {
pull = [_database createPullReplication:_remoteURL];
pull.continuous = YES;
push = [_database createPushReplication:_remoteURL];
push.continuous = YES;
[self listenForReplicationEvents: push];
[self listenForReplicationEvents: pull];
[_authenticator registerCredentialsWithReplications:
@[pull, push]];
}
Questions?
Links
• CouchbaseMobile	
  
• Code	
  for	
  TodoLite	
  
• Code	
  for	
  Sync	
  Hello	
  World	
  
• Introduc?on	
  to	
  Sync	
  Gateway	
  Video	
  
• Sync	
  Gateway	
  Homebrew	
  Formula

Weitere ähnliche Inhalte

Was ist angesagt?

Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017Adeesh Fulay
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Bob Pusateri
 
hbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBasehbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBaseMichael Stack
 
Newsql 2015-150213024325-conversion-gate01
Newsql 2015-150213024325-conversion-gate01Newsql 2015-150213024325-conversion-gate01
Newsql 2015-150213024325-conversion-gate01Jagadeesha DG
 
Membase Introduction
Membase IntroductionMembase Introduction
Membase IntroductionMembase
 
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3Kaseya
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesAshnikbiz
 
Membase East Coast Meetups
Membase East Coast MeetupsMembase East Coast Meetups
Membase East Coast MeetupsMembase
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Bob Pusateri
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase
 
Reducing Microservice Complexity with Kafka and Reactive Streams
Reducing Microservice Complexity with Kafka and Reactive StreamsReducing Microservice Complexity with Kafka and Reactive Streams
Reducing Microservice Complexity with Kafka and Reactive Streamsjimriecken
 
Zarafa SummerCamp 2012 - Exchange Web Services, technical information
Zarafa SummerCamp 2012 - Exchange Web Services, technical informationZarafa SummerCamp 2012 - Exchange Web Services, technical information
Zarafa SummerCamp 2012 - Exchange Web Services, technical informationZarafa
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformMongoDB
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityColin Charles
 
Event Driven Architectures with Apache Kafka on Heroku
Event Driven Architectures with Apache Kafka on HerokuEvent Driven Architectures with Apache Kafka on Heroku
Event Driven Architectures with Apache Kafka on HerokuHeroku
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing InfinispanPT.JUG
 
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyCassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyDataStax Academy
 

Was ist angesagt? (20)

Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
 
hbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBasehbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBase
 
Newsql 2015-150213024325-conversion-gate01
Newsql 2015-150213024325-conversion-gate01Newsql 2015-150213024325-conversion-gate01
Newsql 2015-150213024325-conversion-gate01
 
Inexpensive storage
Inexpensive storageInexpensive storage
Inexpensive storage
 
Membase Introduction
Membase IntroductionMembase Introduction
Membase Introduction
 
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3
Kaseya Connect 2012 - WHAT'S NEW IN KASEYA 6.3
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional Databases
 
Membase East Coast Meetups
Membase East Coast MeetupsMembase East Coast Meetups
Membase East Coast Meetups
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon Valley
 
Reducing Microservice Complexity with Kafka and Reactive Streams
Reducing Microservice Complexity with Kafka and Reactive StreamsReducing Microservice Complexity with Kafka and Reactive Streams
Reducing Microservice Complexity with Kafka and Reactive Streams
 
Zarafa SummerCamp 2012 - Exchange Web Services, technical information
Zarafa SummerCamp 2012 - Exchange Web Services, technical informationZarafa SummerCamp 2012 - Exchange Web Services, technical information
Zarafa SummerCamp 2012 - Exchange Web Services, technical information
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media Platform
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
Sum209
Sum209Sum209
Sum209
 
Event Driven Architectures with Apache Kafka on Heroku
Event Driven Architectures with Apache Kafka on HerokuEvent Driven Architectures with Apache Kafka on Heroku
Event Driven Architectures with Apache Kafka on Heroku
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing Infinispan
 
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyCassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
 

Ähnlich wie From 0 to syncing

Introduction to couchbase
Introduction to couchbaseIntroduction to couchbase
Introduction to couchbaseDipti Borkar
 
Azure DocumentDB Overview
Azure DocumentDB OverviewAzure DocumentDB Overview
Azure DocumentDB OverviewAndrew Liu
 
How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014Dipti Borkar
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on AndroidPhilipp Fehre
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
 
Developing Applications with Go and NoSQL
Developing Applications with Go and NoSQLDeveloping Applications with Go and NoSQL
Developing Applications with Go and NoSQLNic Raboy
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStackTesora
 
Couchbase b jmeetup
Couchbase b jmeetupCouchbase b jmeetup
Couchbase b jmeetupmysqlops
 
An introduction to Pincaster
An introduction to PincasterAn introduction to Pincaster
An introduction to PincasterFrank Denis
 
Amazon AWS vs Azure Cloud vs Kubernetes
Amazon AWS vs Azure Cloud vs KubernetesAmazon AWS vs Azure Cloud vs Kubernetes
Amazon AWS vs Azure Cloud vs KubernetesStridely Solutions
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architectureShalva Usubov
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackMatt Lord
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octParadigma Digital
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Bob Pusateri
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...confluent
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container EcosystemVinay Rao
 
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...ssuserd3a367
 

Ähnlich wie From 0 to syncing (20)

Introduction to couchbase
Introduction to couchbaseIntroduction to couchbase
Introduction to couchbase
 
Big data stores
Big data  storesBig data  stores
Big data stores
 
NoSQL_Night
NoSQL_NightNoSQL_Night
NoSQL_Night
 
Azure DocumentDB Overview
Azure DocumentDB OverviewAzure DocumentDB Overview
Azure DocumentDB Overview
 
How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on Android
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
Developing Applications with Go and NoSQL
Developing Applications with Go and NoSQLDeveloping Applications with Go and NoSQL
Developing Applications with Go and NoSQL
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
 
Couchbase b jmeetup
Couchbase b jmeetupCouchbase b jmeetup
Couchbase b jmeetup
 
An introduction to Pincaster
An introduction to PincasterAn introduction to Pincaster
An introduction to Pincaster
 
Amazon AWS vs Azure Cloud vs Kubernetes
Amazon AWS vs Azure Cloud vs KubernetesAmazon AWS vs Azure Cloud vs Kubernetes
Amazon AWS vs Azure Cloud vs Kubernetes
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architecture
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4oct
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container Ecosystem
 
MongoDB
MongoDBMongoDB
MongoDB
 
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
 

Mehr von Philipp Fehre

node.js and native code extensions by example
node.js and native code extensions by examplenode.js and native code extensions by example
node.js and native code extensions by examplePhilipp Fehre
 
Jruby a Pi and a database
Jruby a Pi and a databaseJruby a Pi and a database
Jruby a Pi and a databasePhilipp Fehre
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQLPhilipp Fehre
 
You got schema in my json
You got schema in my jsonYou got schema in my json
You got schema in my jsonPhilipp Fehre
 
What is new in Riak 2.0
What is new in Riak 2.0What is new in Riak 2.0
What is new in Riak 2.0Philipp Fehre
 
Ember background basics
Ember background basicsEmber background basics
Ember background basicsPhilipp Fehre
 
Ember learn from Riak Control
Ember learn from Riak ControlEmber learn from Riak Control
Ember learn from Riak ControlPhilipp Fehre
 
Something about node basics
Something about node basicsSomething about node basics
Something about node basicsPhilipp Fehre
 
A little more advanced node
A little more advanced nodeA little more advanced node
A little more advanced nodePhilipp Fehre
 
Something about node in the realworld
Something about node in the realworldSomething about node in the realworld
Something about node in the realworldPhilipp Fehre
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.jsPhilipp Fehre
 
PUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY RiakPUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY RiakPhilipp Fehre
 
Campfire bot lightning talk
Campfire bot lightning talkCampfire bot lightning talk
Campfire bot lightning talkPhilipp Fehre
 
Lighting fast rails with zeus
Lighting fast rails with zeusLighting fast rails with zeus
Lighting fast rails with zeusPhilipp Fehre
 
JavaScript frontend testing from failure to good to great
JavaScript frontend testing from failure to good to greatJavaScript frontend testing from failure to good to great
JavaScript frontend testing from failure to good to greatPhilipp Fehre
 

Mehr von Philipp Fehre (18)

node.js and native code extensions by example
node.js and native code extensions by examplenode.js and native code extensions by example
node.js and native code extensions by example
 
Jruby a Pi and a database
Jruby a Pi and a databaseJruby a Pi and a database
Jruby a Pi and a database
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQL
 
You got schema in my json
You got schema in my jsonYou got schema in my json
You got schema in my json
 
What is new in Riak 2.0
What is new in Riak 2.0What is new in Riak 2.0
What is new in Riak 2.0
 
Ember background basics
Ember background basicsEmber background basics
Ember background basics
 
Ember learn from Riak Control
Ember learn from Riak ControlEmber learn from Riak Control
Ember learn from Riak Control
 
Testing tdd jasmine
Testing tdd jasmineTesting tdd jasmine
Testing tdd jasmine
 
Testing tdd dom
Testing tdd domTesting tdd dom
Testing tdd dom
 
Something about node basics
Something about node basicsSomething about node basics
Something about node basics
 
A little more advanced node
A little more advanced nodeA little more advanced node
A little more advanced node
 
Something about node in the realworld
Something about node in the realworldSomething about node in the realworld
Something about node in the realworld
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.js
 
PUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY RiakPUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY Riak
 
Campfire bot lightning talk
Campfire bot lightning talkCampfire bot lightning talk
Campfire bot lightning talk
 
Lighting fast rails with zeus
Lighting fast rails with zeusLighting fast rails with zeus
Lighting fast rails with zeus
 
JavaScript frontend testing from failure to good to great
JavaScript frontend testing from failure to good to greatJavaScript frontend testing from failure to good to great
JavaScript frontend testing from failure to good to great
 
Network with node
Network with nodeNetwork with node
Network with node
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

From 0 to syncing

  • 1. From 0 to syncing in 30 min Ma#hew  Revell  @ma#hewrevell   Philipp  Fehre  @ischi
  • 3. Couchbase 101 • Distributed  key-­‐value  store   • Create  secondary  indexed  views  using  Map  Reduce   • AutomaBc  key-­‐based  parBoning   • Integrated  memcached  caching  layer   • Strongly  consistent  within  a  cluster   • Cross-­‐data  centre  replicaBon   • Intelligent  SDKs
  • 4. Couchbase  Organiza1on • Couchbase  operates  like  a  Key-­‐Value  Document  Store   • Key  is  a  UTF-­‐8  string  up  to  256  Bytes   • Values  can  be:     -­‐ Simple  Datatypes:  strings,  numbers,  date1me,  boolean,  and  binary   data  can  be  stored  -­‐-­‐  they  are  stored  as  Base64  encoded  strings   -­‐ Complex  Datatypes:  dic1onaries/hashes,  arrays/lists,  can  be  stored  in   JSON  format  (simple  lists  can  be  string  based  with  delimiter)   -­‐ JSON  is  a  special  class  of  string  with  a  specific  format  for  encoding   simple  and  complex  data  structures   • Schema  is  unenforced  and  implicit,  schema  changes  are  programma1c,   done  online,  and  can  vary  from  Document  to  Document
  • 5. Couchbase Server 2.0 Architecture New  Persistence  Layer storage  interface Couchbase  EP  Engine 11210   Memcapable    2.0 Moxi 11211   Memcapable    1.0 Object-­‐level  Cache Disk  Persistence 8092   Query  API Query  Engine HTTP   8091 Erlang  port  mapper   4369 Distributed  Erlang   21100  -­‐  21199 Heartbeat Process  monitor Global  singleton  supervisor Configura1on  manager on  each  node Rebalance  orchestrator Node  health  monitor one  per  cluster vBucket  state  and  replica1on  manager h#p REST  management  API/Web  UI Erlang/OTP Server/Cluster   Management  &   CommunicaBon   (Erlang) RAM  Cache,  Indexing   &  Persistence   Management   (C)
  • 6. Supported SDK's www.couchbase.com/communiBes • Each  supported  SDK  page  has  instruc1ons  for  setup   • PHP,  Ruby,  and  Python  clients  are  wrappers  around  libcouchbase  C   library,  so  libcouchbase  must  be  installed  first   • For  other  community  clients,  click  on  "All  Clients"  on  lea  nav,  scroll  down   the  page  and  you  can  see  clients  for  Go,  Erlang,  Clojure,  TCL,  Perl  and   others.
  • 7. ‹#›Couchbase, Inc. Confidential Easy Scalability XDCR Single Node Type No Manual Sharding ! Database manages data movement to scale out - Not the user Database handles propagation of updates to scale across clusters and geos ! Provides disaster recover / data locality Hugely simplifies management of clusters ! Easy to scale clusters by adding any # of nodes FEATURES Auto Sharding Couchbase, Inc. Confidential
  • 8. ‹#›Couchbase, Inc. Confidential Consistent, High Performance Fine Grained Locking Built-in Cache Hash Partitioning Allows high concurrency and in turn high throughput via highly granular latches No need of separate cache layer ! Database manages actively used data Uniform data distribution ! Uniform load distribution – 
 NO hotspots PERFORMANCE Support a large number of users needed for interactive apps Massive Concurrent Connections FEATURES Couchbase, Inc. Confidential
  • 9. ‹#›Couchbase, Inc. Confidential Always on 24x7 Capability
 All admin operations online ! •Compaction •Indexing •Rebalance •Backup & Restore •High availability using in-memory replication •Auto or manual failover •XDCR for disaster recovery Online administrative operations HA via Replication DR via XDCR FEATURES Online DB upgrades and HW maintenance ! Optimized swap operation to replace nodes Online DB upgrades and maintenance Couchbase, Inc. Confidential
  • 10. ‹#›Couchbase, Inc. Confidential Flexible Data Model Represent data as objects instead of shredding into rows and columns ! Create indexes on any attribute of the document Each document can have a different structure ! Easy to change data without database changes and downtime Maintains Native object representation Handles constantly changing data JSON JSON JSON JSONJSON FEATURES Data with mixed structure better managed via JSON in a document DB than an RDBMS Schema-less for structured / un/ semi- structured data Couchbase, Inc. Confidential
  • 11. ‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential Couchbase Server Cluster Basic Operation User Configured Replica Count = 1 Read/write/update Active SERVER 1 Active SERVER 2 Active SERVER 3 App Server 1 COUCHBASE Client Library !CLUSTER MAP COUCHBASE Client Library !CLUSTER MAP App Server 2 Doc 5 Doc 2 Doc 9 Doc Doc Doc Doc 4 Doc 7 Doc 8 Doc Doc Doc Doc 1 Doc 3 Doc 6 Doc Doc Doc Replica Replica Replica Doc 4 Doc 1 Doc 8 Doc Doc Doc Doc 6 Doc 3 Doc 2 Doc Doc Doc Doc 7 Doc 9 Doc 5 Doc Doc Doc • Docs distributed evenly across servers • Each server stores both active and replica docs Only one server active at a time • 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 • Multiple app servers can access same document at same time
  • 12. ‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential Add Nodes to Cluster SERVER 4 SERVER 5 Replica Active Replica Active Read/write/update App Server 1 COUCHBASE Client Library !CLUSTER MAP COUCHBASE Client Library !CLUSTER MAP App Server 2 User Configured Replica Count = 1 Couchbase Server Cluster Active SERVER 1 Doc 5 Doc 2 Doc 9 Doc Doc Doc Replica Doc 4 Doc 1 Doc 8 Doc Doc Doc Active SERVER 2 Doc 4 Doc 7 Doc 8 Doc Doc Doc Replica Doc 6 Doc 3 Doc 2 Doc Doc Doc Active SERVER 3 Doc 1 Doc 3 Doc 6 Doc Doc Doc Replica Doc 7 Doc 9 Doc 5 Doc Doc Doc Read/write/update • Two servers added with
 one-click operation • Docs automatically rebalance across cluster Even distribution of docs Minimum doc movement • Cluster map updated • App database 
 calls now distributed 
 over larger number of servers

  • 13. ‹#›Couchbase, Inc. ConfidentialCouchbase, Inc. Confidential Fail Over Node User Configured Replica Count = 1 SERVER 4 SERVER 5 Replica Active Replica Active App Server 1 COUCHBASE Client Library !CLUSTER MAP COUCHBASE Client Library !CLUSTER MAP App Server 2 Couchbase Server Cluster Active SERVER 1 Doc 5 Doc 2 Doc 9Doc Doc Doc Replica Doc 4 Doc 1 Doc 8Doc Doc Doc Active SERVER 2 Doc 4 Doc 7 Doc 8 Doc Doc Doc Replica Doc 6 Doc 3 Doc 2 Doc Doc Doc Active SERVER 3 Doc 1 Doc 3 Doc 6Doc Doc Doc Replica Doc 7 Doc 9 Doc 5Doc Doc Doc • App servers accessing docs • Requests to Server 3 fail • Cluster detects server failed – Promotes replicas of docs to active – Updates cluster map • Requests for docs now go to appropriate server • Typically rebalance 
 would follow Doc 1 Doc 3 Doc
  • 15. JSON  Anywhere On In DataIn Data
  • 16. TradiBonal  Mobile ApplicaBon  Server REST  Services Complex Complex Sync Code While Offline or Cannot Use App While Offline Construction/ Deconstruction of JSON RDBMS Style Local Storage
  • 17. Mobile  DBaaS DBaaS REST  Services RDBMS Style Local Storage Complex Sync Code Scaling Simple
  • 18. JSON  Anywhere  -­‐  Automated  Sync Synchronization Automated when Connectivity Present
  • 19. Couchbase  Lite The  only  NoSQL  Database  for  Mobile  Devices Couchbase* Lite** iOS* Couchbase* Lite** Android* Lite Features   Ultra-­‐lightweight,  secure  JSON  database     Na1ve  support  for  iOS,  Android  and   REST/HTML5   Powerful  conflict  resolu1on   Automated  Sync  
  • 20. Couchbase  Lite The  only  NoSQL  Database  for  Mobile  Devices Couchbase* Lite** iOS* Couchbase* Lite** Android* Lite Features   Ultra-­‐lightweight,  secure  JSON  database     Na1ve  support  for  iOS,  Android  and   REST/HTML5   Powerful  conflict  resolu1on   Automated  Sync  
  • 21. Couchbase  Lite  Features • Use  JSON  in  your  Mobile  App  Data  Tier   • Always  Work  with  Local  Data  on  Device   • Modify  schema  dynamically,  super  flexible   • When  Connected:    Create  New  Data  and  Change  Documents,  they   Sync  AutomaBcally   • When  Not  Connected:  Work  with  solid  local  NoSQL  database   • Powerful  conflict  resoluBon  features
  • 22. The Couch syncing history
  • 24. CouchDB replication • Uses  the  CouchDB  replicaBon  protocol   • ReplicaBon  via  HTTP   • Proven  to  work  nicely
  • 25. Couchbase Sync Gateway CouchDB  replica1on  with  Couchbase
  • 26. So what can we do • Handle  user  authenBcaBon   • Handle  document  channels   • Synchronise  mulBple  devices  /  applicaBons
  • 27. channel() Channels  organize  what  JSON  Documents  are  synchronized   down  to  which  Users User  A User  B User  C JSON doc.channels  :  “food” JSON doc.channels  :  [  “food”,  “sports”  ] JSON doc.channels  :  [  “sports”,  “travel”  ] channels:  food channels:  sports channels:  food,  travel User  D  creates  Content   with  Channel  associaBon These  Users  Subscribed     to  Content  Channels
  • 28. User Authentication? • Facebook   • Mozilla  Persona   • OAuth   • Username  /  Password
  • 29. Setting everything up • Install  Sync  Gateway   • Setup  a  Sync  Gateway  config   • Setup  the  Couchbase  Bucket  to  use   • Install  CouchbaseLite  (Cocoa  Pods  anybody?)
  • 30. DEMO
  • 31.
  • 32. Ok that was easy, right?
  • 33. Let’s build a TodoApp
  • 34. What do we need? • Manage  lists  and  tasks   • A  datastore  wired  to  a  view   • User  login   • Offline  funcBonality   • Cross  device  usablilty
  • 35. Demo
  • 36. Models… @interface Titled : CBLModel ! + (NSString*) docType; ! - (instancetype) initInDatabase: (CBLDatabase*)database withTitle: (NSString*)title; ! @property (copy) NSString* title; @property (readonly) NSDate* created_at; ! @end
  • 37. Listing lists… // Returns a query for all the lists in a database. + (CBLQuery*) queryListsInDatabase: (CBLDatabase*)db { CBLView* view = [db viewNamed: @"lists"]; if (!view.mapBlock) { [view setMapBlock: MAPBLOCK({ if ([doc[@"type"] isEqualToString:kListDocType]) emit(doc[@"title"], nil); }) reduceBlock: nil version: @"1"]; } return [view createQuery]; }
  • 38. Setting up the model [[self.database modelFactory] registerClass:[List class] forDocumentType:@"list"];
  • 39. Wire up the Datastore • Implements  a  datasource  for  TableView   • Monitors  any  changes
  • 40. Wire up the Datastore #import <UIKit/UIKit.h> #import <Couchbaselite/CBLUITableSource.h> ! @class DetailViewController; ! @interface MasterViewController : UIViewController <CBLUITableDelegate> ! @property (strong, nonatomic) DetailViewController *detailViewController; @property (nonatomic) IBOutlet CBLUITableSource* dataSource; @property (strong, nonatomic) IBOutlet UITableView *tableView; ! @end
  • 41. User Login • Handled  via  Facebook   • Na?ve  Social  Login  handling  in  iOS
  • 42. Setting up Sync - (void)defineSync { pull = [_database createPullReplication:_remoteURL]; pull.continuous = YES; push = [_database createPushReplication:_remoteURL]; push.continuous = YES; [self listenForReplicationEvents: push]; [self listenForReplicationEvents: pull]; [_authenticator registerCredentialsWithReplications: @[pull, push]]; }
  • 44. Links • CouchbaseMobile   • Code  for  TodoLite   • Code  for  Sync  Hello  World   • Introduc?on  to  Sync  Gateway  Video   • Sync  Gateway  Homebrew  Formula