Discover how to program interactions with the Couchbase Server via the data, query, and search services — using the Travel Sample Application with the built-in Travel Sample data Bucket. Discover how to program interactions with Couchbase Server 7.X via the Data, Query, and Search services — using the Travel Sample Application with the built-in Travel Sample data Bucket.
Fetch the Couchbase Scala SDK travel-sample Application REST Backend from github:
git clone https://github.com/couchbaselabs/try-cb-scala.git cd try-cb-scala
With Docker installed, you should now be able to run a bare-bones copy of Couchbase Server, load the travel-sample, add indexes, install the sample-application and its frontend, all by running a single command:
docker-compose --profile local up
For Couchbase Server 7.2, make sure that you have at least one node each of data; query; index; and search. For a development box, mixing more than one of these on a single node (given enough memory resources) is perfectly acceptable.
If you have yet to install Couchbase Server in your development environment start here.
See the README at https://github.com/couchbaselabs/try-cb-scala for full details of how to run and tweak the Scala SDK travel-sample app.
Give yourself a username and password and click Register.
You can now try out searching for flights, booking flights, and searching for hotels. You can see which Couchbase SDK operations are being executed by clicking the red bar at the bottom of the screen:
The backend code shows Couchbase Scala SDK in action with Query and Search, but also how to plug together all of the elements and build an application with Couchbase Server and the Scala SDK.
app directory contains the various components, classes and functions for handling users, registration, and SQL++ (formerly N1QL) queries.
See the Travel App Data Model reference page for more information about the sample data set used.