All Projects → djarza → football-events

djarza / football-events

Licence: MIT license
Event-Driven microservices with Kafka Streams

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to football-events

Watermill
Building event-driven applications the easy way in Go.
Stars: ✭ 3,504 (+6047.37%)
Mutual labels:  cqrs, event-sourcing, stream-processing, event-driven
Pitstop
This repo contains a sample application based on a Garage Management System for Pitstop - a fictitious garage. The primary goal of this sample is to demonstrate several software-architecture concepts like: Microservices, CQRS, Event Sourcing, Domain Driven Design (DDD), Eventual Consistency.
Stars: ✭ 708 (+1142.11%)
Mutual labels:  cqrs, event-sourcing, event-driven, microservices-architecture
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (+263.16%)
Mutual labels:  cqrs, event-sourcing, event-driven, microservices-architecture
Foxoffice
Sample application demonstrating how to build a distributed cloud .NET Core application based on CQRS and Event Sourcing.
Stars: ✭ 33 (-42.11%)
Mutual labels:  cqrs, event-sourcing, event-driven
Ray
项目停止更新,新项目:https://github.com/RayTale/Vertex
Stars: ✭ 635 (+1014.04%)
Mutual labels:  cqrs, event-sourcing, event-driven
Rails event store
A Ruby implementation of an Event Store based on Active Record
Stars: ✭ 947 (+1561.4%)
Mutual labels:  cqrs, event-sourcing, event-driven
Asombroso Ddd
Una lista cuidadosamente curada de recursos sobre Domain Driven Design, Eventos, Event Sourcing, Command Query Responsibility Segregation (CQRS).
Stars: ✭ 41 (-28.07%)
Mutual labels:  cqrs, event-sourcing, event-driven
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (+19.3%)
Mutual labels:  cqrs, event-sourcing, event-driven
Vertex
Vertex is a distributed, ultimately consistent, event traceable cross platform framework based on Orleans, which is used to build high-performance, high throughput, low latency, scalable distributed applications
Stars: ✭ 117 (+105.26%)
Mutual labels:  cqrs, event-sourcing, event-driven
Goes
Go Event Sourcing made easy
Stars: ✭ 144 (+152.63%)
Mutual labels:  cqrs, event-sourcing, event-driven
Booster
Booster Cloud Framework
Stars: ✭ 136 (+138.6%)
Mutual labels:  cqrs, event-sourcing, event-driven
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (+178.95%)
Mutual labels:  cqrs, event-sourcing, event-driven
Akkatecture
a cqrs and event sourcing framework for dotnet core using akka.net
Stars: ✭ 414 (+626.32%)
Mutual labels:  cqrs, event-sourcing, event-driven
Netcoremicroservicessample
Sample using micro services in .NET Core 3.1 Focusing on clean code
Stars: ✭ 403 (+607.02%)
Mutual labels:  cqrs, event-sourcing, microservices-architecture
Event Source Cqrs Sample
Sample ES/CQRS application
Stars: ✭ 380 (+566.67%)
Mutual labels:  cqrs, event-sourcing, event-driven
Benthos
Fancy stream processing made operationally mundane
Stars: ✭ 3,705 (+6400%)
Mutual labels:  cqrs, event-sourcing, stream-processing
ftgogo
FTGOGO - event-driven architecture demonstration application using edat
Stars: ✭ 82 (+43.86%)
Mutual labels:  cqrs, event-sourcing, event-driven
dudulina
CQRS + Event Sourcing library for PHP
Stars: ✭ 53 (-7.02%)
Mutual labels:  cqrs, event-sourcing, event-driven
Eventflow.example
DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.
Stars: ✭ 131 (+129.82%)
Mutual labels:  cqrs, event-sourcing, event-driven
Event Sourcing Microservices Example
Learn about building microservices with event sourcing using Spring Boot and how to deploy a social network to Kubernetes using Docker Compose or Helm.
Stars: ✭ 167 (+192.98%)
Mutual labels:  cqrs, event-sourcing, event-driven

Event-Driven microservices with Kafka Streams

A skeleton example of how to use Kafka Streams with Event-Driven microservices.

This is an application that generates a simple football statistics like match scores, team and player rankings. It should be a little more comprehensible than a typical code examples based on orders, payments etc.

 

architecture

You can think of this application as a supplement to the basic code examples of Kafka Streams. Kafka Streams is used here extensively for many purposes like data processing, building materialized views, persisting the domain model and exposing the output of services. Furthermore, there is no traditional database, local state stores instead (PostgreSQL plays a role of legacy system only).

This codebase is trying to apply the idea of stateful streams processing with Kafka and Kafka Streams. These blog posts are a great introduction to that concept:

Services

Additional modules:

Events and Streams

Each event represents a state change that occurred to the system.

Event Fields
MatchScheduled match id, season, home club, away club, matchDate
MatchStarted match id, home club, away club
GoalScored goal id, match id, minute, scorer, scored for
CardReceived card id, match id, minute, receiver, type (yellow/red)
MatchFinished match id
PlayerStartedCareer palyer id, name

These events are the source for stream processing. For example, in order to determine the result of a match, you must join MatchStarted and GoalScored streams and then count the goals (see the code).

Domain Model

model

Kafka Topics

Topics are organized under logical groups as follows:

The prefixes above aim to separate the application topics from the internal Kafka Streams and Debezium topics.

topics

REST Endpoints

There are only two REST endpoits and both of them are accessed from the outside of the system:

How to run

Requirements: Java 10, Docker with at least 6 GB memory limit.

  1. Add kafka bootstrap address to your /etc/hosts:

    127.0.0.1 kafka
    127.0.0.1 postgres
    127.0.0.1 connect
    127.0.0.1 football-match
    127.0.0.1 football-player
    127.0.0.1 football-view-basic
    127.0.0.1 football-view-top
    127.0.0.1 football-ui
    
  2. Build microservices and Docker containers:

    cd football
    mvn install
    
  3. Build and run the demo application:

    cd football-tests
    mvn install -DskipTests
    java -jar target/football-tests-0.0.1-SNAPSHOT-jar-with-dependencies.jar
    

    It will start Docker containers and wait until all microservices are ready.

    If the default startup timeout (180 sec) will be insufficient, try to increase it:

    java -jar target/football-tests-0.0.1-SNAPSHOT-jar-with-dependencies.jar 400
    
  4. Wait a minute and launch http://football-ui:18080/. In a few seconds you should see some statistics updated in real time:

 

demo

The input is historical data from English Football League Championship. The historical events (goal scored, card received etc.) are played back every few seconds.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].