Skip to content

Commit a810b2b

Browse files
cardilrhuss
andauthored
Content for the solution pattern (#1)
* Index page content * Adding CI * Arch * Architecture chapter * Reword the architecture chapter * Reword the Event Mesh flow of the Architecture chapter * Differences with Event Sourcing and Service Mesh * Reformat table * Polishing the nitpicks from the review * Begin with the demo * Section about example flaws in the demo * A demo section written in 3/4 * Finished the demo, and the whole solution * Apply suggestions from code review Co-authored-by: Roland Huß <rhuss@redhat.com> * Review changes * Review changes for demo (without reorder) * Reorder the demo * CodeRabbit nitpicks * ui-bundle: cardil/redhat-solution-patterns-course-ui v0.1.17 * Use redhat-solution-patterns/course-ui latest bundle * Use openshift-knative/cabs-usvc for demo * Typo --------- Co-authored-by: Roland Huß <rhuss@redhat.com>
1 parent 800cea7 commit a810b2b

File tree

13 files changed

+1178
-117
lines changed

13 files changed

+1178
-117
lines changed

dev-site.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@ runtime:
44
site:
55
title: Solution Patterns for Cloud Native Architectures (Dev Mode)
66
url: http://localhost:3000/
7-
start_page: solution-pattern-template::index.adoc
7+
start_page: solution-pattern-event-mesh-for-microservices::index.adoc
88

99
content:
1010
sources:
1111
- url: .
1212
branches: HEAD
1313
start_path: documentation
1414
asciidoc:
15-
attributes:
16-
title: Red Hat Solution Patterns (Dev Mode)
1715
extensions:
1816
- ./lib/remote-include-processor.js
1917
- ./lib/tab-block.js
2018
ui:
2119
bundle:
22-
url: https://github.com/redhat-solution-patterns/course-ui/releases/download/v0.1.16/ui-bundle.zip
20+
url: https://github.com/redhat-solution-patterns/course-ui/releases/download/v0.1.17/ui-bundle.zip
2321
snapshot: true
2422
supplemental_files: ./supplemental-ui
2523
output:

documentation/antora.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: solution-pattern-template
2-
title: Template Tutorial
1+
name: solution-pattern-event-mesh-for-microservices
2+
title: Event Mesh For Applications
33
version: master
44
nav:
55
- modules/ROOT/nav.adoc
Binary file not shown.
113 KB
Loading

documentation/modules/ROOT/nav.adoc

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
* xref:index.adoc[{counter:module}. Home page]
22
** xref:index.adoc#use-cases[{module}.{counter:submodule1} Use cases]
3-
** xref:index.adoc#_the_story_behind_this_solution_pattern[{module}.{counter:submodule1} The story behind this solution pattern]
3+
** xref:index.adoc#_the_story[{module}.{counter:submodule1} The story behind this solution pattern]
44
** xref:index#_the_solution[{module}.{counter:submodule1} The solution]
55
66
* xref:02-architecture.adoc[{counter:module}. Architecture]
@@ -9,17 +9,11 @@
99
** xref:02-architecture.adoc#more_tech[{module}.{counter:submodule2}. More about the technology stack]
1010
1111
* xref:03-demo.adoc[{counter:module}. See the Solution in Action]
12-
** xref:03-demo.adoc#_demonstration[{module}.{counter:submodule3}. Demonstration]
13-
** xref:03-demo.adoc#_run_the_demonstration[{module}.{counter:submodule3}. Run this demonstration]
14-
*** xref:03-demo.adoc#_before_getting_started[{module}.{counter:submodule3}. Pre-requisites]
15-
*** xref:03-demo.adoc#_installing_the_demo[{module}.{counter:submodule3}. Installing the demo]
16-
*** xref:03-demo.adoc#_walkthrough_guide[{module}.{counter:submodule3}. Walkthrough guide]
17-
18-
* xref:04-workshop.adoc[{counter:module}. Workshop]
19-
** xref:04-workshop.adoc#_installing_the_workshop_environment[{module}.{counter:submodule4}. Installing the workshop environment]
20-
*** xref:04-workshop.adoc#_before_getting_started[{module}.{counter:submodule4}. Pre-requisites]
21-
*** xref:04-workshop.adoc#_installing_the_environment[{module}.{counter:submodule4}. Installing the environment]
22-
** xref:04-workshop.adoc#deliver_wksp[{module}.{counter:submodule4}. Delivering the workshop]
12+
** xref:03-demo.adoc#_initial_application[{module}.{counter:submodule3}. Initial application]
13+
** xref:03-demo.adoc#_refactoring_plan[{module}.{counter:submodule3}. Refactoring plan]
14+
** xref:03-demo.adoc#_run_this_demonstration[{module}.{counter:submodule3}. Run this demonstration]
15+
** xref:03-demo.adoc#_in_depth_refactoring[{module}.{counter:submodule3}. In-depth look at the refactoring]
16+
** xref:03-demo.adoc#_conclusion[{module}.{counter:submodule3}. Conclusion]
2317
2418
* xref:developer-resources.adoc[{counter:module}. Developer Resources]
2519
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
1+
[#_the_story]
12
== The story behind this solution pattern
23
3-
A description of the story that was used to build the demo and architectures of this SP.
4+
Cabs is a fictional transportation company.
5+
Engineers at Cabs were struggling with their transactional-style, monolith application.
6+
They recently started an effort to modernize it.
47
8+
The team saw a https://www.youtube.com/watch?v=Rc5IO6S6ZOk[talk on _Event Mesh_].
9+
The talk presented the advantages of moving beyond transactional architectures in favor of eventual consistency.
10+
By leveraging event meshes with technologies like Knative, developers can achieve decoupled, reliable microservices without extensive re-engineering.
11+
This solution addresses inefficiencies and aligns distributed systems with real-world business processes.
12+
The team had figured out they could leverage the https://martinfowler.com/bliki/CQRS.html[_CQRS_] pattern together with _Knative's Event Mesh_
13+
to modernize their application in a non-extrusive way.
14+
15+
[#_the_solution]
516
== The Solution
617
7-
This is a summary of the solution
18+
The core of this solution is an event mesh -- a dynamic, flexible infrastructure layer that routes, retries, and processes asynchronous events across distributed components.
19+
Using _Knative Eventing_ and _CloudEvents_, this pattern enables:
20+
21+
- *Reliable delivery* of events with retry mechanisms.
22+
- Simplified *asynchronous workflows*.
23+
- *Decoupling* of services to improve scalability, testability and resilience.
24+
25+
The approach of Cabs engineering team is to extract well-defined services, using the _CQRS_ pattern to identify _Commands_ from _Queries_, and model the
26+
_Commands_ as _Events_.
27+
Those events will be routed to the _Event Mesh_ with regular _HTTP_ messages.
28+
The _CloudEvents_ library ensures the proper serialization of the events to and from the _HTTP_ messages.
29+
The _Event Mesh_
30+
will handle not only the persistence of the events in-flight, but also all the required logic of retry in case of endpoint failure.

0 commit comments

Comments
 (0)