Giter Site home page Giter Site logo

hansihe / shittydb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rickystewart/shittydb

0.0 3.0 0.0 130 KB

A confoundingly fast key-value store

License: MIT License

CMake 2.55% C 7.55% Shell 1.27% Java 11.72% JavaScript 25.69% PHP 2.63% Python 36.20% Ruby 4.30% Visual Basic 8.09%

shittydb's Introduction

ShittyDB

ShittyDB is a fast, scalable key-value store written in lightweight, asynchronous, embeddable, CAP-full, distributed Python. The library exposes a very simple, easy-to-use API that is easily callable from Python, Ruby and Node JS (wrappers for other languages are forthcoming).

In Python:

from shittydb import ShittyDB
s = ShittyDB()
s.set('foo', 'this is really fast')
s.get('foo')

In Ruby:

require 'shittydb'

ShittyDB.set('foo', 'this is really fast')
ShittyDB.get('foo')

In Node.js:

var ShittyDB = require("ShittyDB");

var ShittiestDB = new ShittyDB();
ShittiestDB.set('foo', 'this is really fast');
ShittiestDB.get('foo');

In C:

#include <stdlib.h>
#include "shittydb.h"

int main(int argc, char ** argv) {
    // Add a key
    shittydb_set("foo", "It's like greased lightning");

    // Query a key
    char * resp = NULL;
    shittydb_get(&resp, "foo");

    free(resp);

    return EXIT_SUCCESS;
}

In Visual Basic:

Public Module Test
    Sub Main()
        Call ShittyDBSet("foo", "literally faster than pure assembly")
        ShittyDBGet("foo")
    End Sub
End Module

ShittyDB is certified 100% robust and failsafe with ACID and BASE transactions.

The current release is version 0.0. Please have a look at the source code. We are accepting all improvements and additions from the open-source community.

FAQ

Are there performance benchmarks?

Those are forthcoming as soon as I can find some that make it look really good.

What is ShittyDB's story regarding consistency?

ShittyDB is strongly consistent and changes are written to disk on each call to shittydb.set.

Can I sacrifice all of my data to the webscale God for ultimate performance?

I'm glad you asked. If you're using ShittyDB in Python, use webscale mode for blazing-fast speed, with the concession that not all of your writes are guaranteed to work. Try this:

sdb = shittydb.ShittyDB()
print sdb.webscale() # False; ShittyDB is not webscale by default
sdb.webscale(True) # Make ShittyDB webscale
sdb['foo'] = 'this is a webscale assignment'
print sdb['foo'] # What happens here? We don't know! It's webscale!

Are ShittyDB clients available in other languages?

Those are forthcoming.

Can you change ShittyDB's name? It's offensive and HR won't let me use it for that reason.

No, it's named after my grandfather.

Does ShittyDB support SQL?

No, but you can write an extension to ShittyDB that handles SQL. For example:

import re
def shitty_sql(sql):
    match = re.match("SELECT \\* FROM ([a-z])", sql).group(1)
    return shittydb.get(match)

Usage:

shittydb.set("foo", "abc")
shitty_sql("SELECT * FROM foo")

How do you distribute ShittyDB?

What?

You said up there it was a distributed key-value store.

The Python implementation supports distribution with the distribute method:

sdb = ShittyDB()
sdb.distribute(True)    

NOTE: distributed DB may reduce data integrity.

shittydb's People

Contributors

rickystewart avatar matozoid avatar idunnowhy9000 avatar hedede avatar haselkern avatar cezarywojcik avatar jkingsman avatar samdroid-apps avatar doogle avatar autumnryan avatar movingtomars avatar mr21 avatar mrmaxmeier avatar scotthaiden avatar minecrafter avatar

Watchers

James Cloos avatar Hans Elias J. avatar  avatar

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.