CD220 Developing Couchbase NoSQL Applications

מק"ט: #3535 | משך קורס: 32 שעות אק'

Use of an engaging real-world data model and codebase enables a practical approach to NoSQL application development. The course leverages the Couchbase Client Java SDK, Gson/JSON, and the CrudRepository<T> pattern. We start with a high level perspective on NoSQL applications, Couchbase Server, installing, and starting Couchbase Server; basic administration overview. From there, each lab exercise builds progressive skills in developing NoSQL applications that take advantage of Couchbase Server’s powerful capabilities and benefits.

Each student will practice and be able to perform all the basic NoSQL application development tasks that are required of a modern web application in the real world. Creating Buckets and usage of View/Index, Map/Reduce, and document oriented data will be gained through more than a dozen lab exercises which challenge the student to build real solutions with this NoSQL technology.

The client side Java SDK will be used extensively, including but not limited to: The Write Path, The Read Path, add, replace, CAS, set, and get, writing a Bucket utility with ClusterManager, writing a ClientFactory, data modeling with a document database, denormalization, CrudRespositories and Services, and View API with index creation and use.

The course will include use of the Couchbase Query Language: N1QL, and an introduction to Elastic Search with Couchbase. Students will learn the top ten current developer issues and best practices. 

הקורס פעיל לקבוצות מטעם ארגונים בלבד, ניתן לשלוח פנייה רק אם מדובר בקבוצה
*שדות חובה
PDF version

קהל יעד

This is hands-on developer training for people who want to get real work done with NoSQL database applications, working with Couchbase Server and the Client SDK. While the labs will be based on the Java SDK, the concepts, techniques and methods are applicable to any of the available SDKs (.NET, PHP, Ruby, Python, C, Node.js). Expect to spend more time writing solutions and less time watching a presentation. If you have a background in programming, want to write software and are technically savvy this is the right course for you.

תנאי קדם

The course is designed for participants with experience writing software in some modern language, such as Java, or C/C++, C#/.Net, or Python, Ruby, PHP, etc. Familiarity with basic programming fundamentals and database essentials is assumed. Some participants find it helpful to view our free Couchbase Training Webinars (Couchbase 101,102,103,104,105) before start of class, but these are optional. Experience with web development technologies (ASP, JSP, Perl, HTML, JavaScript) may be helpful.


Introduction to Couchbase Server

  • Couchbase Server Ecosystem
  • Couchbase Server Core Principles
  • Couchbase Server 3.0 Architecture
  • Anatomy of a Couchbase Application
  • Where does Data Live?
  • Data Hierarchy
  • Two Kinds of Buckets
  • Couchbase Operations
  • Single node - Couchbase Write Operation
  • Single node - Couchbase Update Operation
  • Single node - Couchbase Read Operation
  • Single node - Couchbase Cache Eviction
  • Single node – Couchbase Cache Miss
  • Using the Couchbase Web Console
  • Couchbase Java SDK 2.0 Overview
  • Introducing the CouchMusic Application
  • Bulk Loading JSON Documents with cbdocloader


Using the Couchbase Java SDK

  • Managing Connections
  • The Cluster interface
  • The Bucket interface
  • Working with Documents
  • The Document interface
  • The Transcoder interface
  • The insert methods of the Bucket interface
  • The get methods of the Bucket interface
  • The replace methods of the Bucket interface
  • The upsert methods of the Bucket interface
  • The remove methods of the Bucket interface
  • Review of Asynchronous Programming
  • Introduction to RxJava
  • The async method of the Bucket interface
  • The Observable class


Using Views

  • Leveraging the Power of Couchbase Views
  • Couchbase View Engine
  • Introduction to MapReduce
  • Developent vs. Production Views
  • View Code
  • Intro to Query API
  • Query Result Ordering
  • Indexing and Querying
  • Range Querying


Data Modeling

  • Implicit vs. Explicit Schema
  • Denormalization
  • Natural Keys vs. Surrogate Keys
  • What is a Key Pattern?
  • Counter-ID Pattern
  • Lookup Pattern
  • Reverse Lookup Array Pattern


Top Ten Developer Issues

  • Too Many Client Connections
  • Not Using Config Cache
  • Using ConfigCache
  • Don’t Use Views with Large Docs
  • Eight Fallacies
  • Error Timeout Handling
  • Writing a Good View
  • When to Have More than One Bucket
  • Randomizing Node List Prior to Connecting
  • Why do I need to reuse an Object?
  • Do I need to use Replica Read to scale my reads?


ElasticSearch Integration

  • Cross Data Center Replication (XDCR)
  • Configure XDCR
  • ElasticSearch Integration
  • Search Across Full JSON Document
  • Full Text Search
  • ElasticSearch Terminology


Full Text Search

  • How does it work?
  • Getting Started
  • Install the Couchbase Plugin
  • Documents are Now Being Indexed
  • Search Result Scoring
  • Simple Query with HTTP
  • Single Search Result
  • Recommended Usage Pattern

More Advanced Capabilities

  • Another Query with HTTP
  • Faceted Search
  • Faceted Search Query
  • Faceted Search Results
  • Update the Mapping
  • Geo Location Support
  • Explore ElasticSearch Capabilities
  • ElasticSearch Resources
  • Security: Encrypted Communication
  • Optimization: Massive Databases Metadata Ejection
  • Queryability: Lower Latency Memory-based updates for Views


Partial List of Labs:
Lab 1. Install/Start Couchbase Server
Lab 2. Configure IDE with JARs/Maven
Lab 3. Use ClusterManager to create a Couchbase Named Bucket for the PlayList application
Lab 4a. Create a CouchbaseClientFactory for PlayList application
Lab 4b. Refactor CouchbaseClientFactory to handle many clients (one per named bucket)
Lab 5. Create a User document using JSON and save the document to Couchbase Server with set(…)
Lab 6a. Create a UserRepository interface which extends CrudRepository<T>, and implement the save(…) method
Lab 6b. Write an overloaded save(Iterable<S> entities) method
Lab 6c. Write a refactored save(…) using the add(…) method
Lab 7. Create the UserRepositoryImpl update(…) methods
Lab 8. Create the UserRepositoryImpl exists(String key) method
Lab 9. Create the UserRepositoryImpl User findOne(String key) method
Lab 10. Create the UserRepositoryImpl delete(String key), delete(User u), and delete(Iterable<User> users) methods
Lab 11. Create a View/Index for users, by userId for use by the remaining CrudRepository methods: count(), findAll() and deleteAll()
Lab 12. Create the long count() method using the Query API types: .Query, .View and ViewResponse
Lab 13. Create the Iterable<User> findAll() method using the types: Paginator, as well as ViewResponse and ViewRow
Lab 14. Create the deleteAll() method using the Paginator
Lab 15. Data Modeling: De-normalization Basics and Documents with Json
Lab 16. Data Modeling: PlayList, Song, SongInfo, and PlayListService which <<HAS-A>> SongRepository
Lab 17. Create the SongRepositoryImpl methods
Lab 18. Create the PlayList class
Lab 19. Create the PlayListService class
Lab 20. Create an AuthenticationService which <<HAS-A>> UserRepository, and implement the authenticate(Credentials cred) method
Lab 21. Create the PlayListController class <<HAS-A>> AuthenticationService, and <<HAS-A>> PlayListService;
Lab 22. Instantiate a User who is already in the system, and authenticate them, and then allow that authenticated user to test all the methods available in the PlayListService