Compare

ThimbleDB and lowdb

lowdb is a small type-safe local JSON database for JavaScript. Its standard adapters keep a JavaScript object in memory and write JSON to a file, localStorage, or sessionStorage. ThimbleDB is a distributed browser and authority protocol backed by object storage.

Choose lowdb when

  • One Node process owns a small JSON file.
  • A CLI, script, test harness, Electron app, or local tool needs persistence.
  • Plain JavaScript array operations are enough for queries.
  • The full dataset comfortably fits in memory.
  • Cloud identity, tenant scopes, and multi-machine access are unnecessary.

The lowdb documentation notes that Node cluster is unsupported and whole objects around 10-100 MB can encounter performance issues because writes serialise the complete data object.

Choose ThimbleDB when

  • Browsers and a remote authority share a storage protocol.
  • Object storage is the durable backend.
  • Data needs user or tenant scope separation.
  • Browser persistence should be encrypted separately from durable objects.
  • Conditional writes and stale client detection are required.
  • External identity and revocable sessions are part of the application.

Capability comparison

CapabilityThimbleDBlowdb
Durable storageObject storageJSON file, localStorage, or custom adapter
Process modelBrowser plus authorityUsually one local process or browser context
Write modelConditional immutable pages and mutable headsSerialise and write the data object
Query modelID reads, declared indexes, and bounded scansNative JavaScript operations
Browser cacheEncrypted memory and IndexedDBlocalStorage or sessionStorage adapters
Identity and scopesIncluded external OIDC modelApplication-defined
Multi-machine useThrough authority and object storeRequires a custom remote adapter and coordination
Best fitSmall hosted web appsLocal scripts and tools

Sources

This page is built from the repository source.

View or improve this page on GitHub