Apache CouchDB

Apache CouchDB

JSON document database

Description

The hard part of an offline-capable mobile or web app is sync: you edited locally while offline, and now you have to merge when the connection returns. Writing that logic yourself is long and bug-prone.
Apache CouchDB builds it into the database. It defines a replication protocol where several nodes accept writes and sync with each other, and browsers, phones and server clusters all use the same mechanism.

Documents are stored as JSON and the API is plain HTTP, so curl is enough for create, read, update and delete. Queries and transforms are written in JavaScript. Start with a single node and later grow into a cluster that spreads one logical database over several machines.

Features



Multi-primary replication: several nodes can write at once and sync both ways, which suits offline-first apps.

HTTP/JSON API: documents are JSON and every operation goes over HTTP, so no special client driver is needed.

JavaScript views: combine, transform and query documents with JavaScript.

Change notifications: get notified in real time when data changes, so front ends can refresh.

Fault-tolerant storage engine: built with data safety in mind, running as a single node or a cluster.