All tip Blog Posts
Offline-First with CouchDB and PouchDB in 2025 posted Wednesday, March 26, 2025 by The Neighbourhoodie Team tipCouchDBsyncoffline first
A few weeks ago, we gave you tooling to quickly and easily host your own CouchDB: CouchDB Minihosting! This week, we’re providing a demo application you can deploy on that installation, so you can try that part out with zero hassle. On top of that, consider this an up-to-date, best practises demo app for Offline-First with CouchDB and PouchDB. We’re using Svelte 5 with Vite as build tooling and Pico.css for styles.
Read the articleUnderstanding Database Partitioning in CouchDB posted Wednesday, March 12, 2025 by The Neighbourhoodie Team tipCouchDB
CouchDB partitions optimise performance both with storage and queries. Find out how they work — and how to make the most of them.
Read the articleIntroducing: How to Host Your Own CouchDB with CouchDB Minihosting posted Wednesday, March 5, 2025 by The Neighbourhoodie Team tipCouchDB
CouchDB is a great database, but there’s a slight lack of easy-to-use, affordable CouchDB hosters, or hosting services that offer CouchDB as an add-on. So we decided to make rolling your own hosted CouchDB as simple and quick as we could: with our Open Source CouchDB Minihosting. Let’s have a look!
Read the articleHow CouchDB Prevents Data Corruption: fsync posted Wednesday, February 26, 2025 by The Neighbourhoodie Team tipproductCouchDBdata
Programming can be exciting when the underlying fundamentals you’ve been operating under suddenly come into question. Especially when it comes to safely storing data. This is a story of how the CouchDB developers had a couple of hours of excitement making sure their fundamentals were solid (and your data was safe).
Read the articleCouchDB Data Modelling: Prefer Smaller Attachments posted Wednesday, February 19, 2025 by The Neighbourhoodie Team tipproductCouchDB
We’ve already shared a CouchDB data modelling tip about preferring smaller docs. This one is about smaller attachments.
Read the articleCouchDB Data Modelling: Prefer Smaller Documents posted Thursday, February 13, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB document design has a big impact on database performance — so how do you get it right?
Read the articleCouchDB is a Great Choice for Prototypes, Side Projects and Internal Tooling posted Wednesday, February 5, 2025 by Alex tipCouchDB
CouchDB is a fantastic database with some unique capabilities, and we love it for all sorts of reasons. But there are a couple of characteristics that make it especially attractive for small, quick projects, demos, and proofs of concept. Let’s explore this in more detail.
Read the articleAlways Compact posted Wednesday, January 29, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB’s revision control system can sometimes lead to the assumption that CouchDB works like git, where you can access all versions of a document for eternity. Though it’s tempting, it’s inaccurate, and knowing why is important for understanding database health.
Read the articleHow CouchDB Prevents Data Corruption: Checksums posted Wednesday, January 22, 2025 by The Neighbourhoodie Team tipproductCouchDBdata
CouchDB is your data’s safe place. It does everything in its power not to accidentally lose any of your data. However, sometimes circumstances are not in CouchDB’s power.
One of those circumstances is disk corruption.
Read the articleResource Locking with CouchDB and Svelte posted Wednesday, January 15, 2025 by Alex tipCouchDBdata
This part four of our blog post series on building a real-time, multi-user Kanban board with CouchDB and Svelte. As mentioned in the previous post, UI or resource locking is one of the most promising mechanisms for avoiding conflicts in the first place: if a card is locked the moment Alice starts editing it, then Bob won’t be able to do anything with it, and therefore won’t be able to introduce a conflict. Sounds like we could have just done this first and not bothered with all the conflict handling in the previous posts! But again, it’s not quite as simple as it seems.
Read the articleConsider Using nanoid posted Thursday, January 9, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB automatically assigns each piece of your data an unmistakable tag, called a UUID, to avoid conflicts in distributed systems even before syncing. If you assign these yourself, nanoid for JavaScript is the smaller, faster tool to get it done with CouchDB and PouchDB.
Read the articleManual Conflict Resolution with CouchDB and Svelte posted Wednesday, December 18, 2024 by Alex tipCouchDBdata
In our previous post, we added automatic conflict resolution to our multi-user, real-time Kanban board. This would silently resolve any conflicts where two users simultaneously modified two different properties of the same Kanban board card, eg. Alice changes the card’s title, and Bob changes the card’s location. While these changes constitute a conflict on a single database record, they don’t actually collide within that record, and thus the conflict can be resolved by a machine.
Regrettably, this doesn’t solve all possible conflicts: two users can still simultaneously modify the same property of the same card, eg. both Alice and Bob edit a card’s title.
Read the articleAutomatic Conflict Resolution with CouchDB and Svelte posted Wednesday, December 11, 2024 by Alex tipCouchDBdata
This is the second part of a blog post series on building a real-time, multi-user Kanban board with CouchDB and Svelte. We’ve previously made design decisions that should help reduce the opportunities for conflicts, but since we can’t rule them out completely, we do need to provide ways to resolve them. In this post, we’ll be covering the possibilities of automatic conflict resolution, which means:
- A machine can resolve the conflict without any user input
- The resolution happens in the background without anyone even noticing
A real-time multi-user Kanban board with CouchDB and Svelte posted Thursday, December 5, 2024 by Alex tipCouchDBdata
In this first post of a four-part series, we’ll start building a real-time Kanban board, and discuss the challenges and trade-offs.
Read the articleFull-text Search and Faceted Querying with CouchDB posted Wednesday, November 27, 2024 by The Neighbourhoodie CouchDB Team tipproductCouchDB
CouchDB stores your JSON data naturally in documents. It also gives you multiple mechanisms for querying that data:
Read the articlePouchDB Tip: Use CouchDB as an API posted Wednesday, October 16, 2024 by The Neighbourhoodie Team tipproductCouchDB
PouchDB and CouchDB used together are a powerful combination and one of the very few technologies that allow you to build truly robust offline web applications.
Read the articleHow CouchDB Prevents Data Corruption: Append-Only Database Files posted Wednesday, September 18, 2024 by The Neighbourhoodie Team tipproductCouchDBdata
CouchDB takes keeping your safe very seriously. It does everything in its power not to accidentally lose any of your data. Let’s look at one of the things that keep your data safe: append-only database files.
Read the articleAvoid Concurrent Writes to Document Properties posted Friday, September 6, 2024 by The Neighbourhoodie Team tipproductCouchDB
Designing your data for use with CouchDB is usually pretty straightforward. Your application will make use of certain objects or data records like persons, events, tasks, etc. When thinking about storing these in CouchDB, you usually store an individual instance of each of those objects or data records in an individual CouchDB document:
Read the articleAll Views in One Design Doc posted Wednesday, August 28, 2024 by The Neighbourhoodie Team tipproductCouchDB
CouchDB organises the definitions for all secondary indexes in a database in design documents. This is true for JavaScript Views, Erlang Views, Lucene text indexes, and Mango Queries.
Read the articleHow to Store Dates in CouchDB posted Wednesday, August 14, 2024 by The Neighbourhoodie Team tipproductCouchDB
CouchDB uses JSON as a data format, and JSON does not have a built-in way to represent dates. But dates are commonly used when building applications for all sorts of things, and there are ways to store them in CouchDB, so how is that done?
Read the articleData Format Compatibility posted Friday, August 2, 2024 by The Neighbourhoodie Team tipproductCouchDBdata
When storing data in CouchDB, you send JSON in one form or another. When you retrieve data from CouchDB it is also in the JSON format.
Read the articleWhy Does CouchDB Require an Admin Account to Start? posted Wednesday, July 24, 2024 by The Neighbourhoodie Team tipproductCouchDB
In CouchDB 1.x, one of our [the CouchDB developers’] overarching goals was to create a database that is easy to use. We spent many years refining the CouchDB REST API to make it as easy and as convenient as possible, so people don’t get turned away from using CouchDB by how hard it is to use.
Read the articleCouchDB and Docker posted Tuesday, November 3, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
Docker is an extremely popular way of deploying any kind of application in many different environments. Deploying CouchDB is no exception, the CouchDB project even maintains its own set of Dockerfiles, as well as a helm chart to help orchestrate multiple containers as a cluster on Kubernetes.
Read the articledefault.d and local.d posted Tuesday, October 27, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
When we explored how default.ini
and local.ini
work in unison to provide a coherent configuration and upgrade behaviour, we skipped over one more part of the configuration puzzle.
Local.ini is Never Overwritten on CouchDB Updates posted Tuesday, October 20, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
CouchDB is configured through configuration files on disk. The format of the files is INI.
When it starts, CouchDB reads a series of .ini files to make up the final configuration it is going to start with. This series of .ini files is called the config file chain.
Read the articleEverything You Need to Know About CouchDB Database Names posted Tuesday, October 13, 2020 by The Neighbourhoodie CouchDB Team tipCouchDBdata
Naming a database does not sound like an exciting activity. But it can be, if you know all the considerations that go into naming a database in CouchDB. Let’s start with the restrictions.
Read the articleSharding — Reducing the Number of Shards posted Tuesday, October 6, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
In contrast to increasing the number of shards for a database, reducing the number of shards is not a built-in operation. In addition, as shard splitting is only available in CouchDB 3.x and later, this advice is good for version 2.x as well.
Read the articleSharding — Increasing the Number of Shards posted Tuesday, September 29, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
This advice is only true for CouchDB 3.0.0 or later. Next week, we’ll cover increasing the number of shards in CouchDB 2.x.
Read the articleSharding — Choosing the Right q Value posted Tuesday, September 22, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
One of CouchDB’s core features is scalability. There are two axis of scalability in CouchDB:
- Scaling the amount of data stored
- Scaling the number of requests handled
Use JSON Patch to Resolve Conflicts posted Tuesday, September 15, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
CouchDB is unique in the database world because it makes data conflicts first-class citizens of its data model. Normally, databases and applications built on them do a large amount of work to avoid doing this. In many scenarios, this leads to subtle errors and occasional data loss.
Read the articleCopy Design Docs to Avoid Waiting For Indexes to be Built posted Tuesday, September 8, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
This advice is relevant for all query mechanisms in CouchDB: Views, Mango Queries, and even Search.
Read the articleUse Type in Doc _id posted Tuesday, September 1, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
When deciding on which data goes into which CouchDB documents, it is commonly helpful to keep track of the type
of document. For example, you could have documents for users
and documents for articles
.
An Offline-First Todo List with Svelte, PouchDB and CouchDB posted Friday, May 10, 2019 by alex tipCouchDBdata
Today, we’re combining Svelte, the lean and fast frontend compiler, with PouchDB and CouchDB, and building a lightweight, Offline-First todo list app. It’ll sync your todos between multiple devices for offline use and also keep your data in a central backup database.
Read the article