~/talk

Traversals and Scans and CQRS, oh my!

Talkat Scalapeño 2018 · on Monday, 2018-07-02· [microservices, functional-programming]
slides:none on file

Shows a concrete reservation-service implementation that uses Cats types to validate commands, emit events and update state: validations return Either, events are accumulated with StateT and WriterT, and a list of events plus new state is persisted as snapshots and event appends. Command streams are handled with fs2 mapAccumulate to thread state; persistence runs in evalMap. WriterT allocation becomes a bottleneck in practice, so the recommended optimization is finally tagless for better performance and easier interpretation.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15Understanding CQRS
  3. 2:38Problems with typical architecture
  4. 6:00The event-based approach
  5. 8:24Behavior-driven design
  6. 10:41Benefits of CQRS
  7. 12:08Implementation plan
  8. 14:19Validating commands
  9. 17:04Stateful validation
  10. 19:25Applicative combinators
  11. 21:34Generating events
  12. 25:40WriterT for logging
  13. 27:14State mutation
  14. 30:57StateT for state management
  15. 34:09Streaming commands
  16. 37:33Conclusion and resources
~/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.