Skip to content

[Brook S6] Added the Redis and in-memory Stream backends. - #376

Closed
moetemp wants to merge 1 commit into
moe/brook/review/s5-client-readsfrom
moe/brook/review/s6-redis-memory
Closed

moetemp wants to merge 1 commit into
moe/brook/review/s5-client-readsfrom
moe/brook/review/s6-redis-memory

Conversation

@moetemp

@moetemp moetemp commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What was changed

This PR adds the Redis Stream backend (temporalio.contrib.stream.RedisStreamBackend) and the in-memory backend for tests (temporalio.contrib.stream.testing.MemoryStreamBackend).

  • A client creates a Stream on either with Client.create_stream, which takes backend= for a backend that isn't the default. The package has no create of its own.
  • Both call the temporalio-streams runtime that [Brook B1] Added the streams bridge feature that links the temporalio-streams crate. #370 links. The memory backend has Redis's rules, so tests can swap the Store with no other change.
  • The clients of one temporalio.runtime.Runtime share one Redis runtime object and its connections. So a service that makes a client for each tenant opens no more connections.
  • A standalone Stream expires one Retention after its last write or its close. safety_ttl applies only to an open Stream bound to a Workflow, which this SDK doesn't create yet.
  • CI installs redis-server on Linux and macOS, where the Redis lane fails instead of skipping. Redis has no official Windows build, so the lane skips there.
  • The live tests run on both backends, with the strict create, the retry of a create with its request id, and a read that ends when a close wakes it. They start their own redis-server, or use TEMPORAL_STREAMS_REDIS_URL.

Why?

These are the first backends that run. From here on, the tests run live on both Stores.

Open question. ExtensionStreamBackend is a public class in a private module, as the base of both backends. Is that OK?

Part of the Streams review series.

Checklist

  1. How was this tested:
    • poe lint and pytest tests/contrib/streams on both backends, with Redis required.

@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 25, 2026
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 252b606 to b70af4e Compare October 26, 2026 00:14
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch 2 times, most recently from 326073b to d018d29 Compare October 26, 2026 02:08
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from b70af4e to 50134b6 Compare October 26, 2026 02:08
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from d018d29 to b5bb616 Compare October 26, 2026 08:44
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 50134b6 to 6636d64 Compare October 26, 2026 08:44
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from b5bb616 to f5a8d77 Compare October 27, 2026 09:07
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch 2 times, most recently from 86ae5d2 to c774176 Compare October 27, 2026 09:17
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from f5a8d77 to 6d49da8 Compare October 27, 2026 09:17
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from c774176 to fe0790c Compare October 28, 2026 01:33
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 6d49da8 to 026e0a3 Compare October 28, 2026 01:33
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from fe0790c to 62769cb Compare October 28, 2026 07:54
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch 2 times, most recently from 11cd676 to c68482a Compare October 28, 2026 08:05
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 62769cb to 7265a04 Compare October 28, 2026 08:05
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch 2 times, most recently from b445a38 to 27b6d1c Compare November 5, 2026 23:10
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 7104162 to 4b9c1eb Compare November 5, 2026 23:10
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 4b9c1eb to 1d4d038 Compare November 6, 2026 09:06
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 27b6d1c to 06f4615 Compare November 6, 2026 09:06
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 06f4615 to 84bc88f Compare November 6, 2026 09:22
@moetemp

moetemp commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Closed in favor of #381, the combined branch, which has this change.

@moetemp moetemp closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant