Webinar - Introduction to Couchbase Server

1,419 views

Published on

Couchbase Server is a NoSQL document database that includes JSON support, indexing and querying capabilities, and cross datacenter replication. In addition, Couchbase Server offers consistent high performance, one-click scalability and zero-downtime maintenance.

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

  • Be the first to like this

No Downloads
Views
Total views
1,419
On SlideShare
0
From Embeds
0
Number of Embeds
732
Actions
Shares
0
Downloads
51
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Webinar - Introduction to Couchbase Server

  1. 1. Couchbase Server 2.0Introduction
  2. 2. Couchbase Open Source Projecteading NoSQL database projectfocused on distributed databasetechnology and surroundingecosystemupports both key-value anddocument-oriented use casesll components are available underthe Apache 2.0 Public Licensebtained as packaged software inboth enterprise and communityeditions.CouchbaseOpen Source Project
  3. 3. EasyScalabilityConsistent HighPerformanceAlways On24x365Grow cluster withoutapplication changes, withoutdowntime with a single clickConsistent sub-millisecondread and write response timeswith consistent high throughputNo downtime for softwareupgrades, hardwaremaintenance, etc.Flexible DataModelJSON document model with nofixed schema.Couchbase Server Core Principles
  4. 4. New in 2.0JSON support Indexing and QueryingCross Datacenter ReplicationIncremental Map ReduceJSONJSONJSONJSONJSON
  5. 5. • Database stays online, no downtime for schema changes• Records can have different structures, there is no fixed schema• Model Data easier and faster -- agile rapid applicationdevelopment{“ID”: 1,“FIRST”: “Dipti”,“LAST”: “Borkar”,“ZIP”: “94040”,“CITY”: “MV”,“STATE”: “CA”}JSONJSONJSON JSONFlexible Data Model
  6. 6. Architecture
  7. 7. Couchbase Server 2.0 ArchitectureHeartbeatProcessmonitorGlobalsingletonsupervisorConfigurationmanageron each nodeRebalanceorchestratorNodehealthmonitorone per clustervBucketstateandreplicationmanagerhttpRESTmanagementAPI/WebUIHTTP8091Erlang port mapper4369Distributed Erlang21100 - 21199Erlang/OTPstorage interfaceCouchbase EP Engine11210Memcapable 2.0Moxi11211Memcapable 1.0MemcachedNew Persistence Layer8092Query APIQueryEngineData Manager Cluster Manager
  8. 8. Couchbase Server 2.0 ArchitectureHeartbeatProcessmonitorGlobalsingletonsupervisorConfigurationmanageron each nodeRebalanceorchestratorNodehealthmonitorone per clustervBucketstateandreplicationmanagerhttpRESTmanagementAPI/WebUIHTTP8091Erlang port mapper4369Distributed Erlang21100 - 21199Erlang/OTPstorage interfaceCouchbase EP Engine11210Memcapable 2.0Moxi11211Memcapable 1.0Built-in CacheNew Persistence Layer8092Query APIQueryEngine
  9. 9. Couchbase Operations
  10. 10. 3333 22Single node - Couchbase Write OperationManaged CacheDiskQueueDiskReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 1Doc 1To other node
  11. 11. 3333 22Single node - Couchbase Update OperationManaged CacheDiskQueueReplicationQueueApp ServerDoc 1’Doc 1Doc 1’Doc 1Doc 1’DiskTo other nodeCouchbase Server Node
  12. 12. GETDoc13333 22Single node - Couchbase Read OperationDiskQueueReplicationQueueApp ServerDoc 1Doc 1Doc 1Managed CacheDiskTo other nodeCouchbase Server Node
  13. 13. 3333 22Single node - Couchbase Cache Eviction2DiskQueueReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 6Doc 5Doc 4Doc 3Doc 2Doc 1Doc 6 Doc 5 Doc 4 Doc 3 Doc 2Managed CacheDiskTo other node
  14. 14. 3333 22Single node – Couchbase Cache Miss2DiskQueueReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 3Doc 5 Doc 2Doc 4Doc 6 Doc 5 Doc 4 Doc 3 Doc 2Doc 4GETDoc1Doc 1Doc 1Managed CacheDiskTo other node
  15. 15. Couchbase Server ClusterCluster-wide Basic Operation• Docs distributed evenly acrossservers• Each server stores both active andreplica docsOnly one server active at a time• Client library provides app withsimple interface to database• Cluster map provides mapto which server doc is onApp never needs to know• App reads, writes, updates docs• Multiple app servers can access samedocument at same timeUser Configured Replica Count = 1READ/WRITE/UPDATEActiveDoc 5Doc 2DocDocDocServer 1ActiveDoc 4Doc 7DocDocDocServer 2Doc 8ActiveDoc 1Doc 2DocDocDocREPLICADoc 4Doc 1Doc 8DocDocDocREPLICADoc 6Doc 3Doc 2DocDocDocREPLICADoc 7Doc 9Doc 5DocDocDocServer 3Doc 6App Server 1COUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapCOUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapApp Server 2Doc 9
  16. 16. Add Nodes to Cluster• Two servers addedOne-click operation• Docs automaticallyrebalanced acrossclusterEven distribution of docsMinimum doc movement• Cluster map updated• App databasecalls now distributedover larger number ofserversREPLICAActiveDoc 5Doc 2DocDocDoc 4Doc 1DocDocServer 1REPLICAActiveDoc 4Doc 7DocDocDoc 6Doc 3DocDocServer 2REPLICAActiveDoc 1Doc 2DocDocDoc 7Doc 9DocDocServer 3 Server 4 Server 5REPLICAActiveREPLICAActiveDocDoc 8 DocDoc 9 DocDoc 2 DocDoc 8 DocDoc 5 DocDoc 6READ/WRITE/UPDATE READ/WRITE/UPDATEApp Server 1COUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapCOUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapApp Server 2Couchbase Server ClusterUser Configured Replica Count = 1
  17. 17. Fail Over NodeREPLICAActiveDoc 5Doc 2DocDocDoc 4Doc 1DocDocServer 1REPLICAActiveDoc 4Doc 7DocDocDoc 6Doc 3DocDocServer 2REPLICAActiveDoc 1Doc 2DocDocDoc 7Doc 9DocDocServer 3 Server 4 Server 5REPLICAActiveREPLICAActiveDoc 9Doc 8Doc Doc 6 DocDocDoc 5 DocDoc 2Doc 8 DocDoc• App servers accessing docs• Requests to Server 3 fail• Cluster detects server failedPromotes replicas of docs toactiveUpdates cluster map• Requests for docs now go toappropriate server• Typically rebalancewould followDocDoc 1 Doc 3App Server 1COUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapCOUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapApp Server 2User Configured Replica Count = 1Couchbase Server Cluster
  18. 18. DEMO
  19. 19. Indexing and Querying – The basics• Define materialized views on JSON documents and thenquery across the data set• Using views you can define• Primary indexes• Simple secondary indexes (most common use case)• Complex secondary, tertiary and composite indexes• Aggregations (reduction)• Indexes are eventually indexed• Queries are eventually consistent• Built using Map/Reduce technology• Map and Reduce functions are written in Javascript
  20. 20. 3333 22Eventually indexed Views – Data flow2Managed CacheDiskQueueDiskReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 1Doc 1To other nodeView engineDoc 1
  21. 21. Couchbase Server ClusterIndexing and QueryingUser Configured Replica Count = 1ActiveDoc 5Doc 2DocDocDocServer 1REPLICADoc 4Doc 1Doc 8DocDocDocApp Server 1COUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapCOUCHBASE Client LibraryCOUCHBASE Client LibraryCluster MapApp Server 2Doc 9• Indexing work is distributedamongst nodes• Large data set possible• Parallelize the effort• Each node has index for data storedon it• Queries combine the results fromrequired nodesActiveDoc 5Doc 2DocDocDocServer 2REPLICADoc 4Doc 1Doc 8DocDocDocDoc 9ActiveDoc 5Doc 2DocDocDocServer 3REPLICADoc 4Doc 1Doc 8DocDocDocDoc 9Query
  22. 22. Cross Data Center Replication – The basicseplicate your Couchbase data across clusterslusters may be spread across geosonfigured on a per-bucket (per-database) basisupports unidirectional and bidirectional operationpplication can read and write from both clusters­ Active – Active replication
  23. 23. 3333 22Cross data center replication – Data flow2Managed CacheDiskQueueDiskReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 1Doc 1To other nodeXDCR QueueDoc 1To other cluster
  24. 24. Cross Data Center Replication (XDCR)Couchbase Server ClusterNY DATA CENTERActiveDocDoc 2Server 1Doc 9Server 2 Server 3RAMDoc Doc DocActiveDocDocDocRAMActiveDocDocDocRAMDISKDoc Doc DocDISKDoc Doc DocDISKCouchbase Server ClusterSF DATA CENTERActiveDocDoc 2Server 1Doc 9Server 2 Server 3RAMDoc Doc DocActiveDocDocDocRAMActiveDocDocDocRAMDISKDoc Doc DocDISKDoc Doc DocDISK
  25. 25. Elasticsearch Integration (via XDCR)RAM CACHERAM CACHEDoc 1Doc 2DocDocDocDocDocDocDocDocDocSERVER 1Doc 6DISKDISKRAM CACHERAM CACHEDoc 1Doc 2DocDocDocDocDocDocDocDocDocSERVER 2Doc 6DISKDISKRAM CACHERAM CACHEDoc 1Doc 2DocDocDocDocDocDocDocDocDocSERVER 3Doc 6DISKDISKCouchbase ClusterES SERVER 1Elasticsearch Cluster180180180180180180180180180180180180ES SERVER 2 ES SERVER 3CouchbaseCouchbaseTransportTransportPluginPluginCouchbaseCouchbaseTransportTransportPluginPluginCouchbaseCouchbaseTransportTransportPluginPlugin
  26. 26. DEMO
  27. 27. Demo: Data for Social Game3 Objects (documents) within game:• Players• Monsters• ItemsGameplay:• Players fight monsters• Monsters drop items• Players own items
  28. 28. Player Document{"jsonType": "player","uuid": "35767d02-a958-4b83-8179-616816692de1","name": "Keith4540","hitpoints": 75,"experience": 663,"level": 4,"loggedIn": false}Player ID
  29. 29. Item Document{"jsonType": "item","name": "Katana_e5890c94-11c6-65746ce6c560","uuid": "e5890c94-11c6-4856-a7a6-65746ce6c560","ownerId": "Dale9887"}Item IDPlayer ID
  30. 30. Monster Document{"jsonType": "monster","name": "Bauchan9932","uuid": "d10dfc1b-0412-4140-b4ec-affdbf2aa5ec","hitpoints": 370,"experienceWhenKilled": 52,"itemProbability": 0.5050581341872865}Monster ID
  31. 31. Official SDKsCommunity SDKswww.couchbase.com/developPythonRubyGo Clojure
  32. 32. Q & A
  33. 33. Thank you!anil@couchbase.com@anilkumar1129Get Couchbase Server athttp://www.couchbase.com/download

×