https://github.com/krisajenkins/trolldb
An in-memory JavaScript database that prioritises performance over everything.
https://github.com/krisajenkins/trolldb
database high-performance inmemory javascript joke
Last synced: 3 months ago
JSON representation
An in-memory JavaScript database that prioritises performance over everything.
- Host: GitHub
- URL: https://github.com/krisajenkins/trolldb
- Owner: krisajenkins
- License: epl-1.0
- Created: 2014-11-05T08:10:24.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:33:15.000Z (almost 3 years ago)
- Last Synced: 2024-05-08T19:51:10.190Z (over 1 year ago)
- Topics: database, high-performance, inmemory, javascript, joke
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 29
- Watchers: 3
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.org
- License: LICENSE.txt
Awesome Lists containing this project
README
* TrollDB
[[file: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:
#+BEGIN_SRC html
#+END_SRC
*** Insert
You can insert any form of structured data you like:
#+BEGIN_SRC javascript
db.insert({"balance": 12345});
#+END_SRCTrollDB will optimize this insert for performance.
*** Query
You can query for data with pattern matching.
#+BEGIN_SRC javascript
db.query({"balance": undefined});
#+END_SRCTrollDB will optimize this query for performance.
*** Update
You can update data with pattern matching.
#+BEGIN_SRC javascript
db.update({"balance": undefined}, {"balance": 54321});
#+END_SRCTrollDB will optimize this update for performance.
*** Delete
You can delete data with pattern matching.
#+BEGIN_SRC javascript
db.delete({"balance": undefined});
#+END_SRCTrollDB will optimize this delete for performance.
** Advanced Usage
*** Clustering
TrollDB features powerful Clustering support that beats the CAP
theorem. To connect to a cluster:#+BEGIN_SRC javascript
db.connectToCluster();
#+END_SRCTrollDB 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*.#+BEGIN_SRC javascript
db.executeSQL('DROP table Students;');
#+END_SRC** 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...
- [[http://lokijs.org/#/][LokiJS]] for the initial inspiration.
- [[https://github.com/honza][Honza Pokorny]] for adding NodeJS support.** License
Copyright © 2014-2017 Kris Jenkins
Distributed under the Eclipse Public License.