Skip to content
0:00 / 0:00

#cqrs#eventsourcing#clojure

"Commander: Better Distributed Applications through CQRS and Event Sourcing" by Bobby Calderwood

Strange Loop Conference

88K subscribers • 114 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2020 to 2025.
  • Presented by Bobby Calderwood

Intermediate. Assumes working knowledge.

18K views10 years ago2 recommendations

Distributed systemsSoftware designSoftware architectureEvent-driven systems and messaging

Bobby Calderwood presents the Commander pattern, decoupling reads and writes in distributed applications using Clojure and event sourcing.

Have you ever hit a wall with REST? Does modeling your problem domain into CRUD-able entities feel like fitting a square peg into a round hole? Perhaps instead of modeling our services like little databases, we should instead model them like reactors over immutable event streams. REST APIs are great, but their typical implementation tightly couples various concerns that would be better separated: * Reads (perception) with writes (action) * Current state with historical narrative * Business logic with HTTP request processing, and with operational concerns like metrics and monitoring Commander is: * A pattern for writing distributed applications that de-couples these concerns using ideas from CQRS and Event Sourcing, thereby alleviating common frustrations with CRUD-flavored REST * An implementation of the core component in this pattern using Clojure in the HTTP layer, using Java with the new Kafka Streams library in the event stream processing layer, and using Datomic for persistence. The Commander pattern imposes a clear separation of action from perception, and uses immutable values conveyed by Kafka and the Kafka Streams library to separate business logic from HTTP request processing, all while preserving the historical narrative of the entire event stream. In this talk, I'll discuss the benefits and tradeoffs of applying this pattern in an enterprise context, and demonstrate my implementation under load.

Why it's here

2 people recommend this

What people say. Recommended for its holistic approach to separating concerns and decoupling action and perception in distributed systems.

u/petemakin r/Clojure • Recommends

On “Open Source Clojure applications using components with channels for messaging”

I've struggled with this too. Have you watched Bobby Calderwood's talk about "Distributed Applications through CQRS and Event Sourcing"? He describes the **Commander Pattern** which aims at separating concerns and decoupling action and perception. It's perhaps a more holistic approach that separation of components.

u/Apprehensive_Lie797in r/Clojure • Recommends

On “Event-sourcing with projections in Clojure and PostgreSQL”

Haven’t watched yet but reminded me of a good related talk from back in the day link to this video