-
Notifications
You must be signed in to change notification settings - Fork 0
Agent Overview
An Agent represents a logical unit of value in terms of either a business or technical concern.
Euclid provides frameworks to support agent design in the following architectural styles.
- Basic CQRS -- Command processors persist command payloads as read models. Read models are persisted into repositories.
- Basic Event Sourcing -- Denormalizers transform event payloads into read models. Events take the place of commands entirely in this style. Read models are persisted by the event sourcing framework.
- CQRS/DDD -- Aggregate roots apply commands to themselves which modify their current state and persist it to read models. Aggregate roots and read models are both persisted into repositories. Persisted aggregate roots make up the domain model store, which can be fully normalized and used for reporting. When an aggregate root is modified, it is denormalized into a read model store.
- CQRS/DDD/ES -- Aggregate roots apply commands to themselves which modify their current state and publish it via events which are denormalized into read models. Aggregate roots are persisted into repositories. Read models are persisted by the event sourcing framework. As with CQRS/DDD, the persisted aggregate roots make up the domain model store, which can be fully normalized and used for reporting.
Depending on the specific need it is being developed to meet, an Agent consists of one or more of the following parts.
Read models define the schema of the data under management by the Agent. Read models should map as closely as possible to particular screens in a composite. For a general purpose Agent that is intended to be reused by multiple composites, the read models should still seek to map directly to composite views as far as it is reasonable to do.
Queries represent requests for specific read models. In order to encourage scalable and highly performing systems, a composite should issue as few queries as possible in the process of rendering a view.
Commands are generally published by a composite in response to user input. This can take the shape of forms which have been filled out and submitted, button clicks, or any other user generated event. For some Agents, commands can be published from other Agents or have other non-user origins.