Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions dev-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ runtime:
site:
title: Solution Patterns for Cloud Native Architectures (Dev Mode)
url: http://localhost:3000/
start_page: solution-pattern-template::index.adoc
start_page: solution-pattern-event-mesh-for-microservices::index.adoc

content:
sources:
- url: .
branches: HEAD
start_path: documentation
asciidoc:
attributes:
title: Red Hat Solution Patterns (Dev Mode)
extensions:
- ./lib/remote-include-processor.js
- ./lib/tab-block.js
Expand Down
4 changes: 2 additions & 2 deletions documentation/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: solution-pattern-template
title: Template Tutorial
name: solution-pattern-event-mesh-for-microservices
title: Event Mesh For Applications
version: master
nav:
- modules/ROOT/nav.adoc
Expand Down
29 changes: 27 additions & 2 deletions documentation/modules/ROOT/pages/01-pattern.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
== The story behind this solution pattern

A description of the story that was used to build the demo and architectures of this SP.
Cabs is a fictional transportation company. Engineers at Cabs were struggling
with their transactional-style, monolith application. They recently
started an effort to modernize it.

The team saw a recent https://www.youtube.com/watch?v=Rc5IO6S6ZOk[talk on _Event Mesh_].
The talk presented the advantages of moving beyond transactional architectures
in favor of eventual consistency. By leveraging event meshes with technologies
like Knative, developers can achieve decoupled, reliable microservices without
extensive re-engineering. This solution addresses inefficiencies and aligns
distributed systems with real-world business processes. The team had figured
out they could leverage the _CQRS_ pattern together with _Knative's Event Mesh_
to modernize their application in a non-extrusive way.

== The Solution

This is a summary of the solution
The core of this solution is an event mesh—a dynamic, flexible layer that
routes, retries, and processes asynchronous events across distributed
components. Using _Knative Eventing_ and _CloudEvents_, this pattern enables:

- *Reliable delivery* of events with retry mechanisms.
- Simplified *asynchronous workflows*.
- *Decoupling* of services to improve scalability, testability and resilience.

The approach of Cabs engineering team is to extract well-defined services, using
the _CQRS_ pattern to identify _Commands_ from _Queries_, and model the
_Commands_ as _Events_. Those events will be routed to the _Event Mesh_ with
regular _HTTP_ messages. The _CloudEvents_ library ensures the proper
serialization of the events to and from the _HTTP_ messages. The _Event Mesh_
will handle not only the persistence of the events in-flight, but also all the
required logic of retry in case of endpoint failure.
14 changes: 10 additions & 4 deletions documentation/modules/ROOT/pages/02-architecture.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Solution Pattern: Name Template
= Building Apps around the Event Mesh
:sectnums:
:sectlinks:
:doctype: book
Expand All @@ -7,12 +7,18 @@

Introduction for the architecture of this solution pattern.

== Common Challenges

[#tech_stack]
== Technology Stack

// Change links and text here as you see fit.

The solution employs Command Query Responsibility Segregation (CQRS) to separate commands and queries:

Commands are modeled as asynchronous events and handled by the event mesh.

Queries are synchronous operations safe to retry.



* Red Hat supported products
** https://www.redhat.com/en/technologies/cloud-computing/openshift[Red Hat OpenShift]
** Red Hat Application Foundation
Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/_attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
:experimental:
:source-highlighter: highlightjs
:source-highlighter: highlightjs
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/developer-resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:doctype: book


= Developer Resources
== Developer Resources

* Add link to the git repo of the code
* Add links to whitepapers, ebooks, learning paths, product pages
Expand Down
31 changes: 23 additions & 8 deletions documentation/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
= Solution Patterns: Template Name
= Building Apps around the Event Mesh
:page-layout: home
:sectnums:
:sectlinks:
:doctype: book

A brief introduction of this solution pattern.
Understanding how to structure an application can be challenging. Different
architectural patterns often lack insight into how to build day-to-day solutions
that are often at least as complex as the business they operate in.

_Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum_
This solution pattern is written to make it obvious and to show simple, yet
elegant, correct, and comprehensive way of building software, either in
greenfield or even in legacy projects. This solution leverages the
https://www.redhat.com/en/technologies/cloud-computing/openshift/serverless[Red Hat Serverless]
Eventing component, which implements the https://www.redhat.com/en/topics/integration/what-is-an-event-mesh[Event Mesh] pattern.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this is a more marketing oriented link, we might also point (additionally) to here: https://knative.dev/docs/eventing/event-mesh/


*Contributors:* _Your Name(s) here (can add links to your profile)_
*Contributors:* https://github.com/cardil[Chris Suszynski]

++++
<br>
++++
[NOTE]
====
Solutions Patterns help you understand the art of the possible with Red Hat's portfolio, and not intended to be used as is for production environments. You are welcome use any part of this solution pattern for your own workloads.
Solution Patterns help you understand the art of the possible with Red Hat's
portfolio, and not intended to be used as is for production environments. You
are welcome to use any part of this solution pattern for your own workloads.
====
[#use-cases]
== Use cases

Common use cases that can be address with this architecture are:
Event mesh pattern simplifies the operational complexity of distributed
applications, making architectures more resilient and scalable.

- xyz
- xyz
Common use cases that can be addressed with this architecture include:

- *Correctness* and *consistency* across distributed applications and services,
without the hassles of _Event Sourcing_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably add a link for the definition of Event Sourcing as maybe not everybody knows about it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we should link to outside of RH for this. Do you have a link we can use here? I did a quick search and found this one: https://www.redhat.com/en/blog/pros-and-cons-event-sourcing-architecture-pattern

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I don't have a better red-hat internal link

- *Modernising* legacy applications by extracting smaller *microservices* into a
distributed and eventually consistent system.
- *Enabling communication* with external services, that can be easily tested
using a common *developer toolkit*.
include::01-pattern.adoc[]
2 changes: 1 addition & 1 deletion site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runtime:
site:
title: Solution Patterns for Cloud Native Architectures
url: https://redhat-solution-patterns.github.io/solution-patterns/
start_page: solution-pattern-template::index.adoc
start_page: solution-pattern-event-mesh-for-microservices::index.adoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Start page path solution-pattern-event-mesh-for-microservices::index.adoc does not exist

The specified start page path in site.yml points to a non-existent location. The file structure shows only one index.adoc at documentation/modules/ROOT/pages/index.adoc, and no files or directories containing "event-mesh" were found in the repository.

  • The start page configuration should be updated to point to an existing documentation file
  • Consider either creating the missing documentation structure or updating the start page path to use the existing ROOT::index.adoc
🔗 Analysis chain

Verify the existence of the new start page

The start page update is consistent with dev-site.yml, but let's verify the path exists.


Let me verify the exact module path structure to ensure we're searching correctly.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the new start page
fd --type f "index.adoc" documentation/ | grep -q "event-mesh-for-microservices" && echo "Start page exists" || echo "Start page not found"

Length of output: 129


Script:

#!/bin/bash
# First, let's check all index.adoc files to see the module structure
fd --type f "index.adoc" | sort

# Then, let's also check for any files containing "event-mesh" in their path
fd "event-mesh"

Length of output: 91


content:
sources:
Expand Down