SlideShare a Scribd company logo
© Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
SELA DEVELOPER PRACTICE
JUNE 29 – JULY 3, 2014
David Ostrovsky
- NoSQL for you!
@DavidOstrovsky
Senior Consultant @ Sela
Co-author of:
“Pro Couchbase Server” – Apress
Media 2014
“Essentials of Developing Windows
Store Apps Using C#”
“Advanced Windows Store App
Development Using C#”
CodeHardBlog.azurewebsites.net
Agenda
What is Couchbase Server?
Why should I care?
What is this “document” stuff?
How do I use it?
Where are my documents?
What else can I do with it?
A little history…
Couchbase Server is the progeny of two
products:
Membase - a distributed in-memory cache
Apache CouchDB – a document database
In 2011, the companies behind the two
products merged to form Couchbase Inc. and
created Couchbase Server.
So, what does it do?
Couchbase Server is a document database with
an advanced memory caching layer.
Stores “documents” in JSON format
Indexes the contents of documents
Couchbase automatically distributes (“shards”)
data across the cluster.
Data is replicated multiple times for resilience.
And how does it work?
A Couchbase cluster is made up from multiple
similar nodes.
Nodes are simply installations of Couchbase Server
No special head or configuration nodes
Client applications use an SDK to connect to the
cluster and exchange data.
Official support for: Java, .NET, C, PHP, Python, Ruby
and Node.js
Community support for many more
Client
Cluster Map
Node 1
Bucket1
vBucket 1
Doc 1
vBucket 2
Doc 7
Node 2
Bucket1
vBucket 2
Doc 7
vBucket 3
Doc 13
Node 3
Bucket1
vBucket 3
Doc 13
vBucket 1
Doc 1
Active
Replica
vBucket 1 Node 1
vBucket 2 Node 2
vBucket 3 Node 3
get("Doc 13")
vBucket 1 Node 1
vBucket 2 Node 2
vBucket 3 Node 2
Documents – what’s up with that?
UserId Name Age CityId
01 John 35 002
02 Dave 18 003
{
"name": "John",
"age": 35,
"address": {
"city": "New York",
"street": "…"
}
}
When should I use it?
High performance requirements
Millions of operations per second
Very large-scale systems
Sub-millisecond reads
Serving ads, storing user profiles, etc.
Developer friendliness
Flexible schema
Seamless upgrade of application versions
Simple CRUD
Straightforward administration
Working with documents
Documents are accessed by their key (aka. ID)
Key-based operations are very fast.
On a dedicated cluster, you can expect sub-
millisecond responses.
Items are stored in memory, then written to disk
asynchronously.
Items are retrieved from the memory cache.
CRUD
All operations are exposed by the Couchbase
client object instance.
Add/Set store a document in the database.
Get retrieves a document by key.
Replace updates an existing document.
Bulk versions of operations – depends on SDK.
Demo
Key-based Operations
What database only has one user?
Couchbase supports concurrency through
Check-and-Set operations.
Every item’s metadata has a CAS value, which
gets updated with every change.
Optimistic concurrency works by comparing
client and server CAS values.
Pessimistic concurrency works by locking the
key exclusively for a specific session.
Dude, where is my document?
In addition to keys (primary index), Couchbase
supports secondary indexes, called Views.
Unlike key-based operations, which are served
from memory, vies are served from disk.
File system caches disk reads.
MapReduce in 60 seconds
Views are defined as a MapReduce function.
Map function runs for each document and extracts
the data for the index.
Reduce is optional and can be used for
aggregations, such as grouping by value.
Demo
Using Views
N1QL – How do you pronounce that?
N1QL (aka “Nickel”) is an SQL-like query
language for Couchbase.
Expanded SQL syntax to account for nested
documents, arrays, and cross-bucket joins.
Currently in developer preview, coming in a
future version.
Demo
Was that SQL I just saw?
Great, what else you got?
Cross-Datacenter Replication (XDCR)
Couchbase Mobile
A NoSQL database for mobile apps.
Can be stand-alone or synchronized with Couchbase
Server.
ElasticSearch Integration
Uses ES for querying and Couchbase for retrieval.
Hadoop Connector
Uses sqoop to move data between CB and Hadoop.
Questions

More Related Content

PPTX
PPTX
Azure document DB
PPTX
Azure cosmos db, Azure no-SQL database,
PDF
Azure document db
PDF
Azure sql database limitations
PPT
SQL Azure Intro and what’s New
PPTX
Introduction to Azure DocumentDB
PPTX
Azure SQL & SQL Server 2016 JSON
Azure document DB
Azure cosmos db, Azure no-SQL database,
Azure document db
Azure sql database limitations
SQL Azure Intro and what’s New
Introduction to Azure DocumentDB
Azure SQL & SQL Server 2016 JSON

What's hot (20)

PPTX
Geek Sync | SQL Security Principals and Permissions 101
PPTX
iForum 2015: SQL vs. NoSQL
PPTX
Microsoft Azure: Opção de Nuvem para Todo o Desenvolvedor
PPS
PPT
Drupal 7 unleashed
PDF
From SQL to MongoDB
PPTX
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
PPTX
Windows Azure Camps - Oktober 2012
PPTX
Azure storage
PPTX
SQL Azure
PPT
Higher Productivity With Ase
PPT
Document Databases & RavenDB
PPT
SQL vs NoSQL
PPTX
Introduction to RavenDB
PPTX
SQL vs. NoSQL. It's always a hard choice.
PPTX
Tips & Tricks SQL in the City Seattle 2014
PPTX
Azure DocumentDB 101
PPTX
Intro to RavenDB
PPTX
SQL Server & SQL Azure Temporal Tables - V2
PPTX
SQL vs NoSQL
Geek Sync | SQL Security Principals and Permissions 101
iForum 2015: SQL vs. NoSQL
Microsoft Azure: Opção de Nuvem para Todo o Desenvolvedor
Drupal 7 unleashed
From SQL to MongoDB
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Windows Azure Camps - Oktober 2012
Azure storage
SQL Azure
Higher Productivity With Ase
Document Databases & RavenDB
SQL vs NoSQL
Introduction to RavenDB
SQL vs. NoSQL. It's always a hard choice.
Tips & Tricks SQL in the City Seattle 2014
Azure DocumentDB 101
Intro to RavenDB
SQL Server & SQL Azure Temporal Tables - V2
SQL vs NoSQL
Ad

Viewers also liked (17)

PPTX
Question 3
PPT
Kāpēc KKS nevis bankas
PPT
Nacionala banka
PPTX
Using Couchbase and ElasticSearch for real-time data analytics
PPTX
Question 6 what have you learnt about technologies[1]
PPTX
Who's afraid of graphs
PPTX
A Tale of Two Tech Solutions
PPTX
Question 3
PPTX
Question 6
PPTX
To SQL or NoSQL, That is the Question
PPTX
General Programming on the GPU - Confoo
PPTX
Stream Processing Frameworks
PDF
App inventor 教學講義 chapter4
DOCX
App inventor 教學講義 chapter2
PDF
App inventor 教學講義 chapter3
DOCX
App inventor 教學講義 chapter1
PDF
App inventor 教學講義 chapter6
Question 3
Kāpēc KKS nevis bankas
Nacionala banka
Using Couchbase and ElasticSearch for real-time data analytics
Question 6 what have you learnt about technologies[1]
Who's afraid of graphs
A Tale of Two Tech Solutions
Question 3
Question 6
To SQL or NoSQL, That is the Question
General Programming on the GPU - Confoo
Stream Processing Frameworks
App inventor 教學講義 chapter4
App inventor 教學講義 chapter2
App inventor 教學講義 chapter3
App inventor 教學講義 chapter1
App inventor 教學講義 chapter6
Ad

Similar to Couchbase - NoSQL for you! (SDP 2014) (20)

PDF
Manuel Hurtado. Couchbase paradigma4oct
PDF
Couchbase overview033113long
PDF
Couchbase overview033113long
PPTX
Couchbase Data Platform | Big Data Demystified
ODP
Couchbase - Introduction
PDF
Couchbase - Yet Another Introduction
PDF
From 0 to syncing
PPTX
Couchbase 101
PDF
Introduction to NoSQL with Couchbase
PDF
TechTalk #14 Grokking: Couchbase - NoSQL + Memcached + Real-time + Offline!
PDF
Couchbase Day
PPTX
Introduction to couchbase
PPTX
Enterprise Architect's view of Couchbase 4.0 with N1QL
PDF
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
PDF
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
PPTX
Couchbase Data Pipeline
PPT
NoSQL_Night
PDF
Softshake 2013: Introduction to NoSQL with Couchbase
PPTX
NoSQL for SQL Server Developers using Couchbase
PDF
Node.js and couchbase Full Stack JSON - Munich NoSQL
Manuel Hurtado. Couchbase paradigma4oct
Couchbase overview033113long
Couchbase overview033113long
Couchbase Data Platform | Big Data Demystified
Couchbase - Introduction
Couchbase - Yet Another Introduction
From 0 to syncing
Couchbase 101
Introduction to NoSQL with Couchbase
TechTalk #14 Grokking: Couchbase - NoSQL + Memcached + Real-time + Offline!
Couchbase Day
Introduction to couchbase
Enterprise Architect's view of Couchbase 4.0 with N1QL
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
Couchbase Data Pipeline
NoSQL_Night
Softshake 2013: Introduction to NoSQL with Couchbase
NoSQL for SQL Server Developers using Couchbase
Node.js and couchbase Full Stack JSON - Munich NoSQL

Recently uploaded (20)

PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
assetexplorer- product-overview - presentation
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
chapter 5 systemdesign2008.pptx for cimputer science students
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
Types of Token_ From Utility to Security.pdf
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Wondershare Recoverit Full Crack New Version (Latest 2025)
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Complete Guide to Website Development in Malaysia for SMEs
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
Oracle Fusion HCM Cloud Demo for Beginners
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
DNT Brochure 2025 – ISV Solutions @ D365
Patient Appointment Booking in Odoo with online payment
Computer Software and OS of computer science of grade 11.pptx
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
assetexplorer- product-overview - presentation
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Topaz Photo AI Crack New Download (Latest 2025)
chapter 5 systemdesign2008.pptx for cimputer science students
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Types of Token_ From Utility to Security.pdf
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev

Couchbase - NoSQL for you! (SDP 2014)

  • 1. © Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com SELA DEVELOPER PRACTICE JUNE 29 – JULY 3, 2014 David Ostrovsky - NoSQL for you!
  • 2. @DavidOstrovsky Senior Consultant @ Sela Co-author of: “Pro Couchbase Server” – Apress Media 2014 “Essentials of Developing Windows Store Apps Using C#” “Advanced Windows Store App Development Using C#” CodeHardBlog.azurewebsites.net
  • 3. Agenda What is Couchbase Server? Why should I care? What is this “document” stuff? How do I use it? Where are my documents? What else can I do with it?
  • 4. A little history… Couchbase Server is the progeny of two products: Membase - a distributed in-memory cache Apache CouchDB – a document database In 2011, the companies behind the two products merged to form Couchbase Inc. and created Couchbase Server.
  • 5. So, what does it do? Couchbase Server is a document database with an advanced memory caching layer. Stores “documents” in JSON format Indexes the contents of documents Couchbase automatically distributes (“shards”) data across the cluster. Data is replicated multiple times for resilience.
  • 6. And how does it work? A Couchbase cluster is made up from multiple similar nodes. Nodes are simply installations of Couchbase Server No special head or configuration nodes Client applications use an SDK to connect to the cluster and exchange data. Official support for: Java, .NET, C, PHP, Python, Ruby and Node.js Community support for many more
  • 7. Client Cluster Map Node 1 Bucket1 vBucket 1 Doc 1 vBucket 2 Doc 7 Node 2 Bucket1 vBucket 2 Doc 7 vBucket 3 Doc 13 Node 3 Bucket1 vBucket 3 Doc 13 vBucket 1 Doc 1 Active Replica vBucket 1 Node 1 vBucket 2 Node 2 vBucket 3 Node 3 get("Doc 13") vBucket 1 Node 1 vBucket 2 Node 2 vBucket 3 Node 2
  • 8. Documents – what’s up with that? UserId Name Age CityId 01 John 35 002 02 Dave 18 003 { "name": "John", "age": 35, "address": { "city": "New York", "street": "…" } }
  • 9. When should I use it? High performance requirements Millions of operations per second Very large-scale systems Sub-millisecond reads Serving ads, storing user profiles, etc. Developer friendliness Flexible schema Seamless upgrade of application versions Simple CRUD Straightforward administration
  • 10. Working with documents Documents are accessed by their key (aka. ID) Key-based operations are very fast. On a dedicated cluster, you can expect sub- millisecond responses. Items are stored in memory, then written to disk asynchronously. Items are retrieved from the memory cache.
  • 11. CRUD All operations are exposed by the Couchbase client object instance. Add/Set store a document in the database. Get retrieves a document by key. Replace updates an existing document. Bulk versions of operations – depends on SDK.
  • 13. What database only has one user? Couchbase supports concurrency through Check-and-Set operations. Every item’s metadata has a CAS value, which gets updated with every change. Optimistic concurrency works by comparing client and server CAS values. Pessimistic concurrency works by locking the key exclusively for a specific session.
  • 14. Dude, where is my document? In addition to keys (primary index), Couchbase supports secondary indexes, called Views. Unlike key-based operations, which are served from memory, vies are served from disk. File system caches disk reads.
  • 15. MapReduce in 60 seconds Views are defined as a MapReduce function. Map function runs for each document and extracts the data for the index. Reduce is optional and can be used for aggregations, such as grouping by value.
  • 17. N1QL – How do you pronounce that? N1QL (aka “Nickel”) is an SQL-like query language for Couchbase. Expanded SQL syntax to account for nested documents, arrays, and cross-bucket joins. Currently in developer preview, coming in a future version.
  • 18. Demo Was that SQL I just saw?
  • 19. Great, what else you got? Cross-Datacenter Replication (XDCR) Couchbase Mobile A NoSQL database for mobile apps. Can be stand-alone or synchronized with Couchbase Server. ElasticSearch Integration Uses ES for querying and Couchbase for retrieval. Hadoop Connector Uses sqoop to move data between CB and Hadoop.