Development views

Development views

Views are created in a development environment in order to control the impact of views prior to deployment.

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.

Development views are designed to be used while you are still selecting and designing your view definitions. While a view is in development mode, views operate with the following attributes:

  • By default the development view works on only a subset of the stored information. You can, however, force the generation of a development view information on the full dataset.
  • Development views use live data from the selected Couchbase bucket, enabling you to develop and refine your view in real-time on your production data.
  • Development views are not automatically rebuilt, and during a rebalance operation, development views are not updated, even when when consistent views are enabled, as this relies on the automated update mechanism. Updating development views in this way would waste system resources.
  • Development views are fully editable and modifiable during their lifetime. You can change and update the view definition for a development view at any time. During development of the view, you can view and edit stored document to help develop the view definition.
  • Development views are accessed from client libraries through a different URL than production views, making it easy to determine the view type and information during development of your application.

Within the Web Console, the execution of a view by default occurs only over a subset of the full set of documents stored in the bucket. You can elect to run the View over the full set using the Web Console.

Because of the selection process, the reduced set of documents may not be fully representative of all the documents in the bucket. You should always check the view execution over the full set.