Skip to content

Queries reading from the same read model are laid out as a chain #6

Description

@goloroden

Found while modeling a real domain in ESDM and browsing it with the visualizer.

When several queries reference the same read model, they are stacked in a single column directly below one another, and the reads edges are routed through the boxes. The result reads as a sequence, as if one query fed the next, although each query hangs off the read model independently.

The edge data is correct. In a context with one read model named to-dos and six queries, the DOM contains six separate edges, all originating at the read model:

todos__to-dos__reads__todos__pending-to-dos
todos__to-dos__reads__todos__completed-to-dos
todos__to-dos__reads__todos__discarded-to-dos
todos__to-dos__reads__todos__pending-to-do
todos__to-dos__reads__todos__completed-to-do
todos__to-dos__reads__todos__discarded-to-do

Only the layout suggests otherwise.

Suggestion

Spread queries horizontally the way commands and events already are, so that siblings look like siblings. As a side effect the board also stops growing very tall as soon as a read model serves more than two or three queries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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