Cronus Documentation
  • Introduction
  • Getting Started
    • Quick Start
      • Setup
      • Persist First Event
      • Explore Projections
  • Cronus Framework
    • Concepts
      • Domain Driven Design
      • Event Sourcing
      • Command Query Responsibility Segregation
    • Domain Modeling
      • Bounded Context
      • Multitenancy
      • Aggregate
      • Entity
      • Value Object
      • IDs
      • Published Language
      • Messages
        • Commands
        • Events
        • Public Events
        • Signals
      • Handlers
        • Application Services
        • Sagas
        • Projections
        • Ports
        • Triggers
        • Gateways
    • Event Store
      • EventStore Player
      • Migrations
        • Copy EventStore
    • Workflows
    • Indices
    • Jobs
    • Cluster
    • Messaging
      • Serialization
    • Configuration
    • Unit testing
Powered by GitBook
On this page
  • Communication Guide Table
  • Best Practices

Was this helpful?

Export as PDF
  1. Cronus Framework
  2. Domain Modeling
  3. Handlers

Gateways

PreviousTriggersNextEvent Store

Last updated 2 years ago

Was this helpful?

Compared to a Port, which can dispatch a command, a Gateway can do the same but it also has a persistent state. A scenario could be sending commands to external BC, such as push notifications, emails, etc. There is no need to event source this state and it's perfectly fine if this state is wiped. Example: iOS push notifications badge. This state should be used only for infrastructure needs and never for business cases. Compared to Projection, which tracks events, projects their data, and is not allowed to send any commands at all, a Gateway can store and track metadata required by external systems. Furthermore, Gateways are restricted and not touched when events are replayed.

Communication Guide Table

Triggered by

Description

Event

Domain events represent business changes which have already happened

Best Practices

You can/should/must...

  • a gateway can send new commands

https://github.com/Elders/Cronus/issues/260