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
The library is automatically built for X86_64 and AARCH64 architectures with the Manylinux runtime.
Python versions: 3.7-3.12. CI does not build for PyPy, but it should work if you build it manually.
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.1.6-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc81a31fa15426956f8dbd4bab61d0e3a660e5f428845e5970158f3788c443cc |
|
MD5 | 275ff0831cc389a34564676e33a3f1d4 |
|
BLAKE2b-256 | 52fe2bcc7cf1d1f1630eada01b5c4559cc377a5022beb16bb6fdd8d494420132 |
Hashes for rocksq-0.1.6-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e2ad274f898866622059c0cfb4cff06cefb8048947f5168396db0acd7a0086 |
|
MD5 | ce4fea2054c059f760a021850fb3f22a |
|
BLAKE2b-256 | c24a7421da50b93a64070a000acf3fe2b8803d4e17b78243dda3e56f6f5d7f8c |
Hashes for rocksq-0.1.6-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4c454eaa0c852e6e1f30d71fd6a7a3d31c7d4f6b0122933496ded36d26a94de |
|
MD5 | b9deef14d044b3e3eb7bb1d28e1e5a56 |
|
BLAKE2b-256 | dc43045edf40d3d17899e3aa36de2b1704eae5d173b097de85de65f7b2dcc9e1 |
Hashes for rocksq-0.1.6-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54cf456309fbb1e488003455d1c9363cad72ced2a64690739cf0b846ce1c0c52 |
|
MD5 | 3ab7449deb2a991c15e3eb9bb1cae23b |
|
BLAKE2b-256 | 237d7c74f0e28e79043c9d4c72da93ef511fd8e6f4da487ba847f757ab0b7e34 |
Hashes for rocksq-0.1.6-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65ac8087f662703e9a79a5209a01c889976408cd8df114750501f0ff5af3bd82 |
|
MD5 | a167418f2c3c61b1859f50b55512e3ba |
|
BLAKE2b-256 | 4ce7757be6a2b63f6951568a3e75e9fc642ccb71cf5106f0146f644b608e1250 |
Hashes for rocksq-0.1.6-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb8fd3cc59d21f733adc68713c6c97bd35b21289c5f456db0c7882d71914d00 |
|
MD5 | e56ac2c01490fe8d120a5d2f0ffe17ce |
|
BLAKE2b-256 | 655c258a016f8bfbcd58785a711f638a1e8101aca5f97fe7929bc56d29c49278 |
Hashes for rocksq-0.1.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abcaff092c21128d704ea1046549c1d027f843c3660f7d53d8e3121dcd9cb21a |
|
MD5 | 013e92bf858745b5f7bb534171451c7c |
|
BLAKE2b-256 | 9cdb29809cccd137835c71030e5cf0dce64e226e6ccb39646337495e0c108c07 |
Hashes for rocksq-0.1.6-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feca95c84914b8675a2db7238f8365ab76bc9e6f0769962d4c85fbc3efb06e76 |
|
MD5 | f16aceeb100217b10cd4613d5d9b6b81 |
|
BLAKE2b-256 | 63ac7b5cd07706b2f05e22ad9b6595e78148d32c16350eda61f0c2d6d10f4c90 |
Hashes for rocksq-0.1.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53d6b7d7c330cdeaea723c45032205a80ce6b0a5bb41191f3d874701a8bc3fe3 |
|
MD5 | ee893c66598d6c0747d431291809c52e |
|
BLAKE2b-256 | 7ea158f33fd901766a2cc4e3b93e4ca4bbec0815f021d499962615cca3166f49 |
Hashes for rocksq-0.1.6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4bc8078830f42efdd98f9a7bc09858fdb56f4b118e4ae04d35e7cbb4e7fd2fc |
|
MD5 | c2a7915dd25808e5492188d517af1626 |
|
BLAKE2b-256 | 5d07d64385d9d68aae6d654084092212c9ba92768411c4aedb5287f92c54fbf2 |
Hashes for rocksq-0.1.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a96f92d55a62937892212328e073888573ae8fac92b395b24b17438730f5e5f0 |
|
MD5 | 35625b23c447f59a3cbc95ccda1932da |
|
BLAKE2b-256 | 5b100f1211a5505870d93627997f2c0c92224eb14d10d7a17d4d6902b9879e7a |
Hashes for rocksq-0.1.6-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9d856e28a7a85203738ee3c520c1fb9678896f2a0579860f664f3d05107a554 |
|
MD5 | aa5a0a6111a400aa3ab9c7ee90dc4cac |
|
BLAKE2b-256 | 43d290ae2957f93b7eb72e2987ea49ec787d67aca91cbb3ac0899160634cb183 |
Hashes for rocksq-0.1.6-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e3cbdbe7a7bb6754b062135d28d1c10f7743eb78f44825f7643adb535c46e46 |
|
MD5 | 7cac727833d01b23793618435b973a1b |
|
BLAKE2b-256 | 717cc756da5b728926f91f030863911ac69acb637dfe483905c3e910698bb30b |
Hashes for rocksq-0.1.6-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96fbf8ec616e713336e5f0eb9b5e1647472648f4d3b43ea025fea5dfb67945ac |
|
MD5 | b729944acd19a3810ce976949cf065ac |
|
BLAKE2b-256 | 077d76a4ec0fb50bbf3a90c174c83d5c49f416ec4ea1c8ea18f06dd09c1cfaa1 |
Hashes for rocksq-0.1.6-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d67ce6f5274b503f209b8ad9944930f9977f3d8d8b9226f17245cccbf25255f4 |
|
MD5 | cca7e31d9845a9f27490af90f91f51cd |
|
BLAKE2b-256 | 04dd9b61fd211c236c864338052c870c48ac570a88247044a0d1f230acf39ab3 |
Hashes for rocksq-0.1.6-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6793e39c280b7f81637eb1c23661ab4707409b3f2d3abfa00a5ac29cc655a295 |
|
MD5 | e34871d3fabcdb3503ca8d30dc338b47 |
|
BLAKE2b-256 | c0ed973e41606db54ae910e259518f9662427fe922e45265eddd8be150a40cdc |