1.0.2 • Published 7 years ago

elasticdb_warehouse v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

ElasticDB_Warehouse

ElasticDB Warehouse is a new database server written in Typescript and NodeJS, using a peer to peer network as it's base and it's very own repository management ElasticDB Warehouse is the next database server.

Currently in development

ElasticDB Warehouse is currently in development, please message me if you like the sound of this project and would like to contribute.

A database server based on P2P and it's own repository management technology.

This database server uses p2p so you can run as many servers as you like, each server connects to one another. If a change happens on 1 server it is automatically pinged to the entire network of servers. Each server has it's own repository management system in place so you can add new servers to the network and they can initiate a sync process so it becomes up to date with the running servers.

Features

Below are is the feature list for version 1.0 of ElasticDB Warehouse.

  • Create Databases
  • Create Tables
  • Insert rows
  • Delete rows
  • Update rows
  • Delete table
  • Delete a database
  • Query tables and support the following return types:
    • JSON
    • CSV
    • TAB
  • P2P Network, this will decrease the chances of your database every going down.

How to install

  1. First you need to install NodeJS which is available from their website: NodeJS.
  2. Navigate to the directory you wish to install and run ElasticDB Warehouse from.
  3. Install the following dependencies:
    • npm install p2p
    • npm install hashids
  4. Finally, run the following command which will install ElasticDB Warehouse:

    • npm install elasticdb-warehouse

First use

Run the server with the flag "install" before you do anything without the quotes. This will setup the repository management system.

node build/elasticdb_warehouse.js install

Starting the server

node build/elasticdb_warehouse.js

Adding other servers

Currently the only way to add other known servers is to edit the config.json file, there will be a peers JSON object, add as many as you want and then restart the server.

Querying the ElasticDB Server

All requests are sent over HTTP, SSL is not yet supported but will be in the stable release. See below the list of commands you can currently send to the server.

Server Status (Path = / )

This request will return a JSON response with some server stats.

Example

http://localhost:3666/

Create Database

This request will create a database.

Example

POST http://localhost:3666/create-database

{"database_name": "my_test_database"}

Get

This request will retrieve data based on the request body sent. The data marked with an * are required.

Example

POST http://localhost:3666/get

{
    "type" : "table",
    "database_name": "my_test_database",
    "table_name": "my_test_table",
    "filter": {

    },
    "limit": {
        "from": 0,
        "to": 10
    }
}