Code Monkey home page Code Monkey logo

trolldb's Introduction

TrollDB

https://travis-ci.org/krisajenkins/TrollDB.svg

TrollDB is an in-memory JavaScript database that prioritises performance over everything. It is blazingly fast. You will not find a faster in-memory JavaScript Database, so stop looking. You’ve arrived my friend.

Basic Usage

First require the trolldb script:

<script type="text/javascript" src="trolldb.js"></script>

Insert

You can insert any form of structured data you like:

db.insert({"balance": 12345});

TrollDB will optimize this insert for performance.

Query

You can query for data with pattern matching.

db.query({"balance": undefined});

TrollDB will optimize this query for performance.

Update

You can update data with pattern matching.

db.update({"balance": undefined}, {"balance": 54321});

TrollDB will optimize this update for performance.

Delete

You can delete data with pattern matching.

db.delete({"balance": undefined});

TrollDB will optimize this delete for performance.

Advanced Usage

Clustering

TrollDB features powerful Clustering support that beats the CAP theorem. To connect to a cluster:

db.connectToCluster();

TrollDB will seek out and connect to other nodes on the network in a way that is optimized for performance. Should a node go down, when it comes back up it will be re-synced with the rest of the cluster in a way that is optimized for performance.

SQL API

TrollDB can translate queries expressed in industry standard SQL to perfectly optimal TrollDB queries on the fly The TrollDB translator will parse SQL faster than your legacy relational database.

db.executeSQL('DROP table Students;');

Bugs

Please report any bugs in the Github Issue tracker. Please note that only bugs that affect performance will be considered bugs.

Status

Production-ready, if performance is your only concern.

Credits

Thanks to…

License

Copyright © 2014-2017 Kris Jenkins

Distributed under the Eclipse Public License.

trolldb's People

Contributors

cmstrickland avatar honza avatar krisajenkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

trolldb's Issues

Optimized CRUD

After reading the source I realized that there would be no harm in allowing users to perform all the operations simultaneously– not only optimizing performance, but user productivity!

I propose adding insertUpdateQueryDelete. It'll return 42, but with only the overhead of a single function call.

I know performance is the main concern, but I've checked and it doesn't introduce any (new) bugs, either!

Performance issue

We've used this great db during years. Anyway, we've watched missed performance with 100000+ concurrent requests.
Can you check it?

Performance bottleneck in query

It is a shame to see superfluous code in the query-implementation, when the rest of the functionality is nice & clean. While the logic does strive (and actually manages) to produce The Answer, one can instead rely on vacuous truth and re-write the code so that the result of the query-evaluation satisfies the property that any content in the returned result set will be the correct response to the query. This will have the side effect of any content also being the wrong result or the colour purple, but as it is trivial to extract only the right answers from the result, this should not pose any trouble.

Add pipelining

Allow me to send a few queries to the server before accepting responses.

Is this project dead

Willem Liu made a pull request one whole day ago containing a massive performance optimisation! The fact that this has not been merged into master makes me think this project is dead!

Add async support

TrollDB is so fast, sometimes I get a response before I have time to send my query, so it would be nice if you added async support (ie with callbacks).

Otherwise, great job, we love it and use it in prod.

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.