Install

Documentation

ndb

Drop NDJSON. Query it. NoSQL, from one Go daemon, with Go, Ruby, and TypeScript SDKs that answer like curl.

The ndb ramen bowl mascotThe ndb ramen bowl mascot

Drop an NDJSON file. Query it.

No schema, no import, no migration.

  1. 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. 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. 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

Run ndb