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.
First require the trolldb script:
<script type="text/javascript" src="trolldb.js"></script>
You can insert any form of structured data you like:
db.insert({"balance": 12345});
TrollDB will optimize this insert for performance.
You can query for data with pattern matching.
db.query({"balance": undefined});
TrollDB will optimize this query for performance.
You can update data with pattern matching.
db.update({"balance": undefined}, {"balance": 54321});
TrollDB will optimize this update for performance.
You can delete data with pattern matching.
db.delete({"balance": undefined});
TrollDB will optimize this delete for performance.
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.
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;');
Please report any bugs in the Github Issue tracker. Please note that only bugs that affect performance will be considered bugs.
Production-ready, if performance is your only concern.
Thanks to…
- LokiJS for the initial inspiration.
- Honza Pokorny for adding NodeJS support.
Copyright © 2014-2017 Kris Jenkins
Distributed under the Eclipse Public License.