High Performant and Bottomless database
Explore APIs »
Join Community
- High performance
- Bottomless storage.
- Consistency.
Exabase is embedded and scales as you scale your app. instances are light as they are tracked to use less memory and small disk footprint.
Exabase achieves a high degree of efficiency by employing the following techniques.
- Separation of concerns mechanism across tables. This allows for more efficiency by keeping each table manager in it own space.
- Exabase make an extensive use efficient algorithms and data structures for storage and query of data.
- Consistency and Durability in log files and other very important files is achieved through an ACID complaint data processing mechanism.
- Exabase achieves a high search query efficiency using a custom data structure called Xtree.
Exabase support server-side Javascript runtime like:
- Bunjs.
Native support to be written in the C programming language.
Install Exabase right on your project using bun.
bun add exabase@latest
The Exabase class accepts an object argument with the following options:
constdb=newExabase({endpoint: "",secretAccessKey: "",});Exabase is queried with json in this format
{
table: string;
operation?: {dropTable?: boolean;
createTable?: boolean;}
sort?: {[xinkeyofPartial<Model>]: "ASC"|"DESC";};
get?: {[field: string]: {eq?: any;lt?: any;gt?: any;lte?: any;gte?: any;like?: string;};};
insert?: Record<string,any>;
update?: Partial<Model>;delete?: boolean;
get?: boolean;
count?: boolean;
skip?: number;
take?: number;
consistency?: "strong"|"eventual";};constuser=awaitdb.query(JSON.stringify({table: "USER",insert: {name: "james bond"},}));constuser2=awaitdb.query(JSON.stringify({table: "USER",one: user._id}));expect(user.name).toBe("james bond");constuser3=(awaitdb.query(JSON.stringify({table: "USER",search: {name: user.name},})))[0];constuser4=awaitdb.query(JSON.stringify({table: "USER",update: { ...user,name: "gregs pola",age: 47},}));awaitdb.query(JSON.stringify({table: "USER",delete: user._id}));constuser5=awaitdb.query(JSON.stringify({table: "USER",one: user._id}));expect(user._id).toBe(user2._id);expect(user._id).toBe(user3._id);expect(user._id).toBe(user4._id);expect(user4.name).toBe("greg pola");expect(user5).toBe(undefined);import{Exabase}from"../dist/index.js";constdb=newExabase();awaitdb.query(JSON.stringify({table: "USER",execute: {createTable: true,},}));awaitdb.query(JSON.stringify({table: "CHILD",execute: {createTable: true,},}));constuser=awaitdb.query(JSON.stringify({table: "USER",insert: {age: i+20,name: "user name",},}));constkid=awaitdb.query(JSON.stringify({table: "CHILD",insert: {age: 5,name: "kid name",},}));user.kids.push(kid);awaitdb.query(JSON.stringify({table: "USER",update: user,}));This benchmark is Exabase against sqlite.
Sqlite has a tiny footprint and off course really great performance with pure acidity and relational.
cpu: Intel(R) Celeron(R) CPU 4205U @ 1.80GHz runtime: bun 1.0.0 (x64-linux)
benchmark time (avg) (min … max) p75 p99 p995
---
SELECT _ FROM "Employee" Exabase 1.39 µs/iter (1.23 µs … 3.77 µs) 1.35 µs 3.77
µs 3.77 µs SELECT _ FROM "Employee" sqlite 270.73 µs/iter (187.72 µs … 3.24 ms)
267.24 µs 1.19 ms 1.48 ms 150X fasterLog caching is a basic LOG file level cache. this means, it stores the entire LOG(n) file of the table in memory, where n is the last active LOG file.
Open source.
telegram group.
If you contribute code to this project, you are implicitly allowing your code to be distributed under the Apache License. You are also implicitly verifying that all code is your original work.