Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Implementing a Saga in .NET: Persisted State Machines, Timeouts, and Compensation
To make a saga reliable in .NET you store its state in a table found by correlation id and guarded by a concurrency token, leave the decision to a pure switch expression over (step, message) pairs, write commands to an outbox in the same transaction, and give every waiting step a timeout tied to that step. A lost payment reply, a timeout race, a late payment and a failed refund with EF Core and SQLite and real output; the same saga in MassTransit 8 and Wolverine, with license notes.
Slices with a Mediator: Comparing MediatR, Source-Generated Mediator, and Wolverine
The real gain of a mediator in slices is a pipeline that is independent of the entry point; as of November 2026 MediatR 14.3 is RPL 1.5 or commercially licensed, while Mediator 3.0.2 and Wolverine 6.62 are MIT. We write the same PlaceOrder slice with all three tools and with a mediator-free endpoint filter, and compare dispatch cost, first-request time, Native AOT behaviour, and each tool's real setup pitfalls.