Table of Contents
Awesome that you want to learn more about Couchbase! This is the right place to start your journey. This chapter will teach you the basics of Couchbase and how to interact with it through the Java Client SDK.
If you haven't already,
latest Couchbase Server 2.0 release and install it. While following
the download instructions and setup wizard, make sure install the
beer-sample default bucket. It contains sample
data of beers and breweries, which we'll be using in our examples
here. If you've already installed Couchbase Server 2.0 and didn't
beer-sample bucket (or if you deleted
it), just open the Web-UI and navigate to
Buckets. Activate the
checkbox and click
Create. In the right hand
corner you'll see a notification box that will disappear once the
bucket is ready to be used.
Here's a quick outline of what you'll learn in this chapter:
Create a project in your favorite IDE and set up the dependencies.
Write a simple program to demonstrate connecting to Couchbase and saving some documents.
Write a program to demonstrate using Create, Read, Update, Delete (CRUD) operations on documents in combination with JSON serialization and deserialization.
Explore some of the API methods that will take you further than what you've seen previously.
From here on, we'll assume that you have a Couchbase Server 2.0 release running and the "beer-sample" bucket configured. If you need any help on setting up everything, there is plenty of documentation available:
The TCP/IP port allocation on Windows by default includes a restricted number of ports available for client communication. For more information on this issue, including information on how to adjust the configuration and increase the available ports, see MSDN: Avoiding TCP/IP Port Exhaustion.