-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README to contain a quick start guide for speedb
- Loading branch information
Amnon Hanuhov
committed
Jun 20, 2022
1 parent
f4f78c8
commit d64a561
Showing
1 changed file
with
50 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,59 @@ | ||
## RocksDB: A Persistent Key-Value Store for Flash and RAM Storage | ||
# SpeeDB: A drop in replacement embedded solution for RocksDB | ||
|
||
[![CircleCI Status](https://circleci.com/gh/facebook/rocksdb.svg?style=svg)](https://circleci.com/gh/facebook/rocksdb) | ||
[![TravisCI Status](https://api.travis-ci.com/facebook/rocksdb.svg?branch=main)](https://travis-ci.com/github/facebook/rocksdb) | ||
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/fbgfu0so3afcno78/branch/main?svg=true)](https://ci.appveyor.com/project/Facebook/rocksdb/branch/main) | ||
[![PPC64le Build Status](http://140-211-168-68-openstack.osuosl.org:8080/buildStatus/icon?job=rocksdb&style=plastic)](http://140-211-168-68-openstack.osuosl.org:8080/job/rocksdb) | ||
## Checking out the source | ||
If you're a GitHub user: | ||
|
||
RocksDB is developed and maintained by Facebook Database Engineering Team. | ||
It is built on earlier work on [LevelDB](https://github.com/google/leveldb) by Sanjay Ghemawat (sanjay@google.com) | ||
and Jeff Dean (jeff@google.com) | ||
git clone git@github.com:speedb-io/speedb | ||
|
||
This code is a library that forms the core building block for a fast | ||
key-value server, especially suited for storing data on flash drives. | ||
It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs | ||
between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) | ||
and Space-Amplification-Factor (SAF). It has multi-threaded compactions, | ||
making it especially suitable for storing multiple terabytes of data in a | ||
single database. | ||
otherwise: | ||
|
||
Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples | ||
git clone git://github.com:ceph/ceph | ||
|
||
See the [github wiki](https://github.com/facebook/rocksdb/wiki) for more explanation. | ||
## Dynamically linking SpeeDB | ||
If speedb is in the default library path, use: | ||
|
||
The public interface is in `include/`. Callers should not include or | ||
rely on the details of any other header files in this package. Those | ||
internal APIs may be changed without warning. | ||
-lspeedb | ||
|
||
Questions and discussions are welcome on the [RocksDB Developers Public](https://www.facebook.com/groups/rocksdb.dev/) Facebook group and [email list](https://groups.google.com/g/rocksdb) on Google Groups. | ||
Otherwise, you have to include the path to the folder the library is in like so: | ||
|
||
## License | ||
-L/path/to/speedb/library/folder -lspeedb | ||
|
||
## Usage | ||
Usage of the library in your code is the same, regardless of whether you statically linked the library or dynamically linked it, and examples can be found under the https://github.com/speedb-io/speedb/tree/main/examples directory. | ||
The public interface is in `include/`. Callers should not include or rely on the details of any other header files in this package. Those internal APIs may be changed without warning. | ||
|
||
## Build dependencies | ||
Please refer to the file https://github.com/speedb-io/speedb/blob/main/INSTALL.md for a list of all the dependencies and how to install them across different platforms. | ||
|
||
## Building SpeeDB | ||
|
||
mkdir build && cd build | ||
cmake .. [cmake options] -GNinja | ||
ninja | ||
|
||
This will build all the targets specified inside https://github.com/speedb-io/speedb/blob/main/CMakeLists.txt. | ||
By default, `ninja` will run N jobs in parallel where N is derived from the number of CPU cores available on the building host. If you want to limit the number of jobs, simply use the `-j` option. | ||
|
||
If you want to build a specific target: | ||
|
||
ninja [target name] | ||
|
||
RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses. | ||
## Running tests | ||
|
||
cd build | ||
ninja | ||
./[test name] --db=/path/to/db | ||
|
||
for example, `db_blob_basic_test`: | ||
|
||
cd build | ||
ninja | ||
./db_blob_basic_test --db=/tmp/example_db | ||
|
||
The test will generate a random DB at the specified path. This is also where speedb will store the LOG files. | ||
|
||
## Contributing code | ||
`TODO:` This section should point the reader to a dedicated file explaining how to contribute | ||
|
||
## License | ||
SpeeDB is licensed under Apache 2.0 |