Skip to content

feat(brook): add the Stream service messages (as experimental) - #895

Draft
moetemp wants to merge 1 commit into
mainfrom
moe/stream-service-messages
Draft

moetemp wants to merge 1 commit into
mainfrom
moe/stream-service-messages

Conversation

@moetemp

@moetemp moetemp commented Oct 26, 2026 •

Copy link
Copy Markdown

What changed?
This PR adds the Stream service messages, marked experimental.

  • stream/v1/message.proto has the shared types, streamservice/v1/request_response.proto has the requests and responses, and enums/v1/stream.proto has the enums.
  • StreamRef.owner is a common.v1.Execution, the Workflow or Standalone Activity that owns the Stream.
  • A read gives StreamRecord items. Each holds one oneof item: a StreamData Record, a Supersession, or the StreamClose. offset stays outside the oneof.
  • CreateStream is create-or-get for an open Stream with the same owner. That Stream keeps its Retention, and created is false. A create of a closed Stream fails with CLOSED, of an expired one with EXPIRED, and of another owner's with NOT_OWNER. So CreateStreamResponse has no status.
  • A create with an owner needs a ref whose owner names the owner's run chain, and the response's ref has that owner.
  • A Stream carries one payload type, so a Record has no Topic and a read has no filter.
  • The Topic fields of earlier drafts are reserved, since the SDK previews used them. So are auto_close (CreateStreamRequest field 5, DescribeStreamResponse field 4) and CreateStreamResponse.status (field 3).
  • StreamErrorDetails.reason is the StreamErrorReason enum. Each case names its gRPC status code, so each SDK can map a reason to one error type.
  • OFFSET is OUT_OF_RANGE. It's a read past the newest offset + 1, for example after a failover lost the newest Records, and a read from that offset works again later. A negative offset is INVALID.
  • The comments describe no backend. An offset is ordered, unique and sparse, with no Redis entry id.
  • No service.proto yet. It comes with the later stage of the project (Jetty).

Why?
The SDKs and Redis already use these messages, so they need one home before a server serves them.

Breaking changes
None. These are new files.

Server PR
None needed for now.

@moetemp
moetemp requested review from a team October 26, 2026 16:37
@moetemp moetemp changed the title Added the Stream service messages as experimental. feat(brook): add the Stream service messages (as experimental) Oct 26, 2026
@moetemp
moetemp marked this pull request as draft October 26, 2026 16:53
@moetemp
moetemp force-pushed the moe/stream-service-messages branch 3 times, most recently from 482ec01 to 5068d41 Compare October 28, 2026 08:56
The crate, sdk-python and later the server read one copy of these messages. The gRPC service
and its Nexus annotations come with the server.
moetemp added a commit to moetemp/nexgen that referenced this pull request Oct 28, 2026
The Stream protos are A1's files again, and the runtime proto is K10's, so the sample matches
the crate. `CreateStreamResponse` has no `status` now. The descriptor set and the bindings are
rebuilt with the README's recipe.
moetemp added a commit to moetemp/nexgen that referenced this pull request Oct 29, 2026
The Stream protos are A1's files again, so the sample matches the crate. `CreateStreamResponse`
has no `status` now. The descriptor set and the bindings are rebuilt with the README's recipe.
@moetemp
moetemp force-pushed the moe/stream-service-messages branch from 5068d41 to 44519d8 Compare October 29, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant