Skip to content

Commit

Permalink
GitBook: [master] 2 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mynkow authored and gitbook-bot committed Oct 1, 2020
1 parent 7ec74ba commit bc7eeb9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/message-handlers/ports.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Ports

Port is the mechanism to establish communication between aggregates. Usually this involves one aggregate who triggered an event and one aggregate which needs to react.

If you feel the need to do more complex interactions, it is advised to use Saga. The reason for this is that ports do not provide a transparent view of the business flow because they do not have persistent state.

## Communication Guide Table

| Triggered by | Description |
| :--- | :--- |
| Event | Domain events represent business changes which have already happened |

## Best Practices

{% hint style="success" %}
**You can/should/must...**

* a port can send a command
{% endhint %}



20 changes: 20 additions & 0 deletions docs/message-handlers/sagas.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
---
description: Sometimes called a Process Manager
---

# Sagas

When we have a workflow, which involves several aggregates it is recommended to have the whole process described in a single place such as а Saga/ProcessManager.

## Communication Guide Table

| Triggered by | Description |
| :--- | :--- |
| Event | Domain events represent business changes which have already happened |

## Best Practices

{% hint style="success" %}
**You can/should/must...**

* a saga **can** send new commands
{% endhint %}

0 comments on commit bc7eeb9

Please sign in to comment.