aspect ratio test slide
TRANSCRIPT
![Page 1: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/1.jpg)
Aspect Ratio Test Slide
![Page 2: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/2.jpg)
INTRODUCING APACHE COUCHDB 2.0by Jan Lehnardt at ApacheCon EU 2016 in Sevilla
![Page 3: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/3.jpg)
JAN LEHNARDT
➤CouchDB since 2006
➤Apache CouchDB since 2008
➤PMC Chair & VP of CouchDB since 2011
➤Longest active contributor
➤CEO at Neighbourhoodie Software in Berlin
Joined CouchDB in 2006, longest standing contributor
Have done everything from evangelising, community work, core engineering.
Still do all of the above
* * *We shipped 2.0 on Sept. 20th, fulfilling the 10+ year development history of CouchDB
![Page 4: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/4.jpg)
![Page 5: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/5.jpg)
THE THREE USE-CASES OF COUCHDB
![Page 6: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/6.jpg)
1. GENERAL PURPOSE DATABASE 2. HIGHLY AVAILABLE & SCALABLE BIG DATA CLUSTER 3. SEAMLESS MOBILE TO CLOUD DATA-SYNCHRONISATION
![Page 7: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/7.jpg)
1. GENERAL PURPOSE DATABASE 2. HIGHLY AVAILABLE & SCALABLE BIG DATA CLUSTER 3. SEAMLESS MOBILE TO CLOUD DATA-SYNCHRONISATION
![Page 8: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/8.jpg)
1. GENERAL PURPOSE DATABASE 2. HIGHLY AVAILABLE & SCALABLE BIG DATA CLUSTER 3. SEAMLESS MOBILE TO CLOUD DATA-SYNCHRONISATION
![Page 9: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/9.jpg)
MIX AND MATCH ANY ONE
![Page 10: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/10.jpg)
MIX AND MATCH ANY ONE DATA SYNCHRONISATION BETWEEN
ALL USE-CASES
![Page 11: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/11.jpg)
MOBILE TO CLOUD DATA SYNC
![Page 12: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/12.jpg)
MOST MOBILE DATA IS OFFLINEfor battery power reasons
![Page 13: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/13.jpg)
ALMOST 60% OF MOBILE IS ON 2GGoogle Chrome Dev Summit last week
![Page 14: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/14.jpg)
CouchDB helps you to build compelling applications in the face of spotty networks.
![Page 15: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/15.jpg)
CouchDB helps you to bring mobile data into the
Cloud for Big Data analysis.
![Page 16: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/16.jpg)
GENERAL PURPOSE DATABASE
![Page 17: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/17.jpg)
BASICS
JSON cuts ORM
![Page 18: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/18.jpg)
BASICS
➤ HTTP
JSON cuts ORM
![Page 19: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/19.jpg)
BASICS
➤ HTTP➤ JSON
JSON cuts ORM
![Page 20: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/20.jpg)
BASICS
➤ HTTP➤ JSON
➤ Documents
JSON cuts ORM
![Page 21: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/21.jpg)
BASICS
➤ HTTP➤ JSON
➤ Documents➤ Unique IDs, content
addressable revisions
JSON cuts ORM
![Page 22: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/22.jpg)
BASICS
MR: unique
API compatible- design from 10 years ago- other databases have features that start failing unpredictably at scale- CouchDB doesn’t have those features in the first place
![Page 23: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/23.jpg)
BASICS
➤ Incremental, Persistent Map / Reduce for queries
MR: unique
API compatible- design from 10 years ago- other databases have features that start failing unpredictably at scale- CouchDB doesn’t have those features in the first place
![Page 24: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/24.jpg)
BASICS
➤ Incremental, Persistent Map / Reduce for queries➤ Changes, “what happened since?”, think `git log` but a real-
time stream for your database
MR: unique
API compatible- design from 10 years ago- other databases have features that start failing unpredictably at scale- CouchDB doesn’t have those features in the first place
![Page 25: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/25.jpg)
BASICS
➤ Incremental, Persistent Map / Reduce for queries➤ Changes, “what happened since?”, think `git log` but a real-
time stream for your database➤ API Compatible between single node and cluster, apps can grow
without rewrite
MR: unique
API compatible- design from 10 years ago- other databases have features that start failing unpredictably at scale- CouchDB doesn’t have those features in the first place
![Page 26: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/26.jpg)
BASICS
➤ Incremental, Persistent Map / Reduce for queries➤ Changes, “what happened since?”, think `git log` but a real-
time stream for your database➤ API Compatible between single node and cluster, apps can grow
without rewrite➤ trade-off: no features that wouldn’t scale in single node
version
MR: unique
API compatible- design from 10 years ago- other databases have features that start failing unpredictably at scale- CouchDB doesn’t have those features in the first place
![Page 27: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/27.jpg)
DESIGN DECISIONS
![Page 28: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/28.jpg)
DESIGN DECISIONS
➤ Data safety > *
![Page 29: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/29.jpg)
DESIGN DECISIONS
➤ Data safety > *➤ Fault tolerance
![Page 30: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/30.jpg)
DESIGN DECISIONS
➤ Data safety > *➤ Fault tolerance
➤ Erlang: only one request can fail, not the whole server
![Page 31: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/31.jpg)
DESIGN DECISIONS
➤ Data safety > *➤ Fault tolerance
➤ Erlang: only one request can fail, not the whole server
➤ Crash-only design
![Page 32: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/32.jpg)
DESIGN DECISIONS
➤ Data safety > *➤ Fault tolerance
➤ Erlang: only one request can fail, not the whole server
➤ Crash-only design➤ Everything is resumable
![Page 33: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/33.jpg)
DESIGN DECISIONS
➤ Data safety > *➤ Fault tolerance
➤ Erlang: only one request can fail, not the whole server
➤ Crash-only design➤ Everything is resumable➤ Everything is idempotent
![Page 34: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/34.jpg)
Web / API Server
App Server
CouchDB
GENERAL PURPOSE DATABASE
![Page 35: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/35.jpg)
Web / API Server
App Server
CouchDB
✅
GENERAL PURPOSE DATABASE
![Page 36: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/36.jpg)
Web / API Server
App Server
CouchDB
BONUS 1: GEO DISTRIBUTIONWeb / API
Server
App Server
CouchDB
EUUS
Sync
![Page 37: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/37.jpg)
Web / API Server
App Server
CouchDB
BONUS: EXTRAWeb / API
Server
App Server
CouchDB
AfricaUS
Web / API Server
App Server
CouchDB
EU
Sync Sync
![Page 38: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/38.jpg)
CouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 39: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/39.jpg)
CouchDB
Web / API Server
App Server ✅
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 40: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/40.jpg)
Web / API Server
App Server
Web / API Server
App Server
CouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 41: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/41.jpg)
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 42: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/42.jpg)
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 43: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/43.jpg)
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDBCouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
![Page 44: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/44.jpg)
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDBCouchDB
Web / API Server
App Server
SCALABLE CLUSTER
CouchDBCouchDB Cluster
✅
![Page 45: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/45.jpg)
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
CouchDB
Web / API Server
App Server
BONUS STILL THERE
CouchDBCouchDB Cluster
Web / API Server
App Server
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 46: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/46.jpg)
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDB CouchDB
Web / API Server
App Server
BONUS STILL THERE
CouchDBCouchDB Cluster
Web / API Server
App Server
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 47: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/47.jpg)
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDBCouchDB CouchDB
Web / API Server
App Server
BONUS STILL THERE
CouchDBCouchDB Cluster
Web / API Server
App Server
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 48: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/48.jpg)
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDBCouchDBCouchDBCouchDB CouchDB
Web / API Server
App Server
BONUS STILL THERE
CouchDBCouchDB Cluster
Web / API Server
App Server
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 49: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/49.jpg)
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
Web / API Server
App Server
CouchDBCouchDBCouchDBCouchDBCouchDBCouchDB CouchDB
Web / API Server
App Server
BONUS STILL THERE
CouchDBCouchDB Cluster
Web / API Server
App Server
CouchDBCouchDBCouchDB Cluster
EUUS
✅Sync
![Page 50: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/50.jpg)
MOBILE
CouchDBCouchDBCouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
we started offline first
![Page 51: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/51.jpg)
MOBILE
✅CouchDBCouchDB
CouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
we started offline first
![Page 52: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/52.jpg)
BONUS
CouchDBCouchDBCouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
![Page 53: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/53.jpg)
BONUS
CouchDBCouchDBCouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
![Page 54: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/54.jpg)
MOBILE
CouchDBCouchDBCouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 55: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/55.jpg)
MOBILE
✅CouchDBCouchDB
CouchDB Cluster
📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱📱
CouchDBCouchDBCouchDB Cluster
EUUS
Sync
![Page 56: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/56.jpg)
COUCHDB 1.X
Data Storage Layer
Synchronisation Protocol
Persistent Map/Reduce Indexes
HTTP Layer
![Page 57: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/57.jpg)
COUCHDB 2.X
Data Storage Layer
Synchronisation Protocol Map/Reduce
HTTP Layer
Cluster Layer
Query Language
![Page 58: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/58.jpg)
POUCHDB
Persistent In-Browser Storage
Synchronisation Protocol Map/Reduce
Native JavaScript API
Query Language
![Page 59: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/59.jpg)
MOBILE
Persistent On-Device Storage
Synchronisation Protocol
Persistent Map/Reduce Indexes
Native iOS & Android APIs
![Page 60: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/60.jpg)
TOPOLOGIES
![Page 61: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/61.jpg)
solo
could be single node instance or cluster installation
![Page 62: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/62.jpg)
hot spare
explain replication a bitone way, resume, delta, conflicts
![Page 63: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/63.jpg)
REPLICATION DETAIL INTERLUDE
Database Database
replication details
![Page 64: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/64.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Database Database
replication details
![Page 65: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/65.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database Database
replication details
![Page 66: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/66.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
replication details
![Page 67: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/67.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
replication details
![Page 68: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/68.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
replication details
![Page 69: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/69.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
replication details
![Page 70: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/70.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A]
replication details
![Page 71: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/71.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A]
replication details
![Page 72: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/72.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
replication details
![Page 73: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/73.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
Doc 1 [F, E, D, C, B, A]
replication details
![Page 74: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/74.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
Doc 1 [F, E, D, C, B, A] Doc 1 [H, E, D, C, B, A]
replication details
![Page 75: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/75.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
Doc 1 [F, E, D, C, B, A] Doc 1 [H, E, D, C, B, A]
replication details
![Page 76: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/76.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
Doc 1 [F, E, D, C, B, A] Doc 1 [H, E, D, C, B, A]
Doc 1 [[F, H], E, D, C, B, A]
replication details
![Page 77: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/77.jpg)
REPLICATION DETAIL INTERLUDE
Doc 1 [Rev A]
Doc 1 [B, A]
Database
Doc 1 [C, B, A]
Database
Doc 1 [C, B, A]
Doc 1 [D, C, B, A]
Doc 1 [E, D, C, B, A] Doc 1 [E, D, C, B, A]
Doc 1 [F, E, D, C, B, A] Doc 1 [H, E, D, C, B, A]
Doc 1 [[F, H], E, D, C, B, A]
{
_id:"1",
_conflicts:[F,H]
}
replication details
![Page 78: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/78.jpg)
SYNCHRONISATION PROTOCOLCome see my talk tomorrow 12:00: “Apache CouchDB Sync Deep Dive”
Or Thursday 10:30 if you are still here for ApacheCon EU
We will learn about identity, versioning schemes, revision trees, conflict detection and resolution and the by sequence index
![Page 79: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/79.jpg)
read-only secondaries
![Page 80: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/80.jpg)
multi-primary
![Page 81: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/81.jpg)
multi-primary
![Page 82: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/82.jpg)
us-east us-west
eu-west
multi-primary
![Page 83: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/83.jpg)
Sevilla New York
Tokyo
multi-primary
![Page 84: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/84.jpg)
Tree
![Page 85: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/85.jpg)
City 1 City 2 City 3 City 4 City 5 City 6 City 7 City 8 City 9
Tree
![Page 86: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/86.jpg)
City 1 City 2 City 3 City 4 City 5 City 6 City 7 City 8 City 9
County 1 County 2 County 3
Tree
![Page 87: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/87.jpg)
State 2State 1
City 1 City 2 City 3 City 4 City 5 City 6 City 7 City 8 City 9
County 1 County 2 County 3
Tree
![Page 88: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/88.jpg)
State 2State 1
City 1 City 2 City 3 City 4 City 5 City 6 City 7 City 8 City 9
County 1 County 2 County 3
Country
Tree
![Page 89: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/89.jpg)
Till 1 Till 2 Till 3
Store 1
Till 4 Till 5 City 6
Store 2
Region 1 Region 2
Till 7 Till 8 Till 9
Store 3
Corporate
Tree
![Page 90: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/90.jpg)
Meshc.f. Internet of Things / Industry of Things
![Page 91: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/91.jpg)
CLUSTER INTERNALS
# Cluster- Amazon Dynamo- Cluster -> nodes- Database -> shards- No Primary Node - any node can answer any request - worst case proxies from other nodes - adds a hop, possible latency optimisation with “cluster aware” client libraries- Consistency: R/W = 1,2,3,N - query n=1 asks only one node - n=2 asks two nodes - n=3 three nodes and so on - >n == mode latency vs. more consistency - optimisation opportunity: balance of probabilities: - do we have to fsync write to two nodes, or is it enough to commit to two memories?- self healing- read repair- full replication support- 99% API compatible
![Page 92: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/92.jpg)
Cluster
GLOSSARYNode A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 93: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/93.jpg)
Cluster
GLOSSARY
➤Amazon DynamoNode A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 94: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/94.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes
Node A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 95: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/95.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards
Node A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 96: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/96.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards➤Consistent hashing
Node A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 97: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/97.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards➤Consistent hashing
➤ Document ID -> hash fun -> shard ID
Node A
Node C
Node B
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 98: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/98.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards➤Consistent hashing
➤ Document ID -> hash fun -> shard ID
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 2
DB 1 Shard 3
DB 1
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 99: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/99.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards➤Consistent hashing
➤ Document ID -> hash fun -> shard ID
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 2
DB 1 Shard 3
DB 1
Document ABC
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 100: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/100.jpg)
Cluster
GLOSSARY
➤Amazon Dynamo➤A cluster consists of nodes➤A database consists of shards➤Consistent hashing
➤ Document ID -> hash fun -> shard ID
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 2
DB 1 Shard 3
DB 1
Document ABC
ABC
Physical: Cluster & NodesLogical: Databases & ShardsShard map dynamic: you can put shards on different nodesto scale, first overshard, then move shards to new hardware - has limit - re-sharding in future versionno limit to number of nodes or shards or data stored
![Page 101: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/101.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
backup shards
![Page 102: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/102.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=1 Client
backup shards
![Page 103: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/103.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=1 Client
backup shards
![Page 104: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/104.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=1 Client
backup shards
![Page 105: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/105.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=1 Client
backup shards
![Page 106: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/106.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
![Page 107: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/107.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=2 Client
![Page 108: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/108.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=2 Client
![Page 109: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/109.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=2 Client
![Page 110: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/110.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=2 Client
![Page 111: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/111.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
GET abcn=2 Client
![Page 112: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/112.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
PUT abcn=2 Client
![Page 113: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/113.jpg)
Cluster
Node A
Node C
Node B
DB 1 Shard 1 DB 1 Shard 1*
DB 1 Shard 1**
PUT abcn=3 Client
![Page 114: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/114.jpg)
INCREMENTAL,PERSISTENT MAP/REDUCE
- incremental, persistent M/R queries - single left-join possible- Works in single node as well as cluster- Mango query lang compiles to M/R
![Page 115: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/115.jpg)
Database
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 116: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/116.jpg)
Database Map emit(type, amount)
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
key: concert
value: -30
key: groceries
value: -50
key: groceries
value: -40
key: rent
value: -1000
key: transit
value: -4
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 117: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/117.jpg)
Database Map emit(type, amount) Reduce sum(amount)
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
key: concert
value: -30
key: groceries
value: -50
key: groceries
value: -40
key: rent
value: -1000
key: transit
value: -4
key: concert
value: -30
key: groceries
value: -90
key: rent
value: -1000
key: transit
value: -4
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 118: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/118.jpg)
Database Map emit(type, amount) Reduce sum(amount)
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
key: concert
value: -30
key: groceries
value: -50
key: groceries
value: -40
key: rent
value: -1000
key: transit
value: -4
key: concert
value: -30
key: groceries
value: -90
key: rent
value: -1000
key: transit
value: -4
Total
-1124
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 119: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/119.jpg)
Database Map emit(type, amount) Reduce sum(amount)
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
key: concert
value: -30
key: groceries
value: -50
key: groceries
value: -40
key: rent
value: -1000
key: transit
value: -4
key: concert
value: -30
key: groceries
value: -90
key: rent
value: -1000
key: transit
value: -4
Total
-1124
database.couch
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 120: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/120.jpg)
Database Map emit(type, amount) Reduce sum(amount)
ID: Atype: rent
amount: -1000ID: B
type: groceriesamount: -50
ID: Ctype: concert
amount: -30ID: D
type: groceriesamount: -40
ID: Etype: transit
amount: -4
key: concert
value: -30
key: groceries
value: -50
key: groceries
value: -40
key: rent
value: -1000
key: transit
value: -4
key: concert
value: -30
key: groceries
value: -90
key: rent
value: -1000
key: transit
value: -4
Total
-1124
database.couch type-amount.view
Map index is persisted to diskReduce is also persisted, and available grouped by key, and total, from the same index
![Page 121: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/121.jpg)
concert: -30 groceries: -50 groceries: -40 rent: -1000 transit: -4
-90 -1004
-120
-1124
![Page 122: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/122.jpg)
concert: -30 groceries: -50 groceries: -40 rent: -1000 transit: -4
-90 -1004
-140
-1144
concert: -20
B+tree, shallow: updates very efficient, only very few nodes need touching
![Page 123: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/123.jpg)
MANGO QUERY LANGUAGE
![Page 124: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/124.jpg)
MANGO QUERY LANGUAGE
➤ Compiles to Map / Reduce {"selector":{"year":{"$gt":2010}},"fields":["_id","_rev","year","title"],"sort":[{"year":"asc"}],"limit":2,"skip":0}
![Page 125: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/125.jpg)
RELIABLE DATA STORAGE
Reliable Data Storage- Append only files for storage and index- Data committed to disk is never touched again - no partial updates, that cause inconsistencies during catastrophic events - no need for repairs - instant startup- downside: compaction / garbage collection / vacuum - can run online - in v1: simplest possible, copy live data, swap files - takes iops away from live traffic - hogs FS block cache - in v2 - runs in io “background” - takes longer, but doesn’t take live ops away - compaction by shard, still hogs FS block cache, but only per shard - more compact, by clustering indexes inside file
![Page 126: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/126.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
![Page 127: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/127.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
![Page 128: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/128.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
![Page 129: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/129.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
Footer
PUT A
[A, B]
[B, A]
Footer
B
B
BY
ID
BY
SEQ
A
A
BY
ID
BY
SEQ
Footer
![Page 130: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/130.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
Footer
PUT A
[A, B]
[B, A]
Footer
B
B
BY
ID
BY
SEQ
A
A
BY
ID
BY
SEQ
Footer
![Page 131: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/131.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
Footer
PUT A
[A, B]
[B, A]
Footer
B
B
BY
ID
BY
SEQ
A
A
BY
ID
BY
SEQ
Footer
Footer
A
PUT C
[A, B, C]
[B, A, C]
Footer
B
BY
ID
BY
SEQ
Footer
A
BY
ID
BY
SEQ
B C
C
BY
ID
BY
SEQ
Footer
![Page 132: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/132.jpg)
By-ID-Idx
By-SEQ-Idx
ID B+Tree
File
[ ]
[ ]
Footer
Footer
PUT B
[B]
[B]
B
B
BY
ID
BY
SEQ
Footer
Footer
PUT A
[A, B]
[B, A]
Footer
B
B
BY
ID
BY
SEQ
A
A
BY
ID
BY
SEQ
Footer
Footer
A
PUT C
[A, B, C]
[B, A, C]
Footer
B
BY
ID
BY
SEQ
Footer
A
BY
ID
BY
SEQ
B C
C
BY
ID
BY
SEQ
Footer
![Page 133: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/133.jpg)
By-ID-Idx
By-SEQ-Idx
File
PUT B*
[A, B*, C]
[A, C, B*]
Footer
B
BY
ID
BY
SEQ
Footer
A
BY
ID
BY
SEQ
Footer
BA C
C
BY
ID
BY
SEQ
Footer
B*
B
BY
ID
BY
SEQ
Footer
*
ID B+Tree
![Page 134: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/134.jpg)
By-ID-Idx
By-SEQ-Idx
File
PUT B*
[A, B*, C]
[A, C, B*]
Footer
B
BY
ID
BY
SEQ
Footer
A
BY
ID
BY
SEQ
Footer
BA C
C
BY
ID
BY
SEQ
Footer
B*
B
BY
ID
BY
SEQ
Footer
*
ID B+Tree
![Page 135: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/135.jpg)
COMPACTION V1
Footer
B
BY
ID
BY
SEQ
Footer
A
BY
ID
BY
SEQ
Footer
C
BY
ID
BY
SEQ
Footer
BY
ID
BY
SEQ
Footer
B*
A C B*
BY
ID
BY
SEQ
Footer
BY
ID
BY
SEQ
Copy
![Page 136: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/136.jpg)
COMPACTION V2
Footer
B
BY
ID
BY
SEQ
Footer
A
Footer
C
BY
ID
BY
SEQ
Footer
BY
ID
BY
SEQ
Footer
B*
A C
BY
ID
BY
SEQ
B*
Footer
Smaller, Indexes clustered, background i/o
BY
ID
BY
SEQ
![Page 137: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/137.jpg)
COMPACTION V2
Footer
B
BY
ID
BY
SEQ
Footer
A
Footer
C
BY
ID
BY
SEQ
Footer
BY
ID
BY
SEQ
Footer
B*
A C
BY
ID
BY
SEQ
B*
Footer
Smaller, Indexes clustered, background i/o
BY
ID
BY
SEQ
![Page 138: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/138.jpg)
CASE-STUDIES
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things
![Page 139: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/139.jpg)
CASE STUDIES
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 140: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/140.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 141: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/141.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 142: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/142.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB➤ Hospital Run: Hospital management software for regions with
limited infrastructure
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 143: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/143.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB➤ Hospital Run: Hospital management software for regions with
limited infrastructure➤ RapidFTR: Family Tracing & Reunification for regions in crisis (e.g.
Haiti) / UNICEF
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 144: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/144.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB➤ Hospital Run: Hospital management software for regions with
limited infrastructure➤ RapidFTR: Family Tracing & Reunification for regions in crisis (e.g.
Haiti) / UNICEF➤ Decisions for Heroes: Coast guard mobile operations center
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 145: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/145.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB➤ Hospital Run: Hospital management software for regions with
limited infrastructure➤ RapidFTR: Family Tracing & Reunification for regions in crisis (e.g.
Haiti) / UNICEF➤ Decisions for Heroes: Coast guard mobile operations center➤ Avalanche protection inspection in the Swiss Alps
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 146: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/146.jpg)
CASE STUDIES
➤ IBM/Cloudant: Big Data as a Service➤ eHealth Africa: Fighting Ebola with CouchDB and PouchDB➤ Hospital Run: Hospital management software for regions with
limited infrastructure➤ RapidFTR: Family Tracing & Reunification for regions in crisis (e.g.
Haiti) / UNICEF➤ Decisions for Heroes: Coast guard mobile operations center➤ Avalanche protection inspection in the Swiss Alps➤ Industry of things
# Case Studies (maybe splice into use-cases)IBM/Cloudant: Big Data as a ServiceeEhealth Ebola / Hospital Run / RapidFTR (Family Tracing and Reunification UNICEF / Primero)if-control: avalanche protection inspectionIndustry of things: 14% of all industrial facilities (think oil refinery, plant, etc) are networked, and < 20% of those are connected to the public internet.
![Page 147: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/147.jpg)
THANK YOU!Introducing Apache CouchDB 2.0
Jan Lehnardt @janl [email protected] Professional Support for Apache CouchDB: https://neighbourhood.ie
![Page 148: Aspect Ratio Test Slide](https://reader031.vdocument.in/reader031/viewer/2022012103/61dbd0f971ac7a6d446de2f6/html5/thumbnails/148.jpg)