Skip to content

Commit 9521ee3

Browse files
committed
Review changes
1 parent 47a6152 commit 9521ee3

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

documentation/modules/ROOT/pages/01-pattern.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ The team saw a https://www.youtube.com/watch?v=Rc5IO6S6ZOk[talk on _Event Mesh_]
88
The talk presented the advantages of moving beyond transactional architectures in favor of eventual consistency.
99
By leveraging event meshes with technologies like Knative, developers can achieve decoupled, reliable microservices without extensive re-engineering.
1010
This solution addresses inefficiencies and aligns distributed systems with real-world business processes.
11-
The team had figured out they could leverage the _CQRS_ pattern together with _Knative's Event Mesh_
11+
The team had figured out they could leverage the https://martinfowler.com/bliki/CQRS.html[_CQRS_] pattern together with _Knative's Event Mesh_
1212
to modernize their application in a non-extrusive way.
1313

1414
== The Solution
1515

16-
The core of this solution is an event mesha dynamic, flexible layer that routes, retries, and processes asynchronous events across distributed components.
16+
The core of this solution is an event mesh -- a dynamic, flexible infrastructure layer that routes, retries, and processes asynchronous events across distributed components.
1717
Using _Knative Eventing_ and _CloudEvents_, this pattern enables:
1818

1919
- *Reliable delivery* of events with retry mechanisms.

documentation/modules/ROOT/pages/02-architecture.adoc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ Based on https://kubernetes.io/[Kubernetes].
2222
** https://www.redhat.com/en/technologies/cloud-computing/openshift/serverless[Red Hat OpenShift Serverless]
2323
— Provides the _Event Mesh_ and _Serverless_ capabilities.
2424
Based on https://knative.dev[Knative] project.
25-
** https://swc.saas.ibm.com/en-us/redhat-marketplace/products/red-hat-amq[Red Hat AMQ Streams]
25+
** https://developers.redhat.com/products/streams-for-apache-kafka[Streams for Apache Kafka]
2626
— (Optional) Provides a persistence for _Event Mesh_, likely needed in production.
2727
Based on https://strimzi.io/[Strimzi] project.
2828
* Other open source technologies:
2929
** https://cloudevents.io/[CloudEvents] — Provides a standard for event metadata
30-
** Rust and https://access.redhat.com/products/quarkus[Quarkus] — Implementation examples.
3130
** https://opentelemetry.io/[OpenTelemetry] — (Optional) Facilitates tracing for observability.
31+
** Rust and Java — Implementation examples.
32+
33+
_Kubernetes_, _Knative_, _Strimzi_, _CloudEvents_, and _OpenTelemetry_ are https://landscape.cncf.io/[CNCF projects].
3234

3335
[#in_depth]
3436
== An in-depth look at the solution's architecture
@@ -44,8 +46,8 @@ Traditional systems often enforce strict transactional consistency, which can im
4446
For instance, upon the completion of a ride-sharing service at the end-user's destination, the system should reliably capture this real-world event.
4547
The capture should be performed regardless of any potential operational disruptions affecting dependent services (e.g., invoicing).
4648

47-
In such scenarios, transactional applications typically return an error, which prevents any data from being changed, and causes the loss of real-world intent of end-users.
48-
This results in an adverse user experience and a deviation from the genuine business process, potentially leading to customer dissatisfaction.
49+
In such scenarios, transactional applications, which typically encompass a number of steps in a user workflow, make all the steps undone when an error is returned.
50+
This prevents any data from being changed, and causes the loss of real-world intent of end-users, and results in an adverse user experience and a deviation from the genuine business process, potentially leading to customer dissatisfaction.
4951

5052
=== Solution Breakdown
5153

@@ -58,13 +60,13 @@ The primary responsibility of the _Event Mesh_ is twofold.
5860
Firstly, it persists the incoming events, thereby maintaining a record of changes in the system's state.
5961
Secondly, it routes these events to their respective endpoints, ensuring that the appropriate microservices are notified and can subsequently update their internal states based on the event data.
6062

61-
The mesh's inherent resilience is further bolstered by its exponential backoff strategy, which it employs when encountering operational failures.
63+
The mesh's inherent resilience is further bolstered by its built-in retry strategies (linear or exponential backoff), which it employs when encountering operational failures.
6264
This mechanism ensures that the system retries the operation until it succeeds, thus mitigating the risk of data loss or system disruption due to transient issues.
6365

6466
By integrating the _Event Mesh_ into the system architecture, several architectural benefits are achieved:
6567

6668
* **Decomposition of the application into independently functioning services**:
67-
This approach facilitates a division of labor, with each service handling specific responsibilities.
69+
This approach facilitates a division of labor, with each service handling specific responsibilities -- the https://en.wikipedia.org/wiki/Domain-driven_design[Domain-driven design] approach fits here quite well.
6870
This not only enhances maintainability but also fosters scalability, as services can be independently scaled based on their demands.
6971

7072
* **Improved business alignment**:
@@ -87,11 +89,11 @@ The event-driven flow enables eventual consistent collaboration and state synchr
8789
A usual flow may look like:
8890

8991
1. An end-user application sends an _HTTP_ request to the _Event Mesh_. Such message can be understood as a _Command_ type event.
90-
2. The _Event Mesh_ (Broker) persists the event in a queue (e.g. Kafka).
92+
2. The _Event Mesh_ (Broker) persists the event in a queue (like an Apache Kafka topic, but the implementation is hidden from the user).
9193
After _Event Mesh_ persists safely the data, it returns a successful _HTTP_ response with the `202 Accepted` return code.
9294
At this point, the operation could already be considered successful, from the end-user point of view.
9395
It will eventually settle correctly in all downstream systems.
94-
3. The _Event Mesh_ routes the event to the appropriate endpoint based on the event's metadata and configured triggering rules.
96+
3. The _Event Mesh_ routes the event to the appropriate endpoint based on the CloudEvent's metadata and configured triggering rules.
9597
4. The endpoints receive the events and process them, updating their internal states and potentially emitting new events for downstream consumers.
9698
The potential events are transmitted to the _Event Mesh_.
9799
5. The dispatch loop continues until the event queue is empty and all the events are processed successfully.
@@ -232,7 +234,7 @@ For instance:
232234
=== Improving Resilience in Applications
233235

234236
Traditional systems often rely on synchronous calls and transactions, which can cascade failures across components.
235-
Replacing these with asynchronous event-driven communication reduces dependencies and makes the system _Eventually Consistent_.
237+
Replacing these with asynchronous event-driven communication reduces dependencies and makes the system https://en.wikipedia.org/wiki/Eventual_consistency[_Eventually Consistent_].
236238

237239
For example, invoicing and notification services in a ride-sharing platform can process events independently, ensuring that downtime in one service does not block the entire workflow.
238240

0 commit comments

Comments
 (0)