query

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Connect-RPC query server for the recently-interacted-topk example.

Serves GetWindow / GetWindowMany / GetRange against the same DynamoDB row both writers (Lambda + ECS Kafka worker) merge into. The byte-encoded Misra-Gries summary is returned verbatim; clients decode via the pkg/monoid/sketch/topk package's Decode helper, or via the embedded admin UI which renders the sketch's items + counts directly.

This server configures daily windowing, so Get / GetMany are rejected with FAILED_PRECONDITION: they read the all-time row at bucket 0, which the windowed writers never populate, and an empty answer there is indistinguishable from a genuinely idle pipeline.

Run locally:

export DDB_ENDPOINT=http://localhost:8000
go run ./examples/recently-interacted-topk/cmd/query

Then call it:

# top entities over the last 24 hours
grpcurl -plaintext -d '{"entity":"global","duration_seconds":86400}' \
    localhost:50051 murmur.v1.QueryService/GetWindow
# top entities over the last 7 days
grpcurl -plaintext -d '{"entity":"global","duration_seconds":604800}' \
    localhost:50051 murmur.v1.QueryService/GetWindow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL