-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
## Lectures | ||
|
||
- [Domain Driven Design](./domain-driven-design.md) | ||
- [Event Driven Architecture](./event-driven-architecture.md) | ||
- [Event Driven Architecture](./event-driven-architecture.md) | ||
- [Consistent Hashing](./consistent-hashing.md) | ||
- [Load Balancing](./load-balancing.md) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
# todo | ||
## Event-driven architecture | ||
|
||
**Event sourcing** - is a pattern that uses an append-only event log to store the full history of actions taken on data | ||
in a domain. | ||
|
||
![](./docs/eda/event-sourcing.png) | ||
|
||
The application state is derived by replaying the events in the log. | ||
> This allows the state to be rebuilt at any point in time by replaying the events from the event log. | ||
Common example of event sourcing is a Git. | ||
|
||
**Event** - is a record of something that has happened in the domain. | ||
> Event is a subset of the message. | ||
> | ||
> - Event don't have a destination. | ||
> - Event is a named fact that something has happened. | ||
> | ||
> E.g: order created, order shipped, order cancelled. | ||
**Event log** - is a sequence of events that happened in the domain. | ||
|
||
**Event driven architecture** - is a pattern that uses events to trigger and communicate between decoupled services. | ||
> Usually implemented using a message broker, such as Kafka or RabbitMQ. | ||
- EDA is asynchronous, which means that the sender and receiver of the message don't need to interact | ||
instantly, events can be processed at a later time. | ||
- We can have multiple consumers of the same event, each consumer can do something different with it. (pub/sub model) | ||
- Easy to add new services, low coupling between services. | ||
- High system reliability, because if one service is down, the event will be stored in the event log | ||
and will be processed later. | ||
|
||
![](./docs/eda/eda.png) | ||
|
||
**CQRS** (Command Query Responsibility Segregation) - is a pattern that separates the read and write operations | ||
for a data store. | ||
|
||
> Different services can handle read and write operations separately. | ||
### Resources | ||
|
||
- https://aws.amazon.com/ru/event-driven-architecture/ | ||
- https://www.linkedin.com/pulse/event-sourcing-pattern-distributed-designpatterns-pratik-pandey/ | ||
- https://docs.axoniq.io/reference-guide/architecture-overview/event-sourcing | ||
- https://microservices.io/patterns/data/saga.html |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.