REST API interface for Lbasedb DBMS.
Source code: https://github.com/fomalhaut88/lbasedb-api
lbasedb is a powerful low level DBMS that is focused on dataset structure.
The algorithms are optimized for the compact data storage and for high
performance on get and append operations. Particularly, due to this,
deleting or indexing are not supported. The allowed data types are also
limited (integers, floats and bytes) for making easy integration with
C-like or similar common interfaces (like Python, CUDA, JSON and so on).
The database has asynchronous access to the entities powered by tokio.
It is supposed to be used for the data that have billions and more records
and thousands columns of simple data types that must be appended without
extra overhead.
Reference: http://crates.io/crates/lbasedb
Source code: https://github.com/fomalhaut88/lbasedb
docker pull fomalhaut88/lbasedb
docker run \
-p 8080:8080 \
--restart=always \
--ulimit nofile=1024:1024 \
--volume /var/lib/lbasedb:/app/db \
--name lbasedb-app \
--env WORKERS=16 \
-d fomalhaut88/lbasedb
Notice, since Lbasedb keeps an open file for each column, you may need to
increase the maximum number of open files allowed (see ulimit for details),
that is usually 1024 by default. In the example above, the limit is set to
1024 as default but it can be greater.
| Path | Method | Description | Params | Input body example | Output body example |
|---|---|---|---|---|---|
/version | GET | Version of API. | 0.1.7 | ||
/data | GET | Get JSON dataset. | feed: str - name of the feed ix: int - start index size: int - number of rows col: [str] - names of columns | {"x": [2, 3]} | |
/data | POST | Push JSON dataset into the end. | feed: str - name of the feed | {"x": [2, 3]} | |
/data | PUT | Update JSON dataset from the index. Columns not listed will be zeroed. | feed: str - name of the feed ix: int - start index | {"x": [2, 3]} | |
/data | PATCH | Update JSON dataset from the index. Columns not listed will stay the same. | feed: str - name of the feed ix: int - start index | {"x": [2, 3]} | |
/size | GET | Get size of the feed. | feed: str - name of the feed | {"size": 2} | |
/size | PUT | Resize the feed with all its columns. Last records will be removed or zero records appeared in the end. | feed: str - name of the feed | {"size": 2} | |
/raw | GET | Get raw bytes in the column. | feed: str - name of the feed ix: int - start index size: int - number of units col: str - name of columns | binary | |
/raw | POST | Update raw bytes in the column. It does not push new bytes, so for insertion do resize before. | feed: str - name of the feed ix: int - start index col: str - name of columns | binary | |
/bytes | GET | Get bytes dataset. | feed: str - name of the feed ix: int - start index size: int - number of rows col: [str] - names of columns | binary | |
/bytes | POST | Push bytes dataset into the end. | feed: str - name of the feed col: [str] - names of columns | binary | |
/bytes | PUT | Update bytes dataset from the index. Columns not listed will be zeroed. | feed: str - name of the feed ix: int - start index col: [str] - names of columns | binary | |
/bytes | PATCH | Update bytes dataset from the index. Columns not listed will stay the same. | feed: str - name of the feed ix: int - start index col: [str] - names of columns | binary | |
/bytes | DELETE | Set bytes to zero. Columns not listed will stay the same. | feed: str - name of the feed ix: int - start index size: int - number of rows col: [str] - names of columns | ||
/feed | GET | List available feeds. | [{"name": "xyz"}] | ||
/feed | POST | Add a new feed. | {"name": "xyz"} | ||
/feed | PATCH | Rename the feed. | name: str - name of the feed | {"name": "xyz2"} | |
/feed | DELETE | Delete the feed. | name: str - name of the feed | ||
/col | GET | List available columns in the feed. | feed: str - name of the feed | [{"name": "y", "datatype": "Int64"}] | |
/col | POST | Add a new column. | feed: str - name of the feed | {"name": "x", "datatype": "Int64"} | |
/col | PATCH | Rename the column. | feed: str - name of the feed name: str - name of the column | {"name": "y"} | |
/col | DELETE | Delete the column. | feed: str - name of the feed name: str - name of the column |
Bytes dataset is a concatenated arrays represented as bytes of each column listed in the request (in /bytes). The order of the columns is kept.
| Variable | Description | Default |
|---|---|---|
DATA_PATH | Path to the directory for the data. | ./tmp/db |
WORKERS | Number of workers to process. | 1 |
HOST | Host to deploy. | localhost |
PORT | Port to deploy. | 8080 |
PAYLOAD_LIMIT | Maximum payload size to request in bytes. | 1073741824 (or 1 GB) |
Content type
Image
Digest
sha256:2ae624038…
Size
472.8 MB
Last updated
6 months ago
docker pull fomalhaut88/lbasedb