Skip to content

Content for the solution pattern #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 2 additions & 4 deletions dev-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ 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
ui:
bundle:
url: https://github.com/redhat-solution-patterns/course-ui/releases/download/v0.1.16/ui-bundle.zip
url: https://github.com/redhat-solution-patterns/course-ui/releases/download/v0.1.17/ui-bundle.zip
snapshot: true
supplemental_files: ./supplemental-ui
output:
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 6 additions & 12 deletions documentation/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* xref:index.adoc[{counter:module}. Home page]
** xref:index.adoc#use-cases[{module}.{counter:submodule1} Use cases]
** xref:index.adoc#_the_story_behind_this_solution_pattern[{module}.{counter:submodule1} The story behind this solution pattern]
** xref:index.adoc#_the_story[{module}.{counter:submodule1} The story behind this solution pattern]
** xref:index#_the_solution[{module}.{counter:submodule1} The solution]

* xref:02-architecture.adoc[{counter:module}. Architecture]
Expand All @@ -9,17 +9,11 @@
** xref:02-architecture.adoc#more_tech[{module}.{counter:submodule2}. More about the technology stack]

* xref:03-demo.adoc[{counter:module}. See the Solution in Action]
** xref:03-demo.adoc#_demonstration[{module}.{counter:submodule3}. Demonstration]
** xref:03-demo.adoc#_run_the_demonstration[{module}.{counter:submodule3}. Run this demonstration]
*** xref:03-demo.adoc#_before_getting_started[{module}.{counter:submodule3}. Pre-requisites]
*** xref:03-demo.adoc#_installing_the_demo[{module}.{counter:submodule3}. Installing the demo]
*** xref:03-demo.adoc#_walkthrough_guide[{module}.{counter:submodule3}. Walkthrough guide]

* xref:04-workshop.adoc[{counter:module}. Workshop]
** xref:04-workshop.adoc#_installing_the_workshop_environment[{module}.{counter:submodule4}. Installing the workshop environment]
*** xref:04-workshop.adoc#_before_getting_started[{module}.{counter:submodule4}. Pre-requisites]
*** xref:04-workshop.adoc#_installing_the_environment[{module}.{counter:submodule4}. Installing the environment]
** xref:04-workshop.adoc#deliver_wksp[{module}.{counter:submodule4}. Delivering the workshop]
** xref:03-demo.adoc#_initial_application[{module}.{counter:submodule3}. Initial application]
** xref:03-demo.adoc#_refactoring_plan[{module}.{counter:submodule3}. Refactoring plan]
** xref:03-demo.adoc#_run_this_demonstration[{module}.{counter:submodule3}. Run this demonstration]
** xref:03-demo.adoc#_in_depth_refactoring[{module}.{counter:submodule3}. In-depth look at the refactoring]
** xref:03-demo.adoc#_conclusion[{module}.{counter:submodule3}. Conclusion]

* xref:developer-resources.adoc[{counter:module}. Developer Resources]

Expand Down
27 changes: 25 additions & 2 deletions documentation/modules/ROOT/pages/01-pattern.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
[#_the_story]
== 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 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 https://martinfowler.com/bliki/CQRS.html[_CQRS_] pattern together with _Knative's Event Mesh_
to modernize their application in a non-extrusive way.

[#_the_solution]
== The Solution

This is a summary of the solution
The core of this solution is an event mesh -- a dynamic, flexible infrastructure 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

a link would be cool

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

I'd write CNCF CloudEvents at least once on the beginning section. To underline its importance: A standard

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, just a proposal. Maybe link from here to the resource section ? 🤔

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.
Loading