gun-elastic

0.1.2 • Public • Published

Gun-Elastic

Elasticsearch native persistence layer for Gun, a realtime, distributed, offline-first, graph database engine.

This gun storage adapter interfaces with Elasticsearch using an extended flint node strategy:

  • get request expect to read an entire Gun node.
  • put requests write an entire Gun node.
    • node key-value structure (soul,relation,field,value,state) optionally saved to secondary index

THIS WORK IS EXPERIMENTAL WORK IN PROGRESS! USE AT YOUR OWN RISK!

Comments and PR/Contributions are super welcome!


Installation

npm install gun-elastic.

 
const Gun = require('gun');
 
// Must be added after Gun but before instantiating Gun
require('gun-elastic');
 
// Instantiate Gun
const gun = new Gun({
    file: false,
    web: httpServer,
 
    // The following are defaults.
    elastic: {
        host: 'localhost',
        port: '9200',
        index: 'gun_es',
        type: 'gun_data',
        
        store_keys: false,
        store_keys_index: 'gun_es_keys'
    }
});

Screenshots

Network Relations

Circular Sankey

Todo

  • Optional Key Storage in secondary index
  • Authentication support, array of servers, etc
  • Add tests with ES mockups

Credit

This extension is made possible by gun-flint @sjones6

Issues & Contributing

Issues welcome on Github.

Community contributions welcome. PRs accepted after code review.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.21latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.21
0.1.11

Package Sidebar

Install

npm i gun-elastic

Weekly Downloads

2

Version

0.1.2

License

MIT

Last publish

Collaborators

  • lmangani