Rust persistent queue based on RocksDB with Python bindings
Project description
RocksQ
An inproc RocksDB-based queue with Python bindings. It is implemented in Rust.
Features:
- max capacity limit in number of elements;
- size calculation based on filesystem space usage;
- length calculation based on number of elements;
- supports only bytes-like objects;
- can operate in a multithreaded environment efficiently (push and pop methods can release GIL if necessary);
- keeps the state between restarts;
- two implementations: blocking and nonblocking;
What is not supported:
- pub/sub is not supported intentionally (implement it on top of RocksQ if necessary);
- TTL is not supported intentionally (implement it on top of RocksQ if necessary).
Implementation details
It works on RocksDB and uses a single column family. The keys are 64-bit integers, the values are byte arrays. The keys are generated by incrementing a counter. The read and write counters are stored in a separate key-value pairs.
It is implemented in Rust and PyO3, thus allows to release GIL when necessary. The library does not require external dependencies installed in the environment.
Supported Platforms and Python Versions
Windows: Python versions: 3.7-3.12.
Linux: ManyLinux Python versions: 3.7-3.12. CI does not build for PyPy, but it should work if you build it manually.
MacOS: Currently, I do not have MacOS environment to debug the build process in MacOS, all volounteers are welcome.
Installation
pip install rocksq
Usage
See the examples in the python directory.
API docs are located at: https://insight-platform.github.io/RocksQ/.
Performance
The performance is mostly limited by the throughput of the underlying filesystem. The queue is able to saturate the throughput of the filesystem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for rocksq-0.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ebd3e1c8a6a690f5e9f25a08b469c34e18da163b70b5e8842a5ba6e68ee85e7 |
|
MD5 | f9aff636a71ce4532faaf03c55a014ff |
|
BLAKE2b-256 | 4361ce45290ed3f039a80cbf0e4bae8dd37697508c2dc4c3c471b6547a1e9f30 |
Hashes for rocksq-0.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed6420253aabade09eabadfd277e9094514b90a2151412eafe34da12d0484d3 |
|
MD5 | 1f55bdfb8bc8e6a5bb278cd18553467f |
|
BLAKE2b-256 | 44f154b1bd6d46f079d74a14a0613884e8760368b0191044c8f4a696845969ce |
Hashes for rocksq-0.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4033be833a5ab97ff38fceb4d15e5e2f038b72e5618159c3ae176dd698b221fc |
|
MD5 | 325d8a9a673fe602ff8769c1bc9329d4 |
|
BLAKE2b-256 | cd9587d8acb13ba9db56c79f93bc8f87cf27e05e85b9760b5125f612ef9939f4 |
Hashes for rocksq-0.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd867dad0226c2ecbd8eb0d4cf8a4509363b977842ba21566f3b43422a9e25d |
|
MD5 | 96d2ddb3ce04ceb5377a5348970578b2 |
|
BLAKE2b-256 | 654c348f1cf60b97dae35312fa7d67e620aedd710009d4e5d577bb81600c72ec |
Hashes for rocksq-0.2.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee42ec4e46af5089b1fd40ad6e6929d9663c55d5339926be05a9379bb0cd4277 |
|
MD5 | f4c90b74d54df3c6ebdf02080a73e59b |
|
BLAKE2b-256 | c5c4cfde687988ca2d8d07945e10386c1f2a7ac9da7e60a741eab67ec142d4b3 |
Hashes for rocksq-0.2.0-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6b859d938ca9ed7b96fb8646eb7f55e42546188cfbc783aa96d874c4f1d7ba |
|
MD5 | 4d4fe9d60318bfc8d40232e23894232a |
|
BLAKE2b-256 | f991c41186d2addabfaf7bf033caffe2bcdd00e2720fec2c206f000f180a031e |
Hashes for rocksq-0.2.0-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779000756719febbe5504b98370e7696ba7f239e49f3c7c38118e0901c817474 |
|
MD5 | 265cef8ad5645a2b1dcb21a718b1d629 |
|
BLAKE2b-256 | ff1416b005207808e3809b2f4a8515088b78bb2f6585a527c0ca83019fd66b4c |
Hashes for rocksq-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5abbbc890ed079e4702c1408033a2541f5812fc3f91f6478c62266563482c067 |
|
MD5 | 883abf97e597fc3f8bf43cd0dff2cc49 |
|
BLAKE2b-256 | c3f03d28d3a8e6db74da54139caff5599f023cc44a64b6bea3eaac97f1e1fb46 |
Hashes for rocksq-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a1e7c8769c2199ee33bdb2df1a6e380db569f2d0c9efcdbb26b303c101e200 |
|
MD5 | 98b0f86cdcc87a637ad550ccf0a6378d |
|
BLAKE2b-256 | 336949587bc48325e8e6a3700018cf2d0296ff5b5cbbe907fcb1a76ddec36090 |
Hashes for rocksq-0.2.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9247e42adba15c818d7c38c8bea627c0d5d3c550e969f27f58aec0d458ff9e3e |
|
MD5 | 612ad9ba1b240a705a16dae5116e8eea |
|
BLAKE2b-256 | 46800944273990354d316336a36aa6e6f3ff836cc530d1c81cd82c117688c2e2 |
Hashes for rocksq-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b4e8a3ef749eb06557466aa12b7e87e6e6e5141f83cdd06a5553bde0e015958 |
|
MD5 | c81d7049ed3c1a36415bc40bf9f043fc |
|
BLAKE2b-256 | 87cbcc73be7fc34eaa0c225d3e77acafeb84e105d9886f24585c3997ab365a95 |
Hashes for rocksq-0.2.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 043fca4810257e734cdf881713fe906f08450c5fb92ed4cc0ac1dae3d28ad6ad |
|
MD5 | e2688890381e5566a51b29db6efc9963 |
|
BLAKE2b-256 | 25cb35dda6b61e60202b49949c3fde15f4c39aa2863470d4d9fb094a32b6fbe8 |
Hashes for rocksq-0.2.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc5c84dafa588ec31e00c97b093b4bbbe95f0a24615e307b613ef0516259acd9 |
|
MD5 | 2638d4973956919c8292eb7f7707ff58 |
|
BLAKE2b-256 | edf22dd2c947ebf4d3d0707dd93b2d5843161b7c2a9010d969e14802dc6bde58 |
Hashes for rocksq-0.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2040a8269e31e0af7239229a606ebdd021aec2e0cac08ade56c37fe00f88f2c9 |
|
MD5 | c4f51e2b08fb946254500066f5b11d41 |
|
BLAKE2b-256 | 113c689f6143682ba601aead3ee71df48dd4a15d91079b81d93de026c6151110 |
Hashes for rocksq-0.2.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d4dddc503344fac3cf1af045c01ef6d1cf0987e6cd2ccf25396fd167802523 |
|
MD5 | 000552a2a876688c0fc37235f76fa1d8 |
|
BLAKE2b-256 | 0648ae26f2554e0c2714424bf140c9ae4970d4489dccdbd8677a513b37ff6c78 |
Hashes for rocksq-0.2.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8828232d83b451ca1f0e8e531bc0eb895403013b09b988368a2b4958467f608 |
|
MD5 | a263da86f112717e64c63677d4497e00 |
|
BLAKE2b-256 | b3bf968dd49c9d5116ca6c19ef7ff5682ac6e2554875d1bc96af7e3c9cee6946 |
Hashes for rocksq-0.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 260b0261af0a74dced11e62b6c46fa5b27f1c94124f92b133ac41a7137839777 |
|
MD5 | 1c750c47c6ff1a5b135ba5da70e02076 |
|
BLAKE2b-256 | 6e56b66b4181a48ca7222ad5ca8fbfec64f5b63e2193d400418f88c6c453e3b8 |
Hashes for rocksq-0.2.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf49f1c81d7a17840386d3c05c763a4e07b28f71aca543ee9e4b43ff94163ea |
|
MD5 | 459b8f78f5504cb75fb54c8d1cf716a8 |
|
BLAKE2b-256 | a3abf6cd945396469c431fc0ea16acc8395867bc0599de6cb264a14dc44c1553 |
Hashes for rocksq-0.2.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ac704845503d0cae232f0404cfead2e341ae0f488b8f15a2376af8ff293d378 |
|
MD5 | 00d31a8578ef5e41a73cc77d7be3eed0 |
|
BLAKE2b-256 | 6d07b7c47fe19a6599dc6e52f9ebf8e13acffda53fee1899e0276140b7d09c73 |
Hashes for rocksq-0.2.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f68c2348da2621ff3544906899c90012aceecf6997755ed0165f07eeb30a407 |
|
MD5 | 12ae296ee7bf17fcf07bd57f66c48c3e |
|
BLAKE2b-256 | 9fb7197eed51b33387e91ac67504dd23a6505cf7ff3106081a652c537305edd1 |
Hashes for rocksq-0.2.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18ba84cf7bc3ae6998a7bfd4e296613af9588514f966f79b8f46a3216a6349d5 |
|
MD5 | 559f3f940fbfb0f2f3a0b6015c8d7149 |
|
BLAKE2b-256 | ce79fd38c8603653c025a55f588b45124d63d1f4d1318270384e7e8f129af58e |