feat: grpc proto definitions + codegen infrastructure - #116
Merged
Conversation
single service covering all command groups: strings, keys, lists, hashes, sets, sorted sets, vectors, and server commands. includes bidirectional Pipeline rpc for batch operations. key design decisions: - packed float vectors for zero-parse VADD/VSIM - versioned package (ember.v1) for future compatibility - shared response types matching ShardResponse semantics - go_package option for client codegen
workspace dependencies: tonic 0.13, prost 0.13, tonic-build 0.13. ember-server gets a new `grpc` feature (not in defaults) that pulls in tonic, prost, and tonic-build. build.rs runs tonic codegen when the feature is enabled.
- makefile: add proto-gen target, include grpc in test/clippy features - ci: install protoc, enable grpc feature in check/test jobs - dockerfile: add protobuf-compiler, build with grpc, expose port 6380
kacy
added a commit
that referenced
this pull request
Feb 19, 2026
* add grpc proto definitions for ember.v1 service single service covering all command groups: strings, keys, lists, hashes, sets, sorted sets, vectors, and server commands. includes bidirectional Pipeline rpc for batch operations. key design decisions: - packed float vectors for zero-parse VADD/VSIM - versioned package (ember.v1) for future compatibility - shared response types matching ShardResponse semantics - go_package option for client codegen * add tonic/prost deps and grpc feature flag workspace dependencies: tonic 0.13, prost 0.13, tonic-build 0.13. ember-server gets a new `grpc` feature (not in defaults) that pulls in tonic, prost, and tonic-build. build.rs runs tonic codegen when the feature is enabled. * update build infra for grpc support - makefile: add proto-gen target, include grpc in test/clippy features - ci: install protoc, enable grpc feature in check/test jobs - dockerfile: add protobuf-compiler, build with grpc, expose port 6380
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 the protobuf service definition and build infrastructure for grpc support
alongside RESP3. this is the foundation for PRs that follow (grpc server impl,
go client, python client).
proto/ember/v1/ember.proto: full service definition covering strings, keys,lists, hashes, sets, sorted sets, vectors, server commands, and bidirectional
streaming pipeline
grpcfeature flag in ember-server (opt-in, not in defaults)build.rsfor tonic codegen behind#[cfg(feature = "grpc")]key design decisions:
repeated float vector = 3 [packed = true]sendsIEEE 754 bytes directly — eliminates the
s.parse::<f32>()bottleneck thatcosts 80% of VADD CPU time over RESP3
ember.v1): allows future breaking changes withoutaffecting existing clients
IntResponse,BoolResponse, etc. match howShardResponseworks internallywhat was tested
cargo build -p ember-server --features grpc— compiles cleanlycargo build -p ember-server— no regression without featurecargo clippy -p ember-server --features grpc -- -D warnings— cleancargo test -p ember-server --features grpc— 43/43 passcargo fmt --all --check— cleandesign considerations
the
grpcfeature is intentionally not in default features. users opt in atcompile time, and at runtime the grpc listener only starts when
--grpc-portispassed (coming in the next PR). this keeps the default binary size minimal for
users who only need RESP3.