Skytable is a modern scalable NoSQL database with BlueQL, designed for performance, scalability and flexibility. Skytable gives you spaces, models, data types, complex collections and more to build powerful experiences
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Sayan 790558d2c7
Improve reliability, simplicity and recoverability of BGSAVE (#153)
* Create a new file on writing to flock-ed file

This fix is a very important one in two ways. Say we have an user A.
They go ahead and launch skyd. skyd creates a data.bin file. Now A just
deletes the data.bin file for fun. Funny enough, this never causes flock
to error!
Why? Well because the descriptor/handle is still valid and was just
unlinked from the current directory. But this might seem silly since
the user exits with a 'successfully saved notice' only to find that the
file never existed and all of their data was lost. That's bad.
There's a hidden problem in our current approach too, apart from this.
Our writing process begins by truncating the old file and then writing
to it by placing the cursor at 0. Nice, but what if this operation just
crashes. So we lost the current data AND the old data. Not good.

This commit does a better thing: it creates a new temporary file, locks
it before writing and then flushes the current data to the temporary
file. Once that succeeds, it replaces the old data.bin file with the
newly created file.

This solves both the problems mentioned here for us:
1. No more of the silly error
2. If BGSAVE crashes in between, we can be sure that at least the last
data.bin file is in proper shape and not half truncated or so.

This commit further moves the background services into their
own module(s) for easy management.

* Fix CI scripts

Fixes:
1. Our custom runner (drone/.ci.yml) was modified to kill the skyd
process once done since this pipeline is not ephemeral.
2. GHA for some reason ignores any error in the test step and proceeds
to kill the skyd process without erroring. Since GHA runners are
ephemeral, we don't need to do this manually.
3 years ago
.github Improve reliability, simplicity and recoverability of BGSAVE (#153) 3 years ago
assets Rebrand from TerrabaseDB to Skybase (#90) 4 years ago
ci Change wd to artifacts to package bundle 3 years ago
cli Update versioning and support information [skip ci] 3 years ago
examples/config-files Fix outdated comments and ident naming 4 years ago
libsky Update versioning and support information [skip ci] 3 years ago
server Improve reliability, simplicity and recoverability of BGSAVE (#153) 3 years ago
sky-bench Update versioning and support information [skip ci] 3 years ago
sky-macros Update versioning and support information [skip ci] 3 years ago
.ci.yml Improve reliability, simplicity and recoverability of BGSAVE (#153) 3 years ago
.dockerignore Fix .dockerignore to include `skyd` 4 years ago
.gitignore Change the data file path to data/data.bin 3 years ago
AUTHORS.md Enable string escaping with quotes for skysh 4 years ago
CHANGELOG.md Fix disk storage on termination (#151) 3 years ago
CODEOWNERS Update CODEOWNERS 3 years ago
CODE_OF_CONDUCT.md Improve community documentation 4 years ago
CONTRIBUTING.md And now we're Skytable 4 years ago
CONTRIBUTORS.md Improve docs 4 years ago
Cargo.lock Update versioning and support information [skip ci] 3 years ago
Cargo.toml Rebrand from TerrabaseDB to Skybase (#90) 4 years ago
Dockerfile Upgrade deps, add changelog entry and bump version 4 years ago
LICENSE Formal terrapipe query parsing 4 years ago
README.md Update versioning and support information [skip ci] 3 years ago
actions.jsonc Fix actiondoc and update doc builder script 4 years ago
pushrelease.sh Improve workflow and docs 4 years ago
release.sh Rebrand from TerrabaseDB to Skybase (#90) 4 years ago

README.md

<html>

Skytable

The next-generation NoSQL database

GitHub Workflow Status Status: Alpha Development GitHub release (latest SemVer including pre-releases) Docs Contribute Now

</html>

What is Skytable?

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable is curently in an alpha stage, but can be used as a performant, secure and persistent key-value store.

Getting started 🚀

  1. Download a bundle for your platform from here ⬇️
  2. Unzip the bundle
  3. Make the files executable (run chmod +x sdb skysh on *nix systems)
  4. First run sdb to start the database server and then run skysh to start the interactive shell
  5. Run commands like: SET foo bar , GET bar , UPDATE cat mitten or DEL proprietary 🤪 on skysh !

You can learn more about installation here

Features

  • Insanely fast: Scale to millions of queries per second per node
  • Key/value store: GET , SET , UPDATE and all that stuff
  • Snapshots: Automated (and tunable) snapshots for stress-free backups
  • Secure: Secure connections are built into Skytable with SSL/TLS
  • Multithreaded: Designed to exploit all CPU cores
  • Resource friendly: The database server doesn't need more than 1MB to run
  • Convenient: Without the setup hassle and system-specific dependencies

(... and more on the way)

Clients 🔌

The project currently maintains an official Rust driver and we have plans to support more languages along the way!

If you want to use a different language, for now you'll just need to implement the simple and performant Skyhash Protocol Spec or for versions prior to 0.6.0, the Terrapipe Protocol Spec.

Community 👐

A project which is powered by the community believes in the power of community! If you get stuck anywhere - here are your options!

<html> </html>

Platforms 💻

Linux supported macOS supported Windows supported

Versioning

This project strictly follows semver, however, since this project is currently in the development phase (0.x.y), the API may change unpredictably

Contributing

Contribute Now

Yes - we need you! Be it a typo, a bizarre idea, a dirty bug🐞 or an amazing patch - you're welcome to contribute to Skytable! Beginner friendly issues are marked with the label. Read the guide here.

Contributors

You can see a full list of contributors here

License

First know your rights! This project is licensed under the AGPL-3.0 License.