Skip to main content
Async Method Invocation

Intent

Asynchronous method invocation is a pattern where the calling thread is not blocked while waiting results of tasks. The pattern provides parallel processing of multiple independent tasks and retrieving the results via callbacks or waiting until everything is done.

Also known as


iluwatarAbout 3 minConcurrencyAsynchronousReactiveScalability
CQRS

Intent

Command Query Responsibility Segregation (CQRS) aims to segregate the operations that modify the state of an application (commands) from the operations that read the state (queries). This separation allows for more flexible and optimized designs, especially in complex systems.


iluwatarAbout 2 minArchitecturalEvent-drivenPerformanceScalability
Event-Based Asynchronous

Also known as

  • Asynchronous Event Handling

Intent

The Event-Based Asynchronous pattern allows a system to handle tasks that might take some time to complete without blocking the execution of the program. It enables better resource utilization by freeing up a thread that would otherwise be blocked waiting for the task to complete.


iluwatarAbout 3 minConcurrencyAsynchronousDecouplingEvent-drivenFault toleranceMessagingReactiveScalability
Event-Driven Architecture

Also known as

  • Event-Driven System
  • Event-Based Architecture

Intent

Event-Driven Architecture (EDA) is designed to orchestrate behavior around the production, detection, consumption of, and reaction to events. This architecture enables highly decoupled, scalable, and dynamic interconnections between event producers and consumers.


iluwatarAbout 3 minArchitecturalAsynchronousDecouplingEnterprise patternsEvent-drivenMessagingPublish/subscribeReactiveScalability
Event Queue

Also known as

  • Event Stream
  • Message Queue

Intent

The Event Queue pattern is designed to manage tasks in an asynchronous manner, allowing applications to handle operations without blocking user interactions or other processes.

Event Queue Visualised

iluwatarAbout 3 minConcurrencyAsynchronousDecouplingMessagingEvent-drivenScalability
Event Sourcing

Also known as

  • Event Logging
  • Event Streaming

Intent

Event Sourcing is a design pattern that advocates for the storage of state changes as a sequence of events. Instead of updating a record in a database, all changes are stored as individual events which, when replayed, can recreate the state of an application at any point in time.


iluwatarAbout 3 minArchitecturalDecouplingEvent-drivenFault toleranceMessagingPersistenceScalabilityTransactions
Fan-Out/Fan-In

Also known as

  • Scatter-Gather

Intent

The Fan-Out/Fan-In pattern aims to improve concurrency and optimize processing time by dividing a task into multiple sub-tasks that can be processed in parallel (fan-out) and then combining the results of these sub-tasks into a single outcome (fan-in).


iluwatarAbout 3 minConcurrencyAsynchronousData processingDecouplingScalability
Feature Toggle

Also known as

  • Feature Flag
  • Feature Switch

Intent

A technique used in software development to control and manage the rollout of specific features or functionality in a program without changing the code. It can act as an on/off switch for features depending on the status or properties of other values in the program. This is similar to A/B testing, where features are rolled out based on properties such as location or device. Implementing this design pattern can increase code complexity, and it is important to remember to remove redundant code if this design pattern is being used to phase out a system or feature.


iluwatarAbout 2 minBehavioralDecouplingExtensibilityFeature managementScalability