CD220 Developing Couchbase NoSQL Applications


This course provides 3 days of progressive hands-on flight time building a working NoSQL web application in Java/RxJava. With a mix of instruction, demos and intensive programming labs, participants develop an actual Couchbase NoSQL app that reflects typical use-cases for scalable NoSQL databases operating across the cloud.  Download course description. 
What customers say about CD220: Customer testimonials


Use of an engaging real-world data model and codebase enables a practical approach to NoSQL application development in J2EE libraries. 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.


3 Days


This is hands-on developer training for people who want to get real work done with NoSQL database applications, working with Couchbase Server and our Java SDK. While all labs are based on Java and RxJava, 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 concepts in the course can be learned by experienced Java developers, and others familiar with Java who may prefer to develop in C/C++, C#/.Net, or Python, Ruby, PHP, etc. All labs are in Java and the course presumes adequate Java programming skills. Participants should gain some background in rxjava, reactive programming in java, before arrival in class (see Additional Notes). Familiarity with programming fundamentals and database essentials is assumed. Some find it helpful to view the Couchbase Training Webinars (Couchbase 101,102,103,104,105) before start of class, but these are optional. We strongly suggest Participants complete the following Couchbase online courses prior to class: CB030 and CB110.

Additional Notes

Preparation in advance of class: participants are strongly advised to review and learn about ReactiveX extensions to Java, otherwise known as rxjava. The reactive controls for java consist of a library for composing asynchronous and event-based programs using observable sequences for the java vm. Links to resources are provided at:

Participation during class: since the class covers concepts at a rapid pace and because lab assignments are additive and progressive, it is important for students to devote their full attention to the training. If students miss one of the earlier labs or fail to complete it this may prevent or reduce ability to complete subsequent labs.


A partial list of concepts, topics and labs subject to changes and updates without prior notice from time to time. (Please note: in UK/EMEA until April 30, 2015 this course will continue to be based on SDK 1.4. Outline for UK/EMEA CD220 prior to April 30)

Topics and Labs may include:

1 Introduction to Couchbase Server
1.1 Couchbase Server Ecosystem
1.2 Couchbase Server Core Principles
1.3 Couchbase Server 3.0 Architecture
1.4 Anatomy of a Couchbase Application
1.5 Where does Data Live?
1.6 Data Hierarchy
1.7 Two Kinds of Buckets
1.8 Couchbase Operations
1.9 Single node - Couchbase Write Operation
1.10 Single node - Couchbase Update Operation
1.11 Single node - Couchbase Read Operation
1.12 Single node - Couchbase Cache Eviction
1.13 Single node – Couchbase Cache Miss
1.14 Using the Couchbase Web Console
1.15 Couchbase Java SDK 2.0 Overview
1.16 Introducing the CouchMusic Application
1.17 Bulk Loading JSON Documents with cbdocloader
2 Using the Couchbase Java SDK
2.1 Managing Connections
2.2 The Cluster interface
2.3 The Bucket interface
2.4 Working with Documents
2.5 The Document interface
2.6 The Transcoder interface
2.7 The insert methods of the Bucket interface
2.8 The get methods of the Bucket interface
2.9 The replace methods of the Bucket interface
2.10 The upsert methods of the Bucket interface
2.11 The remove methods of the Bucket interface
2.12 Review of Asynchronous Programming
2.13 Introduction to RxJava
2.14 The async method of the Bucket interface
2.15 The Observable class
3 Using Views
3.1 Leveraging the Power of Couchbase Views
3.2 Couchbase View Engine
3.3 Introduction to MapReduce
3.4 Developent vs. Production Views
3.5 View Code
3.6 Intro to Query API
3.7 Query Result Ordering
3.8 Indexing and Querying
3.9 Range Querying
4 Data Modeling
4.1 Implicit vs. Explicit Schema
4.2 Denormalization
4.3 Natural Keys vs. Surrogate Keys
4.4 What is a Key Pattern?
4.5 Counter-ID Pattern
4.6 Lookup Pattern
4.7 Reverse Lookup Array Pattern
5 Top Ten Developer Issues
5.1 Too Many Client Connections
5.2 Not Using Config Cache
5.3 Using ConfigCache
5.4 Don’t Use Views with Large Docs
5.5 Eight Fallacies
5.6 Error Timeout Handling
5.7 Writing a Good View
5.8 When to Have More than One Bucket
5.9 Randomizing Node List Prior to Connecting
5.10 Why do I need to reuse an Object?
5.11 Do I need to use Replica Read to scale my reads?
6 ElasticSearch Integration
6.1 Cross Data Center Replication (XDCR)
6.2 Configure XDCR
6.3 ElasticSearch Integration
6.4 Search Across Full JSON Document
6.5 Full Text Search
6.6 ElasticSearch Terminology
7. Full Text Search
7.1 How does it work?
7.2 Getting Started
7.3 Install the Couchbase Plugin
7.4 Documents are Now Being Indexed
7.5 Search Result Scoring
7.6 Simple Query with HTTP
7.7 Single Search Result
7.8 Recommended Usage Pattern
8 More Advanced Capabilities
8.1 Another Query with HTTP
8.2 Faceted Search
8.3 Faceted Search Query
8.4 Faceted Search Results
8.5 Update the Mapping
8.6 Geo Location Support
8.7 Explore ElasticSearch Capabilities
8.8 ElasticSearch Resources
8.9 Security: Encrypted Communication
8.10 Optimization: Massive Databases Metadata Ejection
8.11 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 

Public Training

Kirkland, WA

El Segundo, CA

San Francisco, CA

Dallas, TX

Chicago, il

Atlanta, Georgia

Burlington, MA

New York, NY

VIRTUAL Class - Eastern / Central Time

Paris, Ile-de-France


VIRTUAL Class - Pacific / Mountain Time

Denver, CO

Classes marked with Confirmed are guaranteed to run. Sign up now while there is still space available!