Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
9 Views and Indexes
Chapter Sections
Chapters

9.4. Development and Production Views

Due to the nature of the Couchbase cluster and because of the size of the datasets that can be stored across a cluster, the impact of view development needs to be controlled. Creating a view implies the creation of the index which could slow down the performance of your server while the index is being generated. However, views also need to be built and developed using the actively stored information.

To support both the creation and testing of views, and the deployment of views in production, Couchbase Server supports two different view types, Development views and Production views. The two view types work identically, but have different purposes and restrictions placed upon their operation.

The support for the two different view types means that there is a typical work flow for view development, as shown in the figure below:

Figure 9.7. Views — View Type Workflow

Views — View Type Workflow

The above diagram features the following steps:

  1. Create a development view and view the sample view output.

  2. Refine and update your view definition to suit your needs, repeating the process until your view is complete.

    During this phase you can access your view from your client library and application to ensure it suits your needs.

  3. Once the view definition is complete, apply your view to your entire Cluster dataset.

  4. Push your development view into production. This moves the view from development into production, and renames the index (so that the index does not need to be rebuilt).

  5. Start using your production view.

Individual views are created as part of a design document. Each design document can have multiple views, and each Couchbase bucket can have multiple design documents. You can therefore have both development and production views within the same bucket while you development different indexes on your data.

For information on publishing a view from development to production state, see Section 6.5.2, “Publishing Views”.