How sushilkshetri/final-project-stateful-serverless works
This repository is a serverless comparison project: it implements a single-owner, in-memory object model alongside a Lambda-and-DynamoDB baseline, then benchmarks both on counters, contested bookings, chat broadcasts, and scale/cost. Shared rules are intended to keep the comparison consistent. The README documents the major interactions, but many sampled Go entry points and helpers are TODOs, so the graph represents documented design rather than verified runtime behavior; edges cite the README or the relevant excerpt where available.
Main entry points: stateless/cmd Stateless Lambdas · stateful/cmd Stateful Lambdas · counter.py Counter workload · booking.py Booking workload
Components 22
Shared domain rules
- Domain rules
shared - Booking rules
shared/booking.go - Counter rules
shared/counter.go - Chat message types
shared/chat.go
Stateful system
- Stateful Lambdas
stateful/cmd - Object client
stateful/client/objectclient.go - Owner node
stateful/cmd/owner/main.go - HTTP and WebSocket server
stateful/owner/server.go - Owner runtime
stateful/owner - Stateful objects
stateful/objects - Object persistence
stateful/owner/storage.go
Stateless baseline
- Stateless Lambdas
stateless/cmd - DynamoDB access
stateless/db/client.go - Connections table
stateless
Benchmark workloads
- Counter workload
loadtest/http/scenarios/counter.py - Booking workload
loadtest/http/scenarios/booking.py - Scale and cost workload
loadtest/http/scenarios/many_objects.py - Chat benchmark
loadtest/chat/main.go - Chat room workload
experiments/configs/03-chat.yaml
Other components
- Workload users
- DynamoDB
- API Gateway WebSockets
Connections 28
- Workload users → Counter workload: runs
README.md - Workload users → Booking workload: runs
README.md - Workload users → Scale and cost workload: runs
README.md - Workload users → Chat benchmark: runs
README.md - Counter workload → Stateful Lambdas: exercises
- Counter workload → Stateless Lambdas: exercises
- Booking workload → Stateful Lambdas: exercises
- Booking workload → Stateless Lambdas: exercises
- Scale and cost workload → Stateful Lambdas: exercises
- Scale and cost workload → Stateless Lambdas: exercises
- Chat benchmark → Chat room workload: measures
- Stateful Lambdas → Domain rules: uses same rules
README.md - Stateless Lambdas → Domain rules: uses same rules
README.md - Stateful Lambdas → Object client: calls object
stateful/client/objectclient.go - Object client → Owner node: locates and calls
stateful/client/objectclient.go - Owner node → HTTP and WebSocket server: starts server
stateful/cmd/owner/main.go - HTTP and WebSocket server → Owner runtime: receives calls
stateful/owner/server.go - Owner runtime → Stateful objects: handles serially
README.md - Stateful objects → Object persistence: persists state
- Stateless Lambdas → DynamoDB access: accesses data
stateless/db/client.go - DynamoDB access → DynamoDB: reads and writes
README.md - Stateless Lambdas → API Gateway WebSockets: serves chat
README.md - Stateless Lambdas → Connections table: stores connection IDs
README.md - Stateful Lambdas → Booking rules: uses booking logic
- Stateful Lambdas → Counter rules: uses counter logic
- Stateless Lambdas → Booking rules: uses booking logic
- Stateless Lambdas → Counter rules: uses counter logic
- Stateless Lambdas → Chat message types: uses message format