You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The talk presented the advantages of moving beyond transactional architectures in favor of eventual consistency.
157
157
By leveraging event meshes with technologies like Knative, developers can achieve decoupled, reliable microservices without extensive re-engineering.
158
158
This solution addresses inefficiencies and aligns distributed systems with real-world business processes.
159
-
The team had figured out they could leverage the <em>CQRS</em> pattern together with <em>Knative’s Event Mesh</em>
159
+
The team had figured out they could leverage the <ahref="https://martinfowler.com/bliki/CQRS.html"><em>CQRS</em></a> pattern together with <em>Knative’s Event Mesh</em>
160
160
to modernize their application in a non-extrusive way.</p>
<p>The core of this solution is an event mesh—a dynamic, flexible layer that routes, retries, and processes asynchronous events across distributed components.
168
+
<p>The core of this solution is an event mesh — a dynamic, flexible infrastructure layer that routes, retries, and processes asynchronous events across distributed components.
169
169
Using <em>Knative Eventing</em> and <em>CloudEvents</em>, this pattern enables:</p>
Copy file name to clipboardExpand all lines: pull-1/solution-pattern-event-mesh-for-microservices/02-architecture.html
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ <h2 id="tech_stack"><a class="anchor" href="#tech_stack"></a><a class="link" hre
185
185
Based on <ahref="https://knative.dev">Knative</a> project.</p>
186
186
</li>
187
187
<li>
188
-
<p><ahref="https://swc.saas.ibm.com/en-us/redhat-marketplace/products/red-hat-amq">Red Hat AMQ Streams</a>
188
+
<p><ahref="https://developers.redhat.com/products/streams-for-apache-kafka">Streams for Apache Kafka</a>
189
189
— (Optional) Provides a persistence for <em>Event Mesh</em>, likely needed in production.
190
190
Based on <ahref="https://strimzi.io/">Strimzi</a> project.</p>
191
191
</li>
@@ -200,16 +200,19 @@ <h2 id="tech_stack"><a class="anchor" href="#tech_stack"></a><a class="link" hre
200
200
<p><ahref="https://cloudevents.io/">CloudEvents</a> — Provides a standard for event metadata</p>
201
201
</li>
202
202
<li>
203
-
<p>Rust and <ahref="https://access.redhat.com/products/quarkus">Quarkus</a> — Implementation examples.</p>
203
+
<p><ahref="https://opentelemetry.io/">OpenTelemetry</a> — (Optional) Facilitates tracing for observability.</p>
204
204
</li>
205
205
<li>
206
-
<p><ahref="https://opentelemetry.io/">OpenTelemetry</a>— (Optional) Facilitates tracing for observability.</p>
206
+
<p>Rust and Java — Implementation examples.</p>
207
207
</li>
208
208
</ul>
209
209
</div>
210
210
</li>
211
211
</ul>
212
212
</div>
213
+
<divclass="paragraph">
214
+
<p><em>Kubernetes</em>, <em>Knative</em>, <em>Strimzi</em>, <em>CloudEvents</em>, and <em>OpenTelemetry</em> are <ahref="https://landscape.cncf.io/">CNCF projects</a>.</p>
The capture should be performed regardless of any potential operational disruptions affecting dependent services (e.g., invoicing).</p>
230
233
</div>
231
234
<divclass="paragraph">
232
-
<p>In such scenarios, transactional applicationstypically return an error, which prevents any data from being changed, and causes the loss of real-world intent of end-users.
233
-
This results in an adverse user experience and a deviation from the genuine business process, potentially leading to customer dissatisfaction.</p>
235
+
<p>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.
236
+
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.</p>
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.</p>
248
251
</div>
249
252
<divclass="paragraph">
250
-
<p>The mesh’s inherent resilience is further bolstered by its exponential backoff strategy, which it employs when encountering operational failures.
253
+
<p>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.
251
254
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.</p>
<p><strong>Decomposition of the application into independently functioning services</strong>:
260
-
This approach facilitates a division of labor, with each service handling specific responsibilities.
263
+
This approach facilitates a division of labor, with each service handling specific responsibilities — the <ahref="https://en.wikipedia.org/wiki/Domain-driven_design">Domain-driven design</a> approach fits here quite well.
261
264
This not only enhances maintainability but also fosters scalability, as services can be independently scaled based on their demands.</p>
<p>An end-user application sends an <em>HTTP</em> request to the <em>Event Mesh</em>. Such message can be understood as a <em>Command</em> type event.</p>
294
297
</li>
295
298
<li>
296
-
<p>The <em>Event Mesh</em> (Broker) persists the event in a queue (e.g. Kafka).
299
+
<p>The <em>Event Mesh</em> (Broker) persists the event in a queue (like an Apache Kafka topic, but the implementation is hidden from the user).
297
300
After <em>Event Mesh</em> persists safely the data, it returns a successful <em>HTTP</em> response with the <code>202 Accepted</code> return code.
298
301
At this point, the operation could already be considered successful, from the end-user point of view.
299
302
It will eventually settle correctly in all downstream systems.</p>
300
303
</li>
301
304
<li>
302
-
<p>The <em>Event Mesh</em> routes the event to the appropriate endpoint based on the event’s metadata and configured triggering rules.</p>
305
+
<p>The <em>Event Mesh</em> routes the event to the appropriate endpoint based on the CloudEvent’s metadata and configured triggering rules.</p>
303
306
</li>
304
307
<li>
305
308
<p>The endpoints receive the events and process them, updating their internal states and potentially emitting new events for downstream consumers.
<h3id="_improving_resilience_in_applications"><aclass="anchor" href="#_improving_resilience_in_applications"></a><aclass="link" href="#_improving_resilience_in_applications">2.8. Improving Resilience in Applications</a></h3>
489
492
<divclass="paragraph">
490
493
<p>Traditional systems often rely on synchronous calls and transactions, which can cascade failures across components.
491
-
Replacing these with asynchronous event-driven communication reduces dependencies and makes the system <em>Eventually Consistent</em>.</p>
494
+
Replacing these with asynchronous event-driven communication reduces dependencies and makes the system <ahref="https://en.wikipedia.org/wiki/Eventual_consistency"><em>Eventually Consistent</em></a>.</p>
492
495
</div>
493
496
<divclass="paragraph">
494
497
<p>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.</p>
The talk presented the advantages of moving beyond transactional architectures in favor of eventual consistency.
227
227
By leveraging event meshes with technologies like Knative, developers can achieve decoupled, reliable microservices without extensive re-engineering.
228
228
This solution addresses inefficiencies and aligns distributed systems with real-world business processes.
229
-
The team had figured out they could leverage the <em>CQRS</em> pattern together with <em>Knative’s Event Mesh</em>
229
+
The team had figured out they could leverage the <ahref="https://martinfowler.com/bliki/CQRS.html"><em>CQRS</em></a> pattern together with <em>Knative’s Event Mesh</em>
230
230
to modernize their application in a non-extrusive way.</p>
<h2id="_the_solution"><aclass="anchor" href="#_the_solution"></a><aclass="link" href="#_the_solution">3. The Solution</a></h2>
236
236
<divclass="sectionbody">
237
237
<divclass="paragraph">
238
-
<p>The core of this solution is an event mesh—a dynamic, flexible layer that routes, retries, and processes asynchronous events across distributed components.
238
+
<p>The core of this solution is an event mesh — a dynamic, flexible infrastructure layer that routes, retries, and processes asynchronous events across distributed components.
239
239
Using <em>Knative Eventing</em> and <em>CloudEvents</em>, this pattern enables:</p>
0 commit comments