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
  1. RECQ Patterns
  2. RECQ Communication Pattern

Component to System State Store

Synchronous Event Posting

PreviousComponent to ComponentNextSystem State Store to Component

Last updated 1 year ago

In a RECQ architecture, components interact with the System State Store (SSS) in a specific manner for managing state changes. This interaction follows a request/response pattern with a synchronous protocol managed by the SSS itself.

Communication Protocol:

  • Synchronous Event Posting: Unlike the asynchronous communication used for component-to-component interaction, posting a state change event to the SSS is a synchronous operation.

    • Components send a request message directly to the SSS containing the event data representing the desired state change.

    • The SSS validates the event and attempts to persist it in its storage mechanism.

    • Upon successful persistence, the SSS sends a response message back to the component, confirming the success or failure of the operation.

    • The synchronous nature ensures the component receives confirmation before proceeding with further actions that might depend on the state change.

Benefits of Synchronous Event Posting:

  • Strong Consistency: Synchronous event posting guarantees that the event is successfully persisted in the SSS before the component receives a confirmation. This ensures strong consistency between the component's view of the state and the actual state stored in the SSS.

  • Simplified Error Handling: The component receives immediate feedback on the success or failure of the event posting, allowing for easier error handling and potential retries if necessary.

Considerations:

  • Reduced Scalability: Synchronous communication can introduce bottlenecks if a large number of components frequently update the state. This might require careful configuration and optimization of the SSS to handle high volumes of event posting requests.

  • Potential Latency: If components rely heavily on immediate confirmation, synchronous event posting can introduce slight latency compared to asynchronous approaches.

Conclusion:

The RECQ architecture utilizes a synchronous request/response pattern for component-to-SSS communication when posting state change events. This approach guarantees strong consistency and simplifies error handling, but it's important to consider potential scalability and latency impacts for high-volume systems. The specific communication strategy might be adjusted based on the application's specific needs and performance requirements.