書き込みモデルとは?
書き込みモデルとは、ドメインの不変条件を保護しながら変更を検証し適用することを担うシステムの部分です。高速な読み取りのために調整されるのではなく、正規化されルール中心です。CQRSでは、それが生み出す変更から導出される1つ以上の読み取りモデルと組み合わされます。
なぜ重要か
一貫性のルールを書き込みモデルに集中させることで、正しさを1か所に保てます。書き込みの整合性を損なうことなく、読み取りモデルをパフォーマンスのために作り変える自由が得られます。
関連ガイド
What Is a Read Model?A read model is a data representation optimized for queries and display, often denormalized and kept separate…
What Is a Command Handler?A command handler is the component that receives a command requesting a change, validates it, and executes th…
What Is an Aggregate Root?An aggregate root is the single entity through which all access to a cluster of related domain objects flows,…