読み取りモデルとは?
読み取りモデルとは、どのようにクエリされユーザーに表示されるかに合わせて特に形作られた、アプリケーションデータのプロジェクションです。通常は非正規化されており、1つの画面を単一の高速なルックアップで提供できます。それ自体でビジネスルールを強制するのではなく、書き込みモデルやドメインイベントから再構築または更新されます。
なぜ重要か
読み取りモデルをクエリのパターンに合わせて調整することで、ホットパスから高コストな結合や集計を取り除けます。読み取り側を書き込み側から独立してスケールさせられます。
関連ガイド
What Is a Write Model?A write model is the domain representation focused on enforcing business rules and consistency when state cha…
What Is a Query Handler?A query handler is the component that answers a read request by fetching and shaping data, without changing a…
What Is CQRS?CQRS separates the model used to change data from the model used to read it, letting writes and reads be desi…