feat: complete grpc api — pub/sub, slowlog, operational commands#141
Merged
feat: complete grpc api — pub/sub, slowlog, operational commands#141
Conversation
adds Echo, Decr, Unlink, BgSave, BgRewriteAof, SlowLog (get/len/reset), Publish, Subscribe (server-streaming), PubSubChannels, PubSubNumSub, PubSubNumPat to the EmberCache service definition. includes corresponding message types and pipeline request/response variants for all new unary commands.
implements Echo, Decr, Unlink, BgSave, BgRewriteAof, SlowLog (get/len/reset), Publish, Subscribe (server-streaming), PubSubChannels, PubSubNumSub, PubSubNumPat. Subscribe uses server-side streaming — the client sends channel/pattern lists and receives a stream of SubscribeEvent messages. cleanup runs automatically when the client disconnects. also passes PubSubManager to EmberService for pub/sub operations, and adds all new unary commands to the pipeline dispatch macro.
kacy
added a commit
that referenced
this pull request
Feb 19, 2026
* feat: add new rpc definitions to proto adds Echo, Decr, Unlink, BgSave, BgRewriteAof, SlowLog (get/len/reset), Publish, Subscribe (server-streaming), PubSubChannels, PubSubNumSub, PubSubNumPat to the EmberCache service definition. includes corresponding message types and pipeline request/response variants for all new unary commands. * feat: implement new grpc rpc handlers implements Echo, Decr, Unlink, BgSave, BgRewriteAof, SlowLog (get/len/reset), Publish, Subscribe (server-streaming), PubSubChannels, PubSubNumSub, PubSubNumPat. Subscribe uses server-side streaming — the client sends channel/pattern lists and receives a stream of SubscribeEvent messages. cleanup runs automatically when the client disconnects. also passes PubSubManager to EmberService for pub/sub operations, and adds all new unary commands to the pipeline dispatch macro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
adds 15 new gRPC RPCs to bring the API closer to parity with RESP3:
unary commands:
Echo— string echoDecr— decrement integer keyUnlink— async DEL with background deallocationBgSave— trigger snapshotBgRewriteAof— trigger AOF compactionSlowLogGet,SlowLogLen,SlowLogReset— slowlog introspectionPublish— fire-and-forget publish to a channelPubSubChannels,PubSubNumSub,PubSubNumPat— pub/sub introspectionstreaming:
Subscribe— server-side streaming RPC. client sends channel/pattern lists, server streamsSubscribeEventmessages. subscriptions are cleaned up automatically when the client disconnects.all new unary commands are also available via the
Pipelinebidirectional stream.what was tested
cargo build -p ember-server --features grpc,vector— clean buildcargo test --workspace— all tests pass (69/69, one flaky echo test that passes on rerun)design considerations
Subscribeuses server-side streaming rather than bidirectional streaming since the client only needs to send the initial subscription list. cleanup is handled via drop on client disconnect.PubSubManageris now shared between RESP3 connection handlers and the gRPC service viaArc, so both protocols share the same pub/sub state.