Skip to content

slipsoft/slipdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlipDb

Build Status Coverage Status

A distributed, index based, search engine.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • JDK >= 8.x
  • Maven

Installing

Install dependencies

mvn install

Copy & edit the config file

cp config.dist.json config.json

Run the server

mvn jetty:run

You can now connect to the API at http://localhost:8080/. A working get request could be /db/tables.

You can also find the API documentation of your running instance at http://localhost:8080/docs/

Running the tests

JUnit is used for the tests. You can run it with Maven:

mvn test

Deployment

not deployable yet...

Documentation

API

The API documentation can be found online. Or if you want to consult you local instance documentation you can access http://localhost:8080/docs/ while the server is running.

Manual testing of the API

While the server is running, here are some queries you can run to test the API:

  1. PUT /db/tables with the following body:

    [
        {
            "name": "taxi2newYork",
            "allColumns": [
                {"name": "vendor_id", "type": "Byte"},
                {"name": "tpep_pickup_datetime", "type": "Date"},
                {"name": "tpep_dropoff_datetime", "type": "Date"},
                {"name": "passenger_count", "type": "Byte"},
                {"name": "trip_distance", "type": "Float"},
                {"name": "pickup_longitude", "type": "Double"},
                {"name": "pickup_latitude", "type": "Double"},
                {"name": "rate_code_id", "type": "Byte"},
                {"name": "store_and_fwd_flag", "type": "String", "size": "1"},
                {"name": "dropoff_longitude", "type": "Double"},
                {"name": "dropoff_latitude", "type": "Double"},
                {"name": "payment_type", "type": "Byte"},
                {"name": "fare_amount", "type": "Float"},
                {"name": "extra", "type": "Float"},
                {"name": "mta_tax", "type": "Float"},
                {"name": "tip_amount", "type": "Float"},
                {"name": "tolls_amount", "type": "Float"},
                {"name": "improvment_surcharge", "type": "Float"},
                {"name": "total_amount", "type": "Float"}
            ]
        }
    ]
  2. GET /db/tables should return the table we just created.

  3. POST /table/{tableName}/load with taxi2newYork as tableName and the content of testdata/SMALL_100_000_yellow_tripdata_2015-04.csv as the body.

  4. PUT /table/{tableName}/index with taxi2newYork as tableName and the following body:

    {
        "name": "index_vendor_id",
        "columnsToIndex": [
            "vendor_id"
        ],
        "type": "dichotomy"
    }

Built With

Authors

See also the list of contributors who participated in this project.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages