A CouchDB implementation on top of levelup.
couchup is a database. The goal is to build a data model well suited for mobile applications that may need to work offline and sync later on and maintain smart client side caches. This data model is inspired by CouchDB but diverges greatly in the way it handles and resolves the revision history and conflicts.
couchup implements a "most writes wins" conflict resolution scheme and does not require or even allow user specific conflict resolution.
Another goal of
couchup is to be performant and modular. This repository only implements the base document storage layer. Indexes, attachments and replicators are implemented as additional modules.
couchup has made in revision tree storage along with some other simple optimizations mean that
couchup already has better write performance than CouchDB and the same consistency guarantees.
var couchup =store =;db
dbcompact // remove old revisions and sequences from the database.
var changes = dbchangeschanges
And can be used with
sleep-ref for replicating over the network via tcp,tls,http and https.
var sleepref =s =;http
You can also replicate between database objects in process.
Pull replication from CouchDB works and will continue to work continuously if you aren't updating the
couchup node you're writing it to. Bi-Directional replication with CouchDB will eventually result in conflicts on the CouchDB side because
couchup converts CouchDB's revision tree to a linear revision sequence.
Similarly, push replication to Apache CouchDB will work once but writing again will likely cause unnecessary conflicts on the CouchDB side.