v1.1.0-20251130
Event-Driven Architectures and Microservices
- Event store technology example: Apache Kafka
- "An open-source distributed event streaming platform" - watching together this video intro
- Background and Context
- Kafka Documentation
- Kafka Quick start
- Setting up Kafka Using Docker
- using Docker Compose with
kafka-deplo.yamlconfig file - user guides: Kafka docs, Docker docs
- using Docker Compose with
- Setting up Kafka Using Docker
- Working with Kafka - Kafka clients
- Kafka clients in Java
- Simple examples in repo -
sap.kafkapackage
- Dashboard Tools for Kafka: Offset Explorer (formerly Kafka Tool)
- Using Offset Explorer GUI tool as a simple dashboard for Kafka
- setting the Bootstrap servers property to connect to the Kafka server to listen at port 9092 or 29092 (if using Docker) for the host machine
- Using Offset Explorer GUI tool as a simple dashboard for Kafka
- Documenting API in Event-Driven Architectures: AsyncAPI initiative
- TTT Game System case study
- Focus on
ttt-game-servicemicroservice: making it event-driven, using Kafka- designing event channels - both static and dynamic, inspired by REST principles
- static event channels, functioning as a single entry point (à-la-REST)
create-game-requests(input)create-game-requests-approved(output)create-game-requests-rejected(output)new-game-created(output)
- dynamic event channels
- to join a game identified by
<gameId>game-<gameId>-join-requests(input)game-<gameId>-join-requests-approved(output)game-<gameId>-join-requests-rejected(output)
- to make a move by a player session identified by
<playerSessionId>session-<playerSessionId>-move-requests(input)session-<playerSessionId>-move-requests-approved(output)session-<playerSessionId>-move-requests-rejected(output)
- about the events of game identified by
<gameId>game-<gameId>-events(output)
- to join a game identified by
- static event channels, functioning as a single entry point (à-la-REST)
- adding an event-driven controller
- [TODO] implementing event sourcing
- designing event channels - both static and dynamic, inspired by REST principles
- TTT Game Service AsyncAPI spec
- including some main fields
- verified with AsyncAPI Studio
- Creating new proxies in other services interacting with
ttt-game-servicettt-lobby-servicettt-api-gateway
- Running
- simple interaction example with the single service:
- running the broker
docker run -p 9092:9092 apache/kafka:4.1.1 - running the service:
ttt_game_service_infrastructure.GameServiceNoDockerMain - running
ttt_game_service_infrastructure.SimpleInteractionExample
- running the broker
- full TTT Game System
- setting up all services and broker with
docker compose up - interacting with the API gateway as seen in previous labs
- setting up all services and broker with
- simple interaction example with the single service:
- TTT Game
- Focus on