Book Image

Learning Couchbase

By : Henry Potsangbam
Book Image

Learning Couchbase

By: Henry Potsangbam

Overview of this book

This book achieves its goal by taking up an end-to-end development structure, right from understanding NOSQL document design to implementing full fledged eCommerce application design using Couchbase as a backend. Starting with the architecture of Couchbase to get you up and running, this book quickly takes you through designing a NoSQL document and implementing highly scalable applications using Java API. You will then be introduced to document design and get to know the various ways to administer Couchbase. Followed by this, learn to store documents using bucket. Moving on, you will then learn to store, retrieve and delete documents using smart client base on Java API. You will then retrieve documents using SQL like syntax call N1QL. Next, you will learn how to write map reduce base views. Finally, you will configure XDCR for disaster recovery and implement an eCommerce application using Couchbase.
Table of Contents (12 chapters)
Index

Chapter 9. Data Replication and Compaction

In a production environment, we replicate data to multiple systems for the purpose of reporting or disaster recovery. When the source system fails, the replicated data is used to recover the system. Thus, replication provides a way to fail-over the system when there is a disaster. Other than disasters, a replicated system is also often used for the reporting purpose. In order to minimize load on main transaction servers, we can replicate data so that ad hoc reporting queries are executed in the replica system without loading the transaction system. These are very common in crucial transaction systems.

Most database systems provide a mechanism to replicate data between systems through log shipping, mirroring of disks, SAN-to-SAN replication, and so on. Likewise, Couchbase provides a way to replicate documents between systems by buckets. It provides replication, which can be configured in just a few mouse clicks. Replication configuration in Couchbase...