Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Getting started developing with Couchbase – Connect Silicon Valley 2017

140 views

Published on

Speaker: Matt Ingenthron

To develop a more engaging user experience for your apps, you need a simplified, no compromises approach to working with a distributed system. Developing with Couchbase, you get exactly that.

As a developer in Java, .NET, Node.js, or other top platforms, Couchbase gives you a simple programming model over a cluster. Accessing the super-fast key-value service, the flexible query service, or the full-text service is seamless. Through the SDK's understanding of the cluster topology, you simply work with documents directly on a cluster. You also have the ability to optimize concurrency between users and recover from any failures that may happen within the system.

This session will give you an overview of the concepts you'll need when developing with Couchbase, and then a sense of how you use the APIs at hand from core KV to N1QL query to Full Text Search and everything in between. You'll also get a glimpse of frameworks to simplify further and connectors to complete the design of your highly user-engaging apps.

Published in: Technology
  • Be the first to comment

Getting started developing with Couchbase – Connect Silicon Valley 2017

  1. 1. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. GETTING STARTED DEVELOPING WITH COUCHBASE Matt Ingenthron Senior Director, Engineering
  2. 2. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. AGENDA 01/ 02/ 03/ Programming Model and Updates Get Started Architecting for Engagement
  3. 3. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 1 PROGRAMMING MODEL AND UPDATES
  4. 4. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 4 Couchbase Platform over Time Couchbase Server 2.x Northscale Memcached 1.0 Couchbase Server 1.8 Membase 1.6 June, 2010 December, 2012 March, 2010 January, 2012 Couchbase Server 3.x and SDK 2.x Couchbase Server 4.x October, 2015 December, 2014
  5. 5. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 5 Mobile & IoT Analytics Preview KV Query Search Elastic Scale Architecture Memory-first Architecture Unified Programming Core Database Engine Infrastructure - Cloud & Containers CrossStackSecurity SQL&BigData Integrations Couchbase Data Platform
  6. 6. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 6 Couchbase Programming Model • What is in the Core? Cluster Bucket Data (K-V) View Query N1QL Query Functional Manage connections to the bucket within the cluster for different services. Provide a core layer where IO can be managed and optimized. Provide a way to manage buckets. API insertDesignDocument() flush() listDesignDocuments() Functional Hold on to cluster information such as topology. API Reference Cluster Management openBucket() info() disconnect() Functional Give the application developer a concurrent API for basic (k-v) or document management API get() insert() upsert() remove() Functional Allow for querying, execution of other directives such as defining indexes and checking on index state. API abucket.NewN1QLQuery( “SELECT * FROM default LIMIT 5” ) .Consistency(gocouchbase.RequestPlus); Functional Allow for view querying, building of queries and reasonable error handling from the cluster. API abucket .NewViewQuery() .Limit().Stale() FTS Search Functional Allow for searching, fuzzier matching against well defined indexes. API abucket .NewSearchQuery( "myindex", new MatchQuery(…))
  7. 7. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 7 On Developer Platforms Frameworks on Platforms Meeting Platform Idioms Core Cluster Capabilities • ASP.NET • Spring Data • Ottoman.js • Asynchronous API • RxJava • .NET Async/Await • Supporting common datatype APIs • Handle Topology Changes • Consistency Controls • High Availability Features
  8. 8. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 8 Most Recently Further up the Stack • Spring Data as a Supported Platform • Ottoman for Node.JS • Apache Spark Connector • Kafka Connector New Open Source Projects • Rust Language Support • Web Socket Streaming Data Directly in API Surface Area • Sub-Document API • Chain and execute small commands understanding JSON • Data Structures Support • Platform API or Common API for Lists, Sets Queues • Support for .NET CORE • Cluster Level Authentication • User and Cluster Management • Analytics Query Support
  9. 9. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 9 New Developer Capabilities with Couchbase 5.0 • Fast Failover for Couchbase • Data Access Convergence for Couchbase Mobile • New Diagnosis Abilities • Role Based Access Control • Full Text Search • Ephemeral Bucket Support • Multi-Cluster Awareness for Java
  10. 10. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 10 Adding Framework Support More Framework Support • .NET Extensions • Session and Caching Provider for ASP.NET Core • Dependency Injection for .NET Core and Full • Spring Data Couchbase • Spring Data 3.0 "Kay" support with full end-to- end reactive programming
  11. 11. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 11 Connector Updates
  12. 12. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 2 GET STARTED
  13. 13. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 13 Getting Started - Ideal • Download Couchbase Server • Model your data • Model data from the application access perspective, or • Adapt your data model from data sources • Pick your language/platform of choice, start from the Get Started • Optional: Pick up a sample application, based on the travel-sample dataset • Gives a demonstration data model, queries, searches and samples on nearly every part of the API
  14. 14. 14 Getting Started - Current App 1. Wrap 2. Shadow Migrate 3. Migration Tools
  15. 15. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 15 Wrap Existing Applications • Add a cache • Allows you to get a sense of data model • Add a Couchbase Mobile Backed Local App Feature • Introduce a feature • Use N1QL or FTS for recommendation targeting or metadata • Improve User Profile Management
  16. 16. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 16 Shadow Migrate • Use Data Access Layer • Write to multiple systems • Read from existing, until… • Slowly Introduce Application Changes • Maybe introduce a Data Access Layer • Maybe turn part of your message based architecture to Couchbase • In the end… • Leave the old system in place, or • Write migration utilities for anything remaining
  17. 17. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 17 Migrate using Tools • Talend Open Studio • Couchbase Spark Connector • Informatica • Couchbase tools: cbtransfer, SDK bulk APIs, cbimport
  18. 18. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 3 ARCHITECTING FOR ENGAGEMENT
  19. 19. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 19 Designing for Engagement Memory Orientation Durability Differences Flexible Consistency Managing Load
  20. 20. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 20 Memory Orientation Has a few consequences • Allowed we developers to build apps that operate more at the speed of memory Year Average Cost Per Gigabyte 2015 $4.37 2015 $4.94 2013 $5.5 2010 $12.37 2005 $189 2000 $1,107 1995 $30,875 1990 $103,880 1985 $859,375 1980 $6,328,125 Source: http://www.statisticbrain.com/average-historic-price-of-ram/
  21. 21. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 21 Durability Differences • What does durability mean with a cluster of cloud nodes? ReplicateTo.Two PersistTo.Two
  22. 22. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 22 Flexible Consistency • Consistency requirements depend on application context • Leader Board • Changing my email address in my profile • Primary Access is Always Consistent within a Single Cluster • Secondary index based access gives the developer control • NOT_BOUNDED • REQUEST_PLUS • AT_PLUS (in 4.5 and later) var query = N1qlQuery .fromString(statement) .consistency( N1qlQuery.Consistency.REQUEST_PLUS); N1qlQueryResult result = bucket.query( N1qlQuery.simple( statement, N1qlParams .build() .consistency(ScanConsistency.AT_PLUS) ) );
  23. 23. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 23 Managing Load • Backpressure • Coordinate flow control under stressful conditions • Circuit breakers • With complex application and data service interaction, ensure "circuit open" conditions
  24. 24. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 24 Couchbase Data Platform - Core for Engagement • Programming model on a substrate that handles the details. • Auto-failover • XDCR • Polyglot-persistence • Security Mobile & IoT Analytics Preview KV Query Search Elastic Scale Architecture Memory-first Architecture Unified Programming Core Database Engine Infrastructure - Cloud & Containers CrossStackSecurity SQL&BigData Integrations
  25. 25. 25 Let's Engage!  Download Couchbase  Start Developing – Try a Sample App  Engage us on forums.couchbase.com, community.couchbase.com  Share what you build and where you want to go next!
  26. 26. 26 Questions?
  27. 27. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. THANK YOU
  28. 28. Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 28 Image Attribution Thanks to those who provided rights to reusable images… Raising hand for question: https://upload.wikimedia.org/wikipedia/commons/d/d6/A_child_with_the_TAPS_organization_raises_his_hand_to_ask_a_q uestion_to_Gen._Martin_E._Dempsey%2C_May_2012.jpg Russian politician nesting dolls: https://upload.wikimedia.org/wikipedia/commons/c/c2/Matryoshka_Russian_politicians.jpg Trump nesting dolls: https://www.etsy.com/listing/504659720/donald-trump-stacking-dolls-matryoshka?gpla=1&gao= Green field: https://pixabay.com/p-2563702/?no_redirect Brownfield: https://c1.staticflickr.com/6/5092/5389529869_08f7ddd5f0_b.jpg IBM S360: https://upload.wikimedia.org/wikipedia/commons/a/a0/IBM_system_360.JPG Rocket taking off: https://pixabay.com/en/lift-off-rocket-launch-spacex-693258/

×