Repository navigation
feat: Python and Node Cache clients - #52
Merged
Merged
Conversation
In-repo clients speak the existing Cache gRPC port. CI regenerates the stubs from cache.proto and fails unless both facades and docs/API.md cover every Cache RPC.
Proves clients-up-to-date fails when cache.proto and the facade table disagree. Revert after CI shows the failure.
SuperCache bench vs
|
| cell | ops/s (main → PR) | Δ ops/s | p50 | p99 |
|---|---|---|---|---|
get/hit n=1 c=1 uniform |
17938 → 18333 | +2.2% | 57µs → 55µs | 105µs → 91µs |
get/hit n=1 c=10 uniform |
62580 → 62324 | -0.4% | 144µs → 146µs | 436µs → 421µs |
get/hit n=3 c=10 uniform |
72446 → 70725 | -2.4% | 123µs → 125µs | 451µs → 454µs |
miss/miss-cacheonly n=1 c=1 uniform |
17480 → 17040 | -2.5% | 58µs → 59µs | 106µs → 110µs |
miss/miss-cacheonly n=1 c=10 uniform |
62928 → 62983 | +0.1% | 144µs → 143µs | 447µs → 456µs |
set/put n=1 c=1 uniform |
16841 → 17005 | +1.0% | 59µs → 59µs | 99µs → 101µs |
set/put n=1 c=10 uniform |
63019 → 61483 | -2.4% | 144µs → 147µs | 430µs → 448µs |
Δ ops/s: green-ish is higher throughput. Latency: lower is better.
go test -bench (ns/op)
| benchmark | ns/op (main → PR) | Δ | allocs/op |
|---|---|---|---|
BenchmarkEngineDelete |
506 → 505 | -0.1% | 6 → 6 |
BenchmarkEngineGetHit |
675 → 698 | +3.4% | 15 → 15 |
BenchmarkEngineGetHitParallel |
557 → 556 | -0.2% | 15 → 15 |
BenchmarkEngineGetMissCacheOnly |
489 → 519 | +6.3% | 14 → 14 |
BenchmarkEngineGetMissCacheOnlyParallel |
405 → 399 | -1.6% | 14 → 14 |
BenchmarkEngineGetMissLoadThrough |
969 → 960 | -0.9% | 24 → 24 |
BenchmarkEngineGetMissLoadThroughParallel |
1101 → 1100 | -0.1% | 23 → 23 |
BenchmarkEnginePut |
891 → 872 | -2.2% | 18 → 18 |
BenchmarkEnginePutParallel |
861 → 842 | -2.2% | 18 → 18 |
BenchmarkStoreBitSet |
81 → 77 | -5.0% | 1 → 1 |
BenchmarkStoreCGetHit |
57 → 56 | -1.3% | 0 → 0 |
BenchmarkStoreCIncr |
74 → 73 | -1.2% | 1 → 1 |
BenchmarkStoreCMSIncr |
89 → 85 | -5.3% | 0 → 0 |
BenchmarkStoreCMSIncrN |
90 → 84 | -6.2% | 0 → 0 |
BenchmarkStoreGeoAdd |
8578 → 6668 | -22.3% | 2 → 2 |
BenchmarkStoreGeoPosHit |
65 → 64 | -1.7% | 0 → 0 |
BenchmarkStoreGeoPosMiss |
65 → 64 | -0.6% | 0 → 0 |
BenchmarkStoreGetHit |
179 → 180 | +0.6% | 2 → 2 |
BenchmarkStoreGetHitParallel |
218 → 212 | -2.4% | 2 → 2 |
BenchmarkStoreHGetHit |
69 → 66 | -3.7% | 1 → 1 |
BenchmarkStoreHGetMiss |
65 → 63 | -3.3% | 0 → 0 |
BenchmarkStoreHLLAdd |
74 → 72 | -1.6% | 0 → 0 |
BenchmarkStoreHSet |
7526 → 7413 | -1.5% | 3 → 3 |
BenchmarkStoreJsonSet |
16282 → 15638 | -4.0% | 207 → 207 |
BenchmarkStorePut |
184 → 194 | +5.4% | 2 → 2 |
BenchmarkStorePutParallel |
213 → 211 | -1.0% | 2 → 2 |
BenchmarkStoreSetAdd |
6689 → 6844 | +2.3% | 2 → 2 |
BenchmarkStoreSetContainsHit |
62 → 62 | +0.3% | 0 → 0 |
BenchmarkStoreSetContainsMiss |
62 → 61 | -3.0% | 0 → 0 |
BenchmarkStoreTopKAdd |
582 → 592 | +1.8% | 20 → 20 |
BenchmarkStoreVAdd |
62114 → 63734 | +2.6% | 515 → 515 |
BenchmarkStoreVSim |
53377 → 54193 | +1.5% | 530 → 530 |
BenchmarkStoreZAdd |
6676 → 6871 | +2.9% | 2 → 2 |
BenchmarkStoreZScoreHit |
62 → 65 | +3.7% | 0 → 0 |
BenchmarkStoreZScoreMiss |
64 → 64 | -0.4% | 0 → 0 |
Posted by CI bench job. Not a merge gate.
This reverts commit cf1d027.
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
Official Python and Node clients for the existing Cache gRPC port. No server, proto, or data-path change.
clients/python(supercache, sync, Python 3.11+) andclients/node(@code0987/supercache, Promises, Node 22+). Not published.clients/conformanceis the Go engine plus Cache gRPC server the language tests dial.clients-up-to-dateregenerates stubs fromapi/proto/cache.protoand fails on diff, thenscripts/check-client-surface.pyfails unless every Cache RPC has a Python method, a Node method, and a mention indocs/API.md.Design: docs/design/2026-10-08-polyglot-clients.md
Product docs:
README.md,docs/API.md,PLAN.md§3, both client READMEs. No OpenAPI orschelp change. No public RPC was added.Release
--- / release: vX.Y.Z / ---)[release: vX.Y.Z]v..__Test plan
go test ./...pytest clients/python/testsnpm testinclients/nodepython3 scripts/check-client-surface.pyclients-up-to-dateandclientsNotes for reviewers
Bench risk: none on the hot path. Get-hit allocs should stay flat. Local bench was not re-run because
pkg/engineandpkg/storeare unchanged.Do not dial the peer port from these clients.