Skip to content
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

Added Distributed Processes samples #24

Merged
merged 7 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions .github/workflows/samples_distributed-processes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Samples - EventStoreDB Events Versioning

on:
# run it on push to the default repository branch
push:
branches: [main]
paths:
- "samples/distributed-processes/**"
# run it during pull request
pull_request:
paths:
- "samples/distributed-processes/**"

defaults:
run:
working-directory: samples/distributed-processes

jobs:
build-and-test-code:
name: Build and test
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v2

- name: Start containers
run: docker-compose up -d

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: "adopt"
cache: gradle

- uses: gradle/gradle-build-action@v2
with:
arguments: build
gradle-version: wrapper
build-root-directory: samples/distributed-processes

- name: Archive test report
uses: actions/upload-artifact@v2
if: always()
with:
name: Test report
path: ./samples/distributed-processes/build/test-results/test

- name: Stop containers
if: always()
run: docker-compose down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Tutorial, practical samples and other resources about Event Sourcing in JVM. See
- [Tools used](#tools-used)
- [Event Versioning](#event-versioning)
- [Uniqueness](#uniqueness)
- [Distributed Processes](#distributed-processes)
- [Articles](#articles)

## Event Sourcing
Expand Down Expand Up @@ -285,13 +286,24 @@ Shows how to handle basic event schema versioning scenarios using event and stre
- 📝 [Simple patterns for events schema versioning](https://event-driven.io/en/simple_events_versioning_patterns/?utm_source=event_sourcing_jvm)

### [Uniqueness](./samples/uniqueness/)
Shows how to handle unique constraint checks in an event-sources system. Explains various techniques like:
Shows how to handle unique constraint checks in an event-sources system. Explains various techniques, like:
- talking to business,
- stream id design,
- reservation pattern.

Read more in [How to ensure uniqueness in Event Sourcing](https://event-driven.io/en/uniqueness-in-event-sourcing/?utm_source=event_sourcing_jvm).

### [Distributed Processes](./samples/distributed-processes/)
Shows how to handle distributed processes in Event Sourcing in practice. Explains various use cases, like:
- batch processing,
- saga vs process managers,
- distributed processes in the single module and across boundaries,
- internal vs external events,
- compensating failures,
- implementation of command and event bus in EventStoreDB.

Read more in [How to ensure uniqueness in Event Sourcing](https://event-driven.io/en/uniqueness-in-event-sourcing/?utm_source=event_sourcing_jvm).

## Articles

Read also more on the **Event Sourcing** and **CQRS** topics in my [blog](https://event-driven.io/?utm_source=event_sourcing_jvm) posts:
Expand Down
18 changes: 18 additions & 0 deletions samples/distributed-processes/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 2
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.java]
max_line_length = 80

[*.md]
max_line_length = off
trim_trailing_whitespace = false
37 changes: 37 additions & 0 deletions samples/distributed-processes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
Loading