~/talk

DDD and FSM: tackling complexity with state machines

Talkat Conf42 Golang 2021 · on Thursday, 2021-06-24· [software-architecture, distributed-systems]
slides:none on file

Moves a managed Kubernetes cluster creation from a brittle three-step Kafka pipeline into per-domain FSMs that store each entity state in Postgres and drive transitions with Kafka events, using an outbox pattern to avoid async inconsistencies and a DB root lock to prevent races. Node creation is split into four distinct states (VM, OS, config, run); example cluster has 3 masters and 5 workers in 2 groups. Implementation uses long switch cases implemented in Go and fits CQRS/hexagonal services, and it proves resilient in production.

AI-written summary · about

  1. 0:00DDD and FSM introduction
  2. 1:20Finite state machines
  3. 2:03Managed Kubernetes service
  4. 3:05Fault-tolerant pipeline refactor
  5. 4:11DDD for cluster logic
  6. 5:36Parallel operations with aggregates
  7. 6:40Worker node complexity
  8. 7:23Node lifecycle state machine
  9. 8:47Error handling in state machines
  10. 9:50State tracking in aggregates
  11. 10:11Event propagation in cluster
  12. 11:57Error propagation in state machines
  13. 13:24Technical challenges
  14. 14:29Race conditions and locks
  15. 14:51Messaging inconsistency
  16. 16:15Batch operations
  17. 17:18State-matched error processing
  18. 19:03Current implementation
  19. 20:26Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.