worker

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Streaming worker for the page-view-counters example.

Reads page-view events from Kafka, aggregates daily-bucketed counts per page-ID into DynamoDB, and (optionally) write-throughs to a Valkey cache.

In production this binary runs as an ECS Fargate service. Locally:

docker compose up -d kafka dynamodb-local valkey
aws --endpoint-url=http://localhost:8000 dynamodb create-table \
    --table-name page_views \
    --attribute-definitions AttributeName=pk,AttributeType=S AttributeName=sk,AttributeType=N \
    --key-schema AttributeName=pk,KeyType=HASH AttributeName=sk,KeyType=RANGE \
    --billing-mode PAY_PER_REQUEST
export DDB_LOCAL_ENDPOINT=http://localhost:8000
export VALKEY_ADDRESS=localhost:6379
export KAFKA_BROKERS=localhost:9092
go run ./examples/page-view-counters/cmd/worker

Jump to

Keyboard shortcuts

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