Documentation
ndb
Drop NDJSON. Query it. NoSQL, from one Go daemon, with Go, Ruby, and TypeScript SDKs that answer like curl.
Drop an NDJSON file. Query it.
No schema, no import, no migration.
- 1
Point ndb at your files
Declare a collection in ndb.yml. ndb only reads the files.
collections: events: write: direct path: /data/logs/*.ndjson time: ts - 2
Keep appending lines
Your app writes one JSON line per event. Any language works.
echo '{"_id":"4","status":"answered","duration":10,...}' \ >> /data/logs/app.ndjson - 3
Query and aggregate
The new line is visible right away, with filters, sort and groups.
# find where status answered, sort ts -1 {"_id":"4",...,"status":"answered","duration":10} # aggregate: $group by status, $sum and $avg {"_id":"answered","avg":49,"calls":3} {"_id":"missed","avg":0,"calls":1}
- Filters and regex
- Sort and cursor pagination
- Aggregations
- Watch new lines
- Indexes
- Go, Ruby and TypeScript SDKs
Build with ndb
Query
NoSQL find with operators, sort, and cursor pagination.
Get started withPOST /v1/c/calls/findAggregate
Group, match, and bucket by time with $dateTrunc.
Get started withPOST /v1/c/calls/aggregateWatch
Outbox consumers with ack, a where filter, and wal_retention.
Get started withPOST /v1/c/calls/watchClients
Go, Ruby, Rails, and TypeScript SDKs over a unix socket or TCP with a token.
Get started withgem "ndb-rails"Run ndb
Daemon
One static Go binary, one data directory, one config file.
Get started withndb -config ndb.ymlStorage
NDJSON is the source of truth. Indexes and segments are derived.
Get started withndb -data-dir /var/lib/ndbOperations
Backup, metrics, quarantine, recovery, and compaction.
Get started withndb backup /backups/nowDeploy
One VM, or many VMs over WireGuard with a bearer token.
Get started withndb -token-file /etc/ndb/token