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.5

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.5
File Size Uploaded
without_durability_redis-0.0.5.tar.gz 20.3 kB Details

Built distribution (wheel)

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

Total release size: 44.9 kB

Release files / without_durability_redis-0.0.5.tar.gz

Download URL without_durability_redis-0.0.5.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4a97b3754f36a4869c8ced8639a058fc4c7f9ba069a2643bdb16d65a4a1c4fd8
BLAKE2b-256 checksum
How to use checksums
1d64851cf9f79071021621e0e4632ff673694bfc2373b2dce4488bdfca1d404f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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.5-py3-none-any.whl

Download URL without_durability_redis-0.0.5-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fddc3cb61776b3b480f3e022da043700650368a6b9c5b25395ff86c281acaeb2
BLAKE2b-256 checksum
How to use checksums
de005067e16010838f350480fae1f79ee9b9881690e8a3641940cc831cd9a9c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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

0.0.7

2 release files

0.0.6

2 release files

This release

0.0.5 This release

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