Skip to main content

without-durability-redis

without-durability's two interfaces over Redis: a workflow's completed steps as one hash, its claim as another, and a queue of workflows that can run now.

from redis.asyncio import Redis
from without_durability import SplitDurable
from without_durability_redis import RedisCheckpointer, RedisStreamScheduler

redis = Redis(host=..., decode_responses=True)  # this client owns both ends of every key
durable = SplitDurable(RedisCheckpointer(redis=redis), RedisStreamScheduler(redis=redis))

Every guarantee here is a small Lua script, and each is a script for the same reason: it is only correct as one step. Checking whether a workflow is free and taking it; checking a fencing token and applying the write it guards; testing whether a key is recorded and reading back the winner. Split any of them into two round trips and the gap between them is where the guarantee leaks.

LuaEffect is what this store can commit alongside a record, so a step whose effect is a Redis write happens exactly once. That is worth stating plainly, because the usual framing (that exactly-once needs Postgres) is wrong about why: a Lua script is an atomic commit over Redis data, and the real constraint is that you can only transact within one datastore.

On a cluster that constraint becomes a slot. A workflow's two keys are hash-tagged (workflow:{id}) so a script may touch both, and an effect's keys must carry the same tag. Redis enforces this rather than trusting it: declared keys spanning slots are refused outright, and a script reaching a key another node owns dies partway having written nothing.

Two queues ship, and the difference between them is the finding rather than a choice you have to make carefully. RedisStreamScheduler is a stream read as a consumer group beside a deadline-scored sorted set, which buys a blocking read so an idle worker costs nothing. RedisSetScheduler is one sorted set scored by when each workflow becomes visible, which makes the timer, the consumer group, the pending list, and the trimmer all disappear, and costs the blocking read.

See the without-durability-redis guide (with the API reference) for the scripts themselves, what each key holds and for how long, and the two sharp edges (Redis's default persistence, and a TTL that can outlive a suspended workflow).

Metadata

Release files for without-durability-redis 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for without-durability-redis 0.0.7
File Size Uploaded
without_durability_redis-0.0.7.tar.gz 22.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for without-durability-redis 0.0.7
File Interpreter ABI Platform
without_durability_redis-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 48.7 kB

Release files / without_durability_redis-0.0.7.tar.gz

Download URL without_durability_redis-0.0.7.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7fc589e20cbd3b52d785a1d16a251f5fed59e5c3f09fb5193492293fb1ddee05
BLAKE2b-256 checksum
How to use checksums
9d4d424e37154e403ac13fbb6db44e0458a06e0bb6502f10e30b06e2a5dc2c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / without_durability_redis-0.0.7-py3-none-any.whl

Download URL without_durability_redis-0.0.7-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8f92aca6884dd5f0e2487b42da6fb06c22f4ba370573353fa28a7b7451a0028
BLAKE2b-256 checksum
How to use checksums
d7c6e8b6c4be1bd7e045291ef08514d4d6db7a8b73eef7115c0de594c9786aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.0.9

2 release files

0.0.8

2 release files

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.0

2 release 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