Giter Club home page Giter Club logo

jasondb's Introduction

JasonDB

A Blazingly-Fast, JSON-Based, Log-Structured Database.
API Documentation ยป






JasonDB is a blazingly-fast, JSON-based, log-structured database for Rust. Supporting both in-memory and disk-based storage at the developer's choice, it is fast, flexible and well-integrated with the Rust programming language. It provides complex and highly-optimised queries, as well as an intuitive and extensible API for creating and managing databases.

jasondb's People

Contributors

w-henderson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

c0d3-dump

jasondb's Issues

Optimise more queries using secondary indexes

Queries that include fields which are indexed can be optimised so they are faster and use less disk operations.

In the table below, fields refers to fields in the query, for example in age >= 18 the field is age. Queries can be combined with a PredicateCombination (and or or) and there can be any number of predicates in a query.

Progress Table

PredicateCombination::And PredicateCombination::Or
All fields are the same and indexed โœ”๏ธ Optimised in 62b0bc1 โœ”๏ธ Optimised in 62b0bc1
All fields are indexed โœ”๏ธ Optimised in 27174a2 โœ”๏ธ Optimised in 27174a2
Some fields are indexed โœ”๏ธ Optimised in 1e69eb3 โŒ Not optimisable
No fields are indexed โŒ Not optimisable โŒ Not optimisable

Add more flexible methods for creating and opening databases

Currently, opening a database looks like this:

let source = FileSource::open("my_database.jdb")?;
let mut db: Database<MyStruct> = Database::new(source)?;

This is very inflexible so maybe we should add the following methods:

Database::open_file("my_database.jdb")
Database::create_file("my_database.jdb")
Database::new_file("my_database.jdb")
Database::new_memory()
Database::new_config("my_database.jdb", config_options)

JasonDB v0.2 Roadmap

JasonDB v0.2 is a complete rewrite from scratch, replacing the previous dodgy code which has now been placed in the legacy branch. A very bare-bones implementation has been completed, and this issue details the features and fixes needed to flesh it out before we can publish it.

Checklist

If any more features come up, they will be added here.

Add migration options for changing datatype

This should probably be implemented with a closure mapping one datatype to another.

Potential signature:

impl<T, S> Database<T, S>
where
    T: IntoJson + FromJson,
    S: Source,
{
    pub fn migrate<U, F>(mut self, f: F) -> Result<Database<U, S>, JasonError>
    where
        U: IntoJson + FromJson,
        F: Fn(T) -> U;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.