Skip to content
Ameen Abozaid
Planned lessonMID-022-L04

Read models and CQRS-lite

  • Lesson 4 of 5
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

serve queries from a dedicated read model inside one service.

Planned topics

  • CQRS-lite: separate the write model (entities, rules) from a read model (tables or views shaped for queries), in the same service and database.
  • Update the read model in the same transaction, or from domain events after commit, or by periodic refresh.
  • Choose by staleness tolerance: same transaction is consistent; events are eventually consistent.
  • No event sourcing and no separate database is needed for simple cases.
  • Include a rebuild path: recompute the read model from the write tables.
Draft outline details

Demonstration

a diagram: POST /orders writes orders and publishes OrderPlaced; a listener updates dashboard_daily(day, orders, revenue); GET /admin/dashboard reads only that table.

Check your understanding

Does CQRS-lite require event sourcing?

Show answer

No.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.