Skip to main content

ds-service: Yet Another Data Structure Server

Futuristic banner image.

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 -> bytes store 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 -- worker-owned 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, the task-queue-specific NoTaskAvailable and TaskStateError, and MutexNotHeld). It ships a blocking client, DsServiceClient, and an asyncio one, DsServiceClientAsync, offering the same methods and raising the same exceptions.
  • 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, usage examples, and the asyncio client.
How to run the tests The pytest integration suite, pointing it at the binary, and what the fixtures provide.
Developer notes Working on ds-service itself: the generated code workflow, the conventions a change is checked against, versioning, and known limitations.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ds_service_client-4.1.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ds_service_client-4.1.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file ds_service_client-4.1.0.tar.gz.

File metadata

  • Download URL: ds_service_client-4.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for ds_service_client-4.1.0.tar.gz
Algorithm Hash digest
SHA256 ac54b57ed39a8e47d5ca01954f87e25d8d3b854366a7c16aa1397c6bfe2916e5
MD5 5b15e10d307adf81c6026df844ff2d10
BLAKE2b-256 65b22b76b05c37405fc2e69035a40c0a1360dfe3533000cd8da892462e016e6a

See more details on using hashes here.

File details

Details for the file ds_service_client-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ds_service_client-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1db3d763abac0b814af163fc7f3788da52e33a882b3a708d8e2b2d3f2b3a0e2
MD5 9d20c56732de860eabfada18e7be00ac
BLAKE2b-256 168a111a38816c6634092716957f3c17f0ba5f62fb3ecbc77ff421823efc22a2

See more details on using hashes here.

Release history Release notifications | RSS feed

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

This release

4.1.0 This release

2 files

4.0.0

2 files

3.0.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.0.4

2 files

1.0.2

2 files

1.0.1

2 files

0.4.1

2 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page