Evento Framework
  • Introduction
  • Architecture Overview
    • Distributed Systems & Microservices
    • Recative Manifesto & Reactive Principles
    • State-of-the-art Patterns
      • DDD (Domain Driven Design)
      • CQRS (Command Query Responsability Separation)
      • Event Sourcing
      • Messaging
      • Saga
  • GETTING STARTED
    • Quick Start
    • TodoList - RECQ Tutorial
      • Problem Description and Requirement Gathering
      • RECQ Payload Design
      • RECQ Components Design
      • Set up your Development Environment
      • RECQ Payload Evento Implementation
        • Domain Commands
        • Domain Events
        • Views
        • Queries
      • RECQ Components Evento Implementation with Spring Data
        • TodoListAggregate
        • TodoList Model with Spring Data
        • TodoListProjector
        • TodoListProjection
        • TodoList Invoker
      • Expose the RECQ architecture with Spring Web
      • Test Your App
    • Extend TodoList - Handle Complexity Tutorial
      • Unique identifier generation
      • Extends behaviors with Observer and Services
      • Cross Domain Consistency with Sagas
      • Handle Real time data updates with MQTT and Save-Notify Pattern
  • RECQ Patterns
    • RECQ Patterns
    • RECQ System Pattern
      • Component
      • Message Gateway
      • System State Store
    • RECQ Communication Pattern
      • Component to Component
      • Component to System State Store
      • System State Store to Component
    • RECQ Component Pattern
      • Aggregate
      • Projector
      • Projection
      • Service
      • Invoker
      • Saga
      • Observer
  • Evento Framework
    • Evento Framework Introcution
    • Payload and Messages
      • Command
        • Domain Command
        • Service Command
      • Event
        • Domain and Service Event
      • Query and View
    • @Component
      • @Aggregate
        • Aggregate State
        • @AggregateCommandHandler
        • @EventSourcingHandler
      • @Projector
        • Projector @EventHandler
      • @Projection
        • @QueryHandler
      • @Service
        • @CommandHandler
      • @Invoker
      • @Saga
        • SagaState
        • @SagaEventHandler
      • @Observer
    • Dead Event Queues
    • EventoBundle
      • EventoServerMessageBusConfiguration
      • ConsumerStateStore
        • InMemoryConsumerStateStore
        • PostgresConsumerStateStore
        • MysqlConsumerStateStore
      • Context
      • TracingAgend and @Track
        • SentryTracingAgent
      • Autoscaling Protocol
        • ThreadCountAutoscalingProtocol
      • Injector and @Component
  • Evento Server
    • Evento Server Introduction
    • SetUp Evento Server
      • Advanced Options
      • Evento Event Store Modes: APES and CPES
    • Evento Server Cluster
    • Bundle Deploy Script
  • EVENTO GUI
    • Explore RECQ Systems Visually
    • GUI Auth
    • Payload Catalog
    • Component Catalog
    • Bundle Catalog
    • Cluster Status (Experimental)
    • Flows
      • Performance Evaluation
    • Application Graph
    • System State Store
  • Evento CLI
    • Evento CLI Introduction
    • Update Version
    • Publish
Powered by GitBook
On this page
  • Aggregate
  • Projector
  • Projection
  • Invoker
  • Service, Saga and Observer
  • Final Architecture
  1. GETTING STARTED
  2. TodoList - RECQ Tutorial

RECQ Components Design

Define your micorservices architecture structure.

PreviousRECQ Payload DesignNextSet up your Development Environment

Last updated 1 year ago

Now that you have defined all the Messages you need to identify the components handling those messages.

We need to choose between:

  • Aggregate

  • Projector

  • Projection

  • Invoker

  • Service

  • Saga

  • Observer

Let's start from the Domain logic handling aspects of the application, we have previously individuated the TodoList domain composed of the TodoList, Todo and User entities.

The component and also the pattern used to manage Domain Change Request is Aggregate which collect a group of entities in a Tree Relational Structure with a root representing the Consistency Constraint Boundaries and branches or leaves representing functional depending entities. A TodoListAggregate is needed to handle TodoListCreateCommands, TodoListDeleteCommand, TodoListAddTodoCommand, TodoListRemoveTodoCommand, TodoListCheckTodoCommand and produce the related events to communicate to the entire system that the state is changed.

Data changes must be materialized in some way, to create a database representing a practical and queryable system state we need to use a projector that handles Domain Events and writes changes inside a Repository. A TodoListProjector is needed to handle TodoListCreatedEvents, TodoListDeleteEvents, TodoListTodoAddedEvent, TodoListTosoRemovedEvent, TodoListTodoCheckedEvent and materialize the changes.

Then we need to access the system state and make queries to receive views, so we require a TodoListProjection to handle TodoListListItemViewFindAllQueries returning a collection of TodoListListItemView and TodoListViewFindByIdentifierQueries returning a TodoListView.

In the end, we need a way to forge Commands and Queries accessible from the outside of a RECQ Architecture. To do this we need an invoker that exposes all the functions and implements logic (the Service Layer of the Layered Architecture). So we are gonna to define a TodoListInvoker generating payloads for every single TodoList-related command and query.

In this tutorial we do not need to handle cross-domain logic or do particular behaviour extensions, we will dedicate a specific tutorial to handle complex scenarios in RECQ Architectures. Extend TodoList - Handle Complexity Tutorial

Final Architecture

, and

Projector
Projection
Invoker
Service
Saga
Observer
Aggregate
TodoList Aggregate (Pattern View)
TodoList Aggregate Handlers
TodoList Projector Handlers (igonre the ErpUserActivityRegisteredEvent will be added in the next tutorial)
TodoList Projection Handlers
TodoList Invoker handlers
TodoList RECQ Architecture