Skip to content

feat(grpc): close api gap — 39 new rpcs#306

Merged
kacy merged 1 commit intomainfrom
feat/grpc-api-gap
Feb 25, 2026
Merged

feat(grpc): close api gap — 39 new rpcs#306
kacy merged 1 commit intomainfrom
feat/grpc-api-gap

Conversation

@kacy
Copy link
Owner

@kacy kacy commented Feb 25, 2026

summary

closes the gap between the resp3 engine (~170 commands) and the grpc service (68 rpcs). adds 39 new rpcs, ~35 new message types, extends the pipeline streaming handler, and adds five new pipeline result types.

new commands by category:

  • strings: getdel, getex, getrange, setrange
  • keys: copy, randomkey, touch
  • lists: lindex, lset, ltrim, linsert, lrem, lpos, lmove
  • sets: sunion, sinter, sdiff, sunionstore, sinterstore, sdiffstore, srandmember, spop, smismember
  • hashes: hscan
  • sorted sets: zrevrank, zrevrange, zcount, zincrby, zrangebyscore, zrevrangebyscore, zpopmin, zpopmax, zdiff, zinter, zunion, zscan
  • scans: sscan
  • server: time, lastsave

new pipeline result types (tags 30–34): BoolArrayResponse, HScanResponse, ZScanResponse, SScanResponse, TimeResponse. pipeline oneof command extended to tag 111.

intentionally skipped: blpop/brpop (blocking doesn't map to unary grpc), multi/exec (requires stateful streaming), cluster/acl/config (admin tier), auth/quit/client (connection-level).

what was tested

  • cargo build -p ember-server --features grpc — clean, zero warnings
  • cargo test -p ember-server --features grpc — 137 tests, all pass
  • score bound parsing verified: -inf, +inf, (5.0, 5.0 round-trip correctly through parse_score_bound()

design considerations

same-shard requirement for multi-key opscopy, lmove, sunion/sinter/sdiff, and zdiff/zinter/zunion all route to a single shard. copy and lmove return an error when source and destination hash to different shards (same behavior as rename). the set/sorted-set multi-key ops route to the first key's shard, consistent with the resp3 handler.

with_scores on sorted set range opszdiff, zinter, zunion, zrangebyscore, zrevrangebyscore, and zrevrange always fetch scored data from the engine. if with_scores is false, scores are zeroed in the response rather than requiring a separate engine call.

lpos returns OptionalIntResponse — returns only the first match. a future lpos_all rpc can return an array if needed; the count field is accepted but only the first result is surfaced.

adds all commonly-useful commands missing from the grpc service.
the server had ~170 resp3 commands; the proto only exposed 68.
this brings the grpc api close to parity.

new commands by category:
- strings: getdel, getex, getrange, setrange
- keys: copy, randomkey, touch
- lists: lindex, lset, ltrim, linsert, lrem, lpos, lmove
- sets: sunion, sinter, sdiff, sunionstore, sinterstore, sdiffstore,
  srandmember, spop, smismember
- hashes: hscan
- sorted sets: zrevrank, zrevrange, zcount, zincrby, zrangebyscore,
  zrevrangebyscore, zpopmin, zpopmax, zdiff, zinter, zunion, zscan
- scans: sscan
- server: time, lastsave

also adds boolArrayResponse, hScanResponse, zScanResponse, sScanResponse,
and timeResponse as new pipeline result types (tags 30-34).

all new rpcs are wired into the pipeline streaming handler.
@kacy kacy merged commit 3c7ac86 into main Feb 25, 2026
6 of 7 checks passed
@kacy kacy deleted the feat/grpc-api-gap branch February 25, 2026 18:55
kacy added a commit that referenced this pull request Feb 25, 2026
- ember-client readme now covers all 65+ commands (strings, keys, lists,
  hashes, sets, sorted sets, server, slowlog, pub/sub, vector), public types
  (ScanPage, SlowlogEntry, Message, SimResult), and the full pipeline method
  reference
- new crates/README.md: crate table with package names, dependency graph,
  cargo cheat-sheet, and makefile target reference
- regenerate go and python grpc stubs from the latest proto (closes api gap
  from pr #306 — 39 new rpcs now reflected in generated code)
- fix clients/ember-py/Makefile: use python3 instead of python
kacy added a commit that referenced this pull request Feb 25, 2026
…#307)

- ember-client readme now covers all 65+ commands (strings, keys, lists,
  hashes, sets, sorted sets, server, slowlog, pub/sub, vector), public types
  (ScanPage, SlowlogEntry, Message, SimResult), and the full pipeline method
  reference
- new crates/README.md: crate table with package names, dependency graph,
  cargo cheat-sheet, and makefile target reference
- regenerate go and python grpc stubs from the latest proto (closes api gap
  from pr #306 — 39 new rpcs now reflected in generated code)
- fix clients/ember-py/Makefile: use python3 instead of python
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