ds-service: Yet Another Data Structure Server
ds-service is a small, in-memory data structure server that is accessible via gRPC.
ds-service runs a single server process
that holds shared state in memory
and lets many distributed clients and workers coordinate using it.
Presently, it provides six data structures:
- A key-value store -- a shared
string -> bytesstore for passing data between processes. - A task queue -- a priority-based work queue that distributes tasks to workers and tracks their state.
- A journal store -- append-only, ordered logs of binary entries.
- A time series store -- append-only series of timestamped floating-point values.
- Named mutexes -- cooperative locks for coordinating exclusive resource access across workers.
- Counters -- named monotonic counters that hand out successive integers.
Each of these is a separate key space with its own set of RPCs.
Architecture
- Server (
cpp/ds-service.cpp) -- a C++23 gRPC service. All state lives in memory, with a separate lock guarding each top-level data structure. Operations on one structure are serialized, while operations on different structures may run concurrently. Each RPC touches a single structure, so no request ever holds more than one lock. State is not persisted; that is, when the server stops all data is lost. - Client (
python/ds_service_client/) -- a Python 3.12+ client library that wraps the generated gRPC stubs and translates gRPC status codes into Python exceptions (KeyError,ValueError,TimeoutError). - Interface (
misc/ds-service.proto) -- the protobuf/gRPC contract shared by both sides.
Additional Information
| Document | What it covers |
|---|---|
| Data structure reference | Every RPC, its arguments and error statuses, and the exact semantics of each data structure. |
| How to build the server | Requirements, the Conan + CMake build, installing, running, and the static musl build. |
| How to use the Python client | Installing, connecting, the gRPC-status-to-exception mapping, and usage examples. |
| How to run the tests | The pytest integration suite, pointing it at the binary, and what the fixtures provide. |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ds_service_client-2.2.0.tar.gz.
File metadata
- Download URL: ds_service_client-2.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e552a11463ec6e37ef2657c30fb0ca6215ea3f9272462bbc96ff0e68450bf5
|
|
| MD5 |
7acc34009d9180d266fda3cc024d1abf
|
|
| BLAKE2b-256 |
47e6793b3317bf40dfdf971e8c76ec4042d3864c9d5b95f984791fde45a48d92
|
File details
Details for the file ds_service_client-2.2.0-py3-none-any.whl.
File metadata
- Download URL: ds_service_client-2.2.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9656883a03e7070710578b6b97508e290f69563804e76e5bd9705131aa99a23
|
|
| MD5 |
5ff213d11f2fec46878ef63d307f7bcc
|
|
| BLAKE2b-256 |
2b1bc56cffd3ed7c406d8b11dec034367ee8bf9bdf8eab6df66eb6e04bfd2516
|