Damian Garstecki

Ddd

Cover image for Getting Free Outbox with Spring Modulith
4 min read

Getting Free Outbox with Spring Modulith

Why even bother with an outbox for internal events? Early in the app lifecycle you can get away with one big transaction: change domain state, flush, all or nothing is committed. Simple. Then growth hits. New features keep adding more into the persistence context. Optimistic locks start colliding. …

spring boot architecture ddd
Cover image for Why using Kotlin data classes as Entities is a bad idea
4 min read

Why using Kotlin data classes as Entities is a bad idea

Kotlin data classes have been an awesome language addition—so good that they inspired Java 14’s record classes. Kotlin data classes are a great choice to create DTOs or Value Objects, but some of their features don’t go hand in hand with JPA entities. Let’s look at why it’s a bad idea to make JPA …

kotlin jpa ddd