A very fast parallel database based on json text plain with encryptation
JDB is very fast parallel database based on json text plain with encryptation
JDB 2.3-stable it's still available but deprecated
Library maked by Laky64
PHP | Python | Mode | Thread Mode | |
---|---|---|---|---|
One Thread | 15ms | 37ms | Sequential | Single Thread |
Two Thread | 47ms | 85ms | Async | Multi Thread |
Four Thread | 79ms | 149ms | Async | Multi Thread |
Eight Thread | 143ms | 133ms | Async | Multi Thread |
Twelve Thread | 207ms | 402ms | Async | Multi Thread |
Below is how the JDB database is structured
DATABASE | PASSWORD |
---|---|
database1 | password1 |
database2 | password2 |
database3 | password3 |
TABLE | PRIMARY KEY | PRIMARY KEY TYPE |
---|---|---|
table1 | primary_key1 | primary_key_type1 |
table2 | primary_key2 | primary_key_type2 |
table3 | primary_key3 | primary_key_type3 |
COLUMN1 | COLUMN2 | COLUMN3 | |
---|---|---|---|
ROW1 | value1 | value2 | value3 |
ROW2 | value1 | value2 | value3 |
ROW3 | value1 | value2 | value3 |
In the JDB core there are different types of threads each with different jobs, here it is:
First create the database folder, then create in the database folder with the name of the table to which you want to attribute, in which you want to insert the fields
With json file (Composer
):
{
...
"require": {
"laky64/jdb": "*"
}
}
With command line (Composer
):
- composer require laky64/jdb
Read this documentation carefully so as not to cause malfunctions with JDB
First you need to run a Memcached Server without stopping, then create a php file to run the JDB Core without stopping (Suggested one for server)
header('Content-Type: text/plain'); //For make readable JDBC Core results
ini_set('memory_limit', '2048M'); //For avoid a memory overload
use laky64\database\JDB_CORE;
include 'vendor/autoload.php';
new JDB_CORE(JDB_CORE::NUM_THREAD, 'database_folder', 'ip_memcached_server', 'port_memcached_server');
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.