Verified Commit bcbc1c10 authored by Aral Balkan's avatar Aral Balkan
Browse files

Clean up the engine → database page

parent 2f1a2031
......@@ -3,72 +3,15 @@ title = "Database"
weight = "70"
**Note:** this decision is under review. Options:
## LevelDB
**Note:** What can we learn from our experience with [Heartbeat Node]( - e.g., regarding the use of LevelDB for this purpose? (e.g., see the [implementation of the StreamWeaver class](
* [Awesome Level](
* [](
## Secure Scuttlebutt
[Secure Scuttlebutt]( is built on LevelDB, specifically for p2p messaging. Would the higher-level abstraction aid or limit us?
* [Kappa architecture](
* [Scuttlebot](
## Other realtime/distributed data stores
* [Gun]( “A realtime, decentralized, offline-first, graph database engine.” (Also see: [Gun Auth](
* [HyperDB]( “Distributed scalable database” (as used in [DAT project](
## Other data persistence solutions
* [Hoodie](
## RethinkDB
A core principle of Indie Engine is to be as lightweight as possible so it can be installed and used with a minimum of fuss.
RethinkDB is a realtime database that has a changefeeds feature that could simplify our production footprint/deployment requirements, server-side code dramatically and enable us to keep an event-driven workflow throughout.
As such, we will be using the in-process LevelDB database, along with level-sublevel.
Although RethinkDB supports clustering natively, scalability of the database should not be an issue for personal web sites/apps (as there’s a single owner).
**Note:** LevelDB is also what we used in [Heartbeat Node]( - e.g., see the [implementation of the StreamWeaver class](
### Possible issues
### LevelDB resources
* Changefeed connections might fail: [ReQL proposal: restarting feeds](
### Related projects
* [Penseur]( Lightweight RethinkDB wrapper. Changes API includes reconnect functionality:
await db[table].changes(criteria, [options])
Subscribe to changes matching the given criteria for the table.
criteria - db criteria functions chained together
options - optional object with the following properties
handler - handler function to execute when changes occur.
reconnect - boolean, reconnect if the connection to the feed is interrupted
initial - boolean, include the initial results in the change feed
* [node-rethinkdb-job-queue]( A persistent job or task queue backed by RethinkDB. (Also see, regarding changefeed connection failures: [Add rethinkdb-changefeed-reconnect](
### Useful links
* [Troubleshooting common RethinkDB problems](
## Other options
A more traditional database / message queue combination.
* [rsmq]( Redis Simple Message Queue (Node)
* (RabbitMQ, etc.…)
* (For database, PostgreSQL, etc., or Mongo, etc.)
* …?
* [Awesome Level](
* [](
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment