Skip to content

Commit 5ea787a

Browse files
committed
release: Freeze 0.8.0 documentation
1 parent a0e1c5a commit 5ea787a

24 files changed

+1752
-214
lines changed

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = {
125125
lastVersion: 'current',
126126
versions: {
127127
current: {
128-
label: '0.8',
128+
label: '0.8.1',
129129
path: '/',
130130
}
131131
},

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"clear": "docusaurus clear"
1313
},
1414
"dependencies": {
15-
"@docusaurus/core": "^3.1.1",
16-
"@docusaurus/plugin-client-redirects": "^3.1.1",
17-
"@docusaurus/preset-classic": "^3.1.1",
18-
"@docusaurus/theme-search-algolia": "^3.1.1",
15+
"@docusaurus/core": "^3.2.0",
16+
"@docusaurus/plugin-client-redirects": "^3.2.0",
17+
"@docusaurus/preset-classic": "^3.2.0",
18+
"@docusaurus/theme-search-algolia": "^3.2.0",
1919
"react": "^18.2.0",
2020
"react-dom": "^18.2.0"
2121
},
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
id: index
3+
title: Introduction
4+
sidebar_label: Home
5+
slug: /
6+
---
7+
8+
Welcome to Skytable's docs! Skytable is a free and open-source modern NoSQL database that builds on the foundations of performance, scalability, powerful querying and a robust type system. Skytable can be deployed as just a single binary file with no special system dependencies and only relies on the operating system's `libc` implementation.
9+
10+
## Guide
11+
12+
Skytable has it's own query language, BlueQL<sup>TM</sup> which provides everything across DDL, DCL and DML queries and exists to be a very powerful and secure alternative to SQL. If you're coming from SQL, you should feel just at home — BlueQL has a few small but important operating differences from SQL but has very similar syntax.
13+
14+
We recommend you to follow the guide in this sequence (but feel free to skip any sections):
15+
- [**Installation**](installation) and [**using the CLI**](using-the-repl): Get everything installed on your local system
16+
- [**System overview**](architecture): A brief introduction to Skytable, including an overview of the data model, query systems and storage
17+
- **BlueQL**:
18+
- [**Introduction**](blueql/overview): Serves as a basic introduction to the query language and an (currently incomplete) informal specification with information on keywords, syntax and stuctures.
19+
- [**DDL**](blueql/ddl): Data definition with BlueQL
20+
- [**DML**](blueql/dml): Data manipulation with BlueQL
21+
- [**DCL**](blueql/dcl): Data control with BlueQL
22+
- [**Configuration**](system/configuration): Information to help you configure Skytable with custom settings such as custom ports, hosts, TLS, and etc.
23+
- [**Administration**](system/administration): Information on access control, user and other administration features
24+
- [**Resources**](resources/overview): Helpful resources
25+
- [**A guide to the new Skytable**](resources/migration): For old our returning Skytable users who are coming from older versions
26+
- [**Benchmarking**](benchmarking): A guide for load testing Skytable
27+
- [**Deployment**](deployment): An useful guide for deploying
28+
- [**Limits**](limits): An useful guide on system limits
29+
30+
## Client drivers
31+
32+
Looking to integrate Skytable in your application? Great! [Find a driver for your language/framework here](libraries).
33+
34+
## Getting help
35+
36+
We have a collection of resources [on this page](resources/overview). If you need in help in real-time, we recommend that you join our [Discord Community](https://discord.gg/QptWFdx) where you can get help directly from the developers and our community members.
37+
Most queries are usually answered there in a few hours!
38+
39+
## Contributing
40+
41+
If you find any typos, mistakes or any other scope of improvement - please don't hesitate to bring it up [here](https://github.com/skytable/docs/issues). Thank you ❤️!
42+
43+
## License
44+
45+
The documentation is licensed under the [CC-BY-SA-4.0 License](https://github.com/skytable/docs/tree/master/LICENSE)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: libraries
3+
title: Client drivers
4+
---
5+
6+
7+
## Official drivers
8+
9+
The drivers that are officially maintained can be expected to be feature complete and stable. We currently support the following drivers:
10+
11+
| Language/Framework | Links | Status | Package manager command |
12+
| ------------------------------ | --------------------------------------------------------------------------------------------------- | -------- | ----------------------- |
13+
| Rust | [GitHub](https://github.com/skytable/client-rust), [crates.io](https://crates.io/crates/skytable) | Stable ✅ | `cargo add skytable` |
14+
| NodeJS (JavaScript/TypeScript) | [GitHub](https://github.com/skytable/client-nodejs), [npm](https://npmjs.com/package/skytable-node) | Beta 🏗 | `npm i skytable-node` |
15+
16+
:::info More lanugages
17+
The team is always looking to support more languages and we wish we could ship more drivers. But due to limited
18+
resources we haven't been able to. If you're willing to write a driver (it's super easy to), jump into our chat!
19+
:::
20+
21+
## Community powered
22+
23+
List of community powered drivers (sorted alphabetically):
24+
25+
| Language/Framework | Client source code | Upstreamed | License | Remarks |
26+
| -------------------------------- | ------------------------------------------------------------- | ---------- | ---------- | --------------------------------------------------------------------------------- |
27+
| **C#/.NET** | || | |
28+
| | [C# driver](https://github.com/martinmolin/skytable-dotnet) || Apache-2.0 | Available on [NuGet](https://www.nuget.org/packages/Skytable.Client) |
29+
| **Go** | || | |
30+
| | [Go driver](https://github.com/No3371/go-skytable) || Apache-2.0 | Written from scratch |
31+
| | [Go driver](https://github.com/satvik007/skytable-go) || Apache-2.0 | Easy for migration from go-redis |
32+
| **JavaScript/TypeScript (Node)** | || | |
33+
| | [NodeJS Driver](https://github.com/zhangyuannie/skytable.js) || Apache-2.0 | Available on [npm](https://www.npmjs.com/package/skytable.js) |
34+
| **PHP** | || | |
35+
| | [PHP client driver](https://github.com/hkulekci/skytable-php) || MIT | Can be found on [Packagist](https://packagist.org/packages/hkulekci/skytable-php) |
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: benchmarking
3+
title: Benchmarking
4+
---
5+
6+
Due to Skytable having in-house implementations of almost everything, starting from the protocol, the storage engine and query
7+
language — we have our own custom load testing tool called `sky-bench` that is distributed with the bundle.
8+
9+
## Setting up for benchmarking
10+
11+
**Quick notes**:
12+
- The benchmark tool will create:
13+
- a space called `bench`
14+
- a model called `bench`
15+
- **Be sure that these objects don't already exist!** But don't worry, if they do — the benchmark tool will error. You won't lose any data
16+
- **Once the benchmark is complete, the `bench` space is removed!**
17+
- **Do not use the `bench` space during the benchmark**: You might lose data
18+
19+
**The benchmark tool will:**
20+
- Run a total of 4,000,000 queries (don't worry, they run pretty fast!):
21+
- Run 1,000,000 `INSERT`s
22+
- Run 1,000,000 `SELECT`s
23+
- Run 1,000,000 `UPDATE`s
24+
- Run 1,000,000 `DELETE`s
25+
- The model used has the declaration `(un: string, pw: uint8)`
26+
- The `SELECT` will select and return all fields
27+
- The `UPDATE` will increment the value of `pw` like this `pw += 1`
28+
- The `DELETE` removes the entire collection
29+
- The default primary key size is 7 bytes. All generated keys will be padded with zeros from to 0 to 999,999 like this: `0000000` or `0999999`
30+
31+
## Off to the races
32+
33+
1. Start up the database server
34+
2. Run `./sky-bench --password <your root password>`. We need your `root` password because only the root account can create, alter and drop models and the benchmark tool needs to run these queries
35+
3. Wait for it to happen. You may not believe your eyes, so we recommend that you keep your eyes hydrated 🔥🚀✨💣
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: deployment
3+
title: Deployment
4+
---
5+
6+
Here are some recommendations for deployment:
7+
1. **Make sure you have enough memory and storage!** The server will start returning errors when your server runs out of resources, as you'd expect.
8+
2. **When deploying on docker**:
9+
- Try to map the volume to a local path. We've had unwarranted data losses when we accidentally ended up running a `docker system prune`
10+
- Make sure you have your networking configured right. For example, if you don't map your ports correctly, you'll not be able to access the database outside docker (without running `docker inspect` to find the IP of the container)
11+
- Keep a separate folder for all your docker containers:
12+
- Create a directory in your home directory like: `$HOME/docker-data`
13+
- Then for every Docker image (whether it is Skytable or any other container) create a subfolder in that directory and map
14+
the subfolder as a volume for persistence
15+
3. **Check your firewall**: You want to be very sure about this! If you're starting your database on a different server (as you should; ideally you keep your database server separate from the host running your application server) then make sure that the ports are open and allowed
16+
4. **Set up virtual memory and monitoring**: To avoid exhausting resources, set up monitoring on your node and enable virtual memory to temporarily avoid OOMs
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: limits
3+
title: Limits
4+
---
5+
6+
We've made every effort to provide a robust querying interface, but there are some **temporary limitations** that we think you
7+
should know about. We aim to remove the limitations over the next few releases which we expect should happen fairly quickly.
8+
9+
Skytable's limitations primarily come from a bunch of concerns:
10+
- **Performance and scalability**: Most of our design decisions are influenced by concerns about performance. For example, it's very hard to efficiently scale multi-column indexes.
11+
- **Reliability**: how reliable is the execution of the task? If it's like walking on eggshells, then we're not going to implement it (for example, unreliable distributed locking)
12+
- **Security**: If it can't be run securely, then it's off our list
13+
14+
## Temporary limitations
15+
16+
- **DML in collections are still limited**: You'll be able to easily `INSERT` data into any collections but the manipulations on them are currently limited.:
17+
- `SELECT` will return the entire collection and cannot yet return a single element
18+
- `UPDATE` can append elements to *non-nested* collections but can't do the same for nested collections
19+
- `DELETE` can't remove individual elements
20+
- **Models cannot be `volatile` yet**. If you've used Skytable before, you'd know that you could previously create `volatile`
21+
models which were used as *caching tables* as in they didn't persist data across restarts. The `volatile` feature has been
22+
temporarily removed because we're working on integrating it with the new storage engine.
23+
24+
:::tip Nested collections will get an upgrade
25+
We understand that collections are fundamental to the complexity of today's data and hence we're working on this! The only reason our team spends so much time *perfecting* features is because it has match our design philosophy.
26+
27+
> You can have 100 fancy but slow features, or 10 powerful and performant features.
28+
29+
If it scales, we ship it. **We're on it!**
30+
:::
31+
32+
## Soft limitations
33+
34+
Following Skytable's design philosophy that closely encompasses NoSQL systems, the following soft limitations are set:
35+
- **Only one index**: Right now, the only index that you can use is the primary index (primary_key -> row). This is due to concerns about performance and scale
36+
- **No mass updates**: We consider mass updates, such as setting `counter += 1` to every row in a model with multi-million rows
37+
to be very slow and bad for performance. Hence, we do not allow mass updates at this time.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
id: installation
3+
title: Installation
4+
---
5+
6+
Getting started with Skytable involves choosing a mode of installation, downloading any required files and then starting up the database. You can choose to either use:
7+
8+
- [**Native binaries (recommended)**](#native-binaries): This is what is generally recommended for the best performance. You will need to download a bundle and then start the server binary; no expert knowledge required
9+
- [**Using a Debian package (recommended)**](#debian-package): If you're deploying on Ubuntu or any other Debian based Linux distribution, then consider using this method. Configuration files, users and passwords are autogenerated.
10+
- [**A Docker image**](#docker-image): We generally recommend using a Docker image for experimenting with Skytable on your local system during development and you want to keep your local system *clean*. If you want to use a Docker image for deployment, you're always free to do so!
11+
> **Note:** You might experience slightly degraded performance from the storage engine due to Docker engine's abstractions.
12+
13+
## Native binaries
14+
15+
To use native binaries you need to download a bundle which is simply a ZIP file with all the necessary binaries that you'll ever need to develop on and deploy Skytable.
16+
17+
1. **First download the latest bundle** for your platform. You can find [download links on the releases page](https://github.com/skytable/skytable/releases).
18+
2. **Unzip the ZIP file**. You'll find the following binaries in the extracted archive:
19+
- `skyd`: This is the database server binary which when started runs as a daemon, serving requests
20+
- `skysh`: This is the Skytable shell and it provides a very helpful interactive REPL database client
21+
- `sky-bench`: This is the benchmarking tool that you can use to load test Skytable
22+
3. **Start up the server**. You need to choose a `root` password for the `root` account which will have complete control over the database.
23+
24+
```bash
25+
./skyd --auth-root-password=<your root password>
26+
```
27+
28+
**Replace with your own secure password!**
29+
30+
Explanation:
31+
- `--auth-root-password`: sets the root password
32+
33+
The server starts up at `localhost:2003` and is ready to run queries.
34+
35+
:::info
36+
Your operating system might sometimes not let you run binaries directly. On Unix based systems, you'll need to run: `chmod +x skyd skysh sky-bench`.
37+
38+
And on Windows systems you might need to right-click on the binaries and click on "unblock"
39+
:::
40+
41+
## Debian package
42+
43+
Find the correct `*.deb` file [from the releases page](https://github.com/skytable/skytable/releases). Now simply run:
44+
45+
```sh
46+
sudo dpkg -i <file name>.deb
47+
```
48+
49+
The package will:
50+
51+
- **Generate a root password:** Watch the terminal output!
52+
- **Create a `systemd` unit**: So you can start and stop the process using `systemd` like `systemd start skyd`
53+
- **Generate a configuration**: Your configuration is stored in `/var/lib/skytable/config.yaml`. Go ahead and modify it if you need to!
54+
55+
## Docker image
56+
57+
:::info You must have docker set up!
58+
59+
- Use [this great guide from Docker](https://docs.docker.com/engine/install/) to install and get started
60+
- To be able to run `docker run` and related commands, you may need administrative privileges
61+
:::
62+
63+
### Simple setup
64+
65+
1. **Download the bundle**: To be able to run queries you need to download the bundle as described above
66+
2. **Start the container**:
67+
68+
```shell
69+
docker run -d --name skydb -p 2003:2003 skytable/skytable:latest
70+
```
71+
72+
:::tip
73+
The password for the Skytable instance on the Docker container is auto-generated. Run `docker logs -f skydb` and you'll see a log
74+
message with the generated password.
75+
:::
76+
77+
### With persistence
78+
79+
1. **Download the bundle**: To be able to run queries you need to download the bundle as described above
80+
2. **Create the data directory**: To ensure that our database is persistent and all our data doesn't vanish as soon as the container is terminated, we'll map the data directory to an actual directory on our local system.
81+
> **Note:** Create a folder called `skytable` in a convenient location. We recommend having a directory in `$HOME/docker-containers` where you can store the Skytable container's data and any other containers that you might use. It's a great way to keep things organized.
82+
3. **Create your configuration**: [Download this template file](https://raw.githubusercontent.com/skytable/skytable/next/examples/config-files/template.yaml) and place it into the directory you created. Update the password with your `root` password of choice.
83+
4. **Start the container**:
84+
85+
```shell
86+
docker run -d --name skydb \
87+
-v $HOME/docker-containers/skytable:/var/lib/skytable \
88+
-p 2003:2003 \
89+
skytable/skytable:latest
90+
```
91+
92+
Explanation:
93+
- This starts a container with name `skydb`
94+
- It maps the folder (as discussed earlier) `$HOME/docker-containers/skytable` from your local file system to `/var/skytable` (in the container's file system)
95+
- Maps port `2003` on the host to the containers port `2003` so that you can use the command-line client `skysh` without having to inspect the container's IP address

0 commit comments

Comments
 (0)