Nemesis DB
Nemesis DB is an open source port of Bustle's Gradius graph database.
Intro
This is a simple adjacency graph database with only a few features. It has been designed for very fast reads. While it handles writes with ease whenever a tradeoff favors reads, that tradeoff will be taken.
Features
- 32 bit GUID
- Schemaless Nodes
- Weighted Edges
- Compression
Future Features
- Node Schemas, types and Interfaces
- filtering edges based upon weight
- Deleting
- Edge Schemas
- Field Validations
- Edge Validations
- Edge scanning
- Node scanning
- Named Edges
- Field Indexing
- Binary packing
Examples
const graph = 'redis://localhost/1' const book = await graphassert // update the data of an existing nodeconst updatedBook = await graphassert // replace the data of an existing nodeconst replacedBook = await graphassert const author = await graphassert // connect the book and it's authorconst edge = await graphassert const authors = await graphassertconst object = await graphassert // Get an async iterator of all the nodesfor await node of graph console// { id: 1, title: 'foo' }// { id: 2, name: 'james' } // use streaming-iterables to make an array of the async iteratorconst allNodes = await assert
API Type Defs
declare
Developing
Tests use your local redis db 2 by default and are destructive. To use another DB submit a patch to make this configurable.