Skip to content

How to ensure UI is consistent when read models are updated asynchronously? #34

@nartamonov

Description

@nartamonov

@alexeyzimarev Really greal book, maybe the best book about event sourcing at present!

One question: what is your preferred way to ensure UI is consistent after executing a command that triggers async update to read model?

For example, we have single page application for task management. An user opens some task. The frontend query the backend and retrieves the task attributes from the corresponding read model. The user then presses "Close" button, which executes the command to close the task. As a result of the closure, the read model is updated asynchronously (the status of the task goes to "Closed" or to some other status, depending on the business logic of closing the task, the frontend knows nothing about it). After successfully running the command, the frontend reads the model again. How can we ensure that the read model is updated by then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions