v3.4.0: Cached Market Read Models
Summary
This release tightens SocialPredict's display read-model behavior after mixed load testing showed pressure on cached/read endpoints during concurrent hot-market betting.
Highlights
- Market summary reads now use stored accounting snapshots instead of recalculating full market details on every request.
- Market discovery cards and pinned market responses prefer cached summary read models.
- Existing stale display snapshots are served for market positions, market leaderboards, system metrics, and global leaderboard instead of refreshing synchronously on the request path.
- Transaction paths remain unchanged; these caches are display-only and are not used to decide orders, balances, payouts, or other authoritative financial mutations.
- Added backend tests proving stale read models are served without synchronous refresh and that summary endpoints avoid full detail recomputation.
Load Testing Context
This release follows the June 10/11 mixed site-load tests, where read traffic was combined with hot-market betting. The next recommended validation is to redeploy this tag and rerun the reduced mixed baseline first, then ladder upward:
10bets/sec plus50read-model reads/sec for5m15bets/sec plus100read-model reads/sec for5m20bets/sec plus150read-model reads/sec for5m- Retry
25bets/sec plus250read-model reads/sec only after intermediate runs are clean
Testing
go test ./handlers/markets ./handlers/positions ./handlers/metrics ./internal/domain/marketsgo test ./...