Data management for interactive web and mobile applications.DALE HARVEY                                                   ...
RELAX@perezd
What is Couchbase?       1+1 really does equal 3                                 3
WHAT IS MEMBASE?                   4
Deployments Leading Membase  Leading cloud service (PAAS)    Social game leader – FarmVille,  provider                    ...
Ad targeting                            40 milliseconds to come                            up with an answer.             ...
Membase is a distributed database                             Application user Web application server   Web application se...
Membase is Simple, Fast, Elastic               Five minutes or less to a working               cluster               • Dow...
Data is sharded into vBuckets                                9
Clustering With Membase                  SET request arrives at          SET acknowledgement                    KEY’s mast...
Membase is Simple, Fast, Elastic               Zero-downtime elasticity               • Spread I/O and data across commodi...
WHAT IS CouchDB?                   12
Robust      JSONReplicationMap Reduce GeoCouch     HTTP              13
USE CASES            14
DOCUMENT STORE=> GET http://127.0.0.1:5984/mydatabase/uniqueid=> PUT http://127.0.0.1:5984/mydatabase/uniqueid http://127....
ROBUST STORAGE ENGINEAppend-OnlyReliable & ConcurrentHot BackupsCompaction                          16
INCREMENTAL MAP REDUCE                         17
PEER-BASED REPLICATIONcurl -X POST http://127.0.0.1:5984/_replicate -d{   "source":     "http://couch.example.com:5984/rem...
NAILING MOBILE       • Extremely Robust Storage Engine          Consumer devices may lose power at any time       • Lightw...
GEOCOUCH      CIVICAPI.COM, ETCAdvanced R-Tree Index                          20
ARCHITECTURE
2.0 Architecture Overview                           Application                      Couchbase SDK API                    ...
JSON Document Handling• Per Bucket JSON Document Mode toggle• JSON Document Mode disabled (or invalid  JSON)  – Values are...
JSON Document Encodings for memcached                                                       Couch Document              Me...
Scatter Gather Map Reduce• Get next answer from local vBuckets and from  child nodes to select the next result for a node•...
Scatter Gather Example                         9
Scatter Gather Example                         10
Scatter Gather Example                         11
Scatter Gather Example                         12
Scatter Gather Example                         13
Scatter Gather Example                         14
Scatter Gather Example                         15
Scatter Gather Example                         16
Scatter Gather Example                         17
Scatter Gather Example                         18
Scatter Gather Example                         19
Q&ADALE HARVEYDALE@COUCHBASE.COM@DALEHARVEY                           37
Upcoming SlideShare
Loading in...5
×

Couchdb + Membase = Couchbase

8,980

Published on

Couchdb + Membase = Couchbase

Published in: Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,980
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
169
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide

Transcript of "Couchdb + Membase = Couchbase"

  1. 1. Data management for interactive web and mobile applications.DALE HARVEY 1
  2. 2. RELAX@perezd
  3. 3. What is Couchbase? 1+1 really does equal 3 3
  4. 4. WHAT IS MEMBASE? 4
  5. 5. Deployments Leading Membase Leading cloud service (PAAS) Social game leader – FarmVille, provider Mafia Wars, Café World Over 65,000 hosted Over 230 million monthly users applications Membase Server Membase Server serving over is the 500,000 ops-per-second 1,200 Heroku customers (as of database behind FarmVille and June 10, 2010) Café World 5
  6. 6. Ad targeting 40 milliseconds to come up with an answer. 3 profiles, real time campaign statistics 2 1 profiles, campaigns events 6
  7. 7. Membase is a distributed database Application user Web application server Web application server Web application server Membase Servers In the data center On the administrator console 7
  8. 8. Membase is Simple, Fast, Elastic Five minutes or less to a working cluster • Downloads for Linux and Windows • Start with a single node • One button press joins nodes to a cluster Easy to develop against • Just SET and GET – no schema required • Drop it in. 10,000+ existing applications already “speak membase” (via memcached) • Practically every language and application framework is supported, out of the box Easy to manage • One-click failover and cluster rebalancing • Graphical and programmatic interfaces • Configurable alerting 8
  9. 9. Data is sharded into vBuckets 9
  10. 10. Clustering With Membase SET request arrives at SET acknowledgement KEY’s master server 1 2 returned to application 3 3 Listener-Sender RAM membase storage engine 4 Disk Disk Disk Disk Disk DiskReplica Server 1 for KEY Master server for KEY Replica Server 2 for KEY 10
  11. 11. Membase is Simple, Fast, Elastic Zero-downtime elasticity • Spread I/O and data across commodity servers (or VMs) • Consistent performance with linear cost • Dynamic rebalancing of a live cluster All nodes are created equal • No special case nodes • Any node can replace any other node, online • Clone to grow Extensible • Filtered TAP interface provides hook points for external systems (e.g. full-text search, backup, warehouse) • Data bucket – engine API for specialized container types 11
  12. 12. WHAT IS CouchDB? 12
  13. 13. Robust JSONReplicationMap Reduce GeoCouch HTTP 13
  14. 14. USE CASES 14
  15. 15. DOCUMENT STORE=> GET http://127.0.0.1:5984/mydatabase/uniqueid=> PUT http://127.0.0.1:5984/mydatabase/uniqueid http://127.0.0.1:5984/mydatabase=> POST=> DELETE http://127.0.0.1:5984/mydatabase/uniqueid{ “_id” : “uniqueid”, “_rev” : 1234567, “title” : “My New Blog Post”, “body” : “A quick brown fox .......”, “_attachments”: { “profile.jpg”: { ...... } }} 15
  16. 16. ROBUST STORAGE ENGINEAppend-OnlyReliable & ConcurrentHot BackupsCompaction 16
  17. 17. INCREMENTAL MAP REDUCE 17
  18. 18. PEER-BASED REPLICATIONcurl -X POST http://127.0.0.1:5984/_replicate -d{ "source": "http://couch.example.com:5984/remote-db", "target": "local-db"} 18
  19. 19. NAILING MOBILE • Extremely Robust Storage Engine Consumer devices may lose power at any time • Lightweight Runtime Small install, low memory footprint, easy on battery life • Offline sync via Replication Multi-master synchronization engine • GeoSpatial Index Mapping and location aware apps • HTML5 Application Server Easy to add a web view to your mobile datahttps://github.com/couchbaselabs/iOS-Couchbase 19
  20. 20. GEOCOUCH CIVICAPI.COM, ETCAdvanced R-Tree Index 20
  21. 21. ARCHITECTURE
  22. 22. 2.0 Architecture Overview Application Couchbase SDK API MCD Couch Application Tier Elastic Couchbase Server Cluster Moxi Memcached Couch Proxy ep_engine Cluster Manager Couchbase Server vBucket Data View Data 22
  23. 23. JSON Document Handling• Per Bucket JSON Document Mode toggle• JSON Document Mode disabled (or invalid JSON) – Values are opaque to couch (and in views) – Stored as attachments to documents that hold metadata – Returned values are guaranteed bitwise identical• JSON Document Mode enabled – Values are expected to be valid JSON – Stored in document along metadata 5 – Returned values may not be bitwise identical but
  24. 24. JSON Document Encodings for memcached Couch Document Meta Data Key:”zdfasf” Expiration:43452345 { Flags:2352145 “_id”: ”zdfasf” “$Expiration”: 43452345, “$Flags”: 2352145, “$AttachReason”:”JSON Mode Disabled”, //Other Value reasons “Invalid JSON”, etc. [“$KeyMangled”: false,] //only included if true “_attachments”: { “$value”: { … } } 0x87632f98,0xa76b876d, …! } Couch Document Meta Data Key:”zdfasf” Expiration:43452345 Flags:2352145 { “_id”: ”zdfasf” “$Expiration”: 43452345, “$Flags”: 2352145, JSON Document [“$KeyMangled”: false,] //only included if true “foo”: ”bar” { } “foo”: ”bar” } 24
  25. 25. Scatter Gather Map Reduce• Get next answer from local vBuckets and from child nodes to select the next result for a node• Result includes info on number of vBuckets not included – Timeouts, Incorrect Design Doc version, etc 8
  26. 26. Scatter Gather Example 9
  27. 27. Scatter Gather Example 10
  28. 28. Scatter Gather Example 11
  29. 29. Scatter Gather Example 12
  30. 30. Scatter Gather Example 13
  31. 31. Scatter Gather Example 14
  32. 32. Scatter Gather Example 15
  33. 33. Scatter Gather Example 16
  34. 34. Scatter Gather Example 17
  35. 35. Scatter Gather Example 18
  36. 36. Scatter Gather Example 19
  37. 37. Q&ADALE HARVEYDALE@COUCHBASE.COM@DALEHARVEY 37
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×