Example: full app with Postgres store (multi-instance cluster, no NATS) #28

Open
opened 2026-02-19 22:28:39 +00:00 by ash · 0 comments
Owner

What

Complete working example app using Postgres store with clustering support. Multiple instances, no NATS.

Must Demonstrate

  • All 3 event modeling patterns
  • Single writer via pg_advisory_lock (distributed)
  • LISTEN/NOTIFY for real-time subscriptions
  • Competing projections (multiple instances, each event processed once)
  • OCC with gap handling
  • Multi-instance: run 3 copies, they coordinate via Postgres
  • Graceful shutdown + rebalancing
  • Connection pooling
  • Schema migration on startup
  • HTTP API + SSE live updates

Deployment

  • docker-compose with Postgres + 3 app instances
  • Or just go run main.go x3 pointing at same Postgres

Why

This is the "production without NATS" example. Many teams have Postgres and nothing else.

## What Complete working example app using Postgres store with clustering support. Multiple instances, no NATS. ## Must Demonstrate - All 3 event modeling patterns - Single writer via pg_advisory_lock (distributed) - LISTEN/NOTIFY for real-time subscriptions - Competing projections (multiple instances, each event processed once) - OCC with gap handling - Multi-instance: run 3 copies, they coordinate via Postgres - Graceful shutdown + rebalancing - Connection pooling - Schema migration on startup - HTTP API + SSE live updates ## Deployment - docker-compose with Postgres + 3 app instances - Or just `go run main.go` x3 pointing at same Postgres ## Why This is the "production without NATS" example. Many teams have Postgres and nothing else.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#28
No description provided.