Webinaire - Introduction à Couchbase Server

413 views
388 views

Published on

Couchbase Server 2.0 est une base de donnée NoSQL orientée document, cela inclus le support de JSON, la capacité d’indexer et de requêter ces documents et également la réplication entre Data Center (XDCR). Couchbase Server 2.0 garantit également des accès à hautes performances et consistants, une gestion simple de la montée en charge « par simple click » , et une maintenance de votre cluster de base de données à chaud.

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
413
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • JSON support – natively stored as json, whne you build an app, there is not conversion required. New doc viewing , editing capability. Indexing and querying – look inside your json, build views and query for a key, for ranges or to aggregate data Incremental mapreduce – powers indexing. Build complex views over your data. Great for real-time analytics XDCR – replicate information from one cluster to another cluster
  • 1.  A set request comes in from the application .2.  Couchbase Server responses back that they key is written3. Couchbase Server then Replicates the data out to memory in the other nodes4. At the same time it is put the data into a write que to be persisted to disk
  • 1.  A set request comes in from the application .2.  Couchbase Server responses back that they key is written3. Couchbase Server then Replicates the data out to memory in the other nodes4. At the same time it is put the data into a write que to be persisted to disk
  • Bulletize the text. Make sure the builds work.
  • Bulletize the text. Make sure build work properly.
  • Bulletize the text. Make sure build work properly.
  • Rapid app devwithouth the need to perform an expensive alter table operation.
  • Bulletize the text. Make sure the builds work.
  • Overview of what this feature is
  • Webinaire - Introduction à Couchbase Server

    1. 1. Introduction àCouchbase Server 2.0Tugdual GrallTechnicalEvangelist@tgrall
    2. 2. {“about” : “me”}Tugdual “Tug” Grall• Couchbase• Technical Evangelist• eXo• CTO• Oracle• Developer/Product Manager• Mainly Java/SOA• Developer in consulting firms• Web• @tgrall• http://blog.grallandco.com• Tgrall• NantesJUG co-founder• Pet Project :• http://www.resultri.com
    3. 3. Agenda1. Introduction to Couchbase Server2. Cluster Management3. Operation and Document Design4. Introduction to Views and Queries5. Cross Data Center Replication6. Q&ACouchbase Developer Day Paris is this Friday! http://couchbase.com/events
    4. 4. Couchbase Server 2.0
    5. 5. Couchbase ServerNoSQL Document Database
    6. 6. Couchbase Open Source Project• Leading NoSQL database projectfocused on distributed databasetechnology and surroundingecosystem• Supports both key-value anddocument-oriented use cases• All components are availableunder the Apache 2.0 PublicLicense• Obtained as packaged software inboth enterprise and communityeditions.CouchbaseOpen Source Project
    7. 7. EasyScalabilityConsistent HighPerformanceAlwaysOn24x365Grow cluster withoutapplication changes, withoutdowntime with a single clickConsistent sub-millisecondread and write response timeswith consistent high throughputNo downtime for softwareupgrades, hardwaremaintenance, etc.JSONJSONJSONJSONJSONFlexible DataModelJSON document model withno fixed schema.Couchbase Server
    8. 8. New in 2.0JSON support Indexing and QueryingCross data center replicationIncremental Map ReduceJSONJSONJSONJSONJSON
    9. 9. HeartbeatProcessmonitorGlobalsingletonsupervisorConfigurationmanageron each nodeRebalanceorchestratorNodehealthmonitorone per clustervBucketstateandreplicationmanagerhttpRESTmanagementAPI/WebUIHTTP8091Erlang port mapper4369Distributed Erlang21100 - 21199Erlang/OTPstorage interfaceCouchbase EP Engine11210Memcapable 2.0Moxi11211Memcapable 1.0MemcachedNew Persistence Layer8092Query APIQueryEngineData Manager Cluster ManagerCouchbase Server 2.0 Architecture
    10. 10. New Persistence Layerstorage interfaceCouchbase EP Engine11210Memcapable 2.0Moxi11211Memcapable 1.0Object-level CacheDisk Persistence8092Query APIQueryEngineHTTP8091Erlang port mapper4369Distributed Erlang21100 - 21199HeartbeatProcessmonitorGlobalsingletonsupervisorConfigurationmanageron each nodeRebalanceorchestratorNodehealthmonitorone per clustervBucketstateandreplicationmanagerhttpRESTmanagementAPI/WebUIErlang/OTPServer/ClusterManagement &Communication(Erlang)RAM Cache,Indexing &PersistenceManagement(C & V8)The Unreasonable Effectiveness of C by Damien KatzCouchbase Server 2.0 Architecture
    11. 11. 33 2Single node - Couchbase WriteOperationManaged CacheDiskQueueDiskReplicationQueueApp ServerCouchbase Server NodeDoc 1Doc 1Doc 1To other node
    12. 12. GETDoc133 2Single node - Couchbase ReadOperationDiskQueueReplicationQueueApp ServerDoc 1Doc 1Doc 1Managed CacheDiskTo other nodeCouchbase Server Node
    13. 13. COUCHBASE SERVER CLUSTERBasic 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 LibraryCLUSTER MAPCOUCHBASE Client LibraryCLUSTER MAPAPP SERVER 2Doc 9
    14. 14. 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 LibraryCLUSTER MAPCOUCHBASE Client LibraryCLUSTER MAPAPP SERVER 2COUCHBASE SERVER CLUSTERUser Configured Replica Count = 1
    15. 15. 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 LibraryCLUSTER MAPCOUCHBASE Client LibraryCLUSTER MAPAPP SERVER 2User Configured Replica Count = 1COUCHBASE SERVER CLUSTER
    16. 16. Demo Time
    17. 17. Operation & Document Design
    18. 18. Basic Store & Retrieve Operations• get(key)Retrieve a document• set(key, value)Store a document or replace if it exists• add(key, value)Store a document and fail if it exists• replace(key, value)Replace a document and fail if it does not exist
    19. 19. Lots of other Operations• Atomic Counters (increment, decrement)• Append/Prepend• CAS (Compare and Set)- Optimistic Locking• “Get with Lock”- Write Lock on Objects• Bulk Operations- Saves network overhead• Stats• View operations
    20. 20. Couchbase 2.0 Bonus Points: JSON• JSON is a lightweight format to represent document structurein a language-independent manner.• If JSON documents are stored, the View engine can be used.• Allows to build secondary indexes on your datasets.• Makes it possible to ask questions like“Give me all user documents by lastname”.
    21. 21. Flexible Data Model• No need to worry about the database when changing yourapplication• Records can have different structures, there is no fixedschema• Allows painless data model changes for rapid applicationdevelopment{“ID”: 1,“FIRST”: “Dipti”,“LAST”: “Borkar”,“ZIP”: “94040”,“CITY”: “MV”,“STATE”: “CA”}JSONJSONJSON JSON
    22. 22. Aggregate View of Datahttp://martinfowler.com/bliki/AggregateOrientedDatabase.html
    23. 23. Store and Retrieve Aggregates• Easier to Distribute Data• More Flexibility• Reduced Latencyorder::1001{uid: ji22jd,customer: Ann,line_items: [{ sku: 0321293533, quan: 3, unit_price: 48.0 },{ sku: 0321601912, quan: 1, unit_price: 39.0 },{ sku: 0131495054, quan: 1, unit_price: 51.0 }],payment: { type: Amex, expiry: 04/2001,last5: 12345 }}
    24. 24. Demo Time
    25. 25. Official SDKsCommunity SDKswww.couchbase.com/developPythonRubyGo Clojure
    26. 26. Indexing and Querying
    27. 27. 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
    28. 28. COUCHBASE SERVER CLUSTERIndexing and QueryingUser Configured Replica Count = 1ACTIVEDoc 5Doc 2DocDocDocSERVER 1REPLICADoc 4Doc 1Doc 8DocDocDocAPP SERVER 1COUCHBASE Client LibraryCLUSTER MAPCOUCHBASE 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
    29. 29. Demo Time
    30. 30. Cross Data Center Replication(XDCR)
    31. 31. Cross Data Center Replication – The basics• Replicate your Couchbase data across clusters• Clusters may be spread across geos• Configured on a per-bucket (per-database) basis• Supports unidirectional and bidirectional operation• Application can read and write from both clusters- Active – Active replication• Replication throughput scales out linearly• Different from intra-cluster replication
    32. 32. Cross Data Center Replication (XDCR)COUCHBASE SERVER CLUSTERUSACTIVEDocDoc 2SERVER 1Doc 9SERVER 2 SERVER 3RAMDoc Doc DocACTIVEDocDocDocRAMACTIVEDocDocDocRAMDISKDoc Doc DocDISKDoc Doc DocDISKCOUCHBASE SERVER CLUSTEREMEAACTIVEDocDoc 2SERVER 1Doc 9SERVER 2 SERVER 3RAMDoc Doc DocACTIVEDocDocDocRAMACTIVEDocDocDocRAMDISKDoc Doc DocDISKDoc Doc DocDISK
    33. 33. Couchbase Handles Real World Scale
    34. 34. Q & A
    35. 35. • Couchbase DeveloperDays Paris- This Friday !- Presentations & Labs- Information• http://www.couchbase.com/events- Use the promo code TUG
    36. 36. Thank you!tug@couchbase.com@tgrallGet Couchbase Server athttp://www.couchbase.com/download

    ×