eventuate-examples/eventuate-examples-java-spring-todo-list
Über uns
A Java and Spring Boot Todo list application built using Eventuate
Web- und App-EntwicklungGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalAn Eventuate project

This project is part of Eventuate, which is a microservices collaboration platform.
Todo List example application
The Todo List application is the hello world application for the Eventuate™ event sourcing. It illustrates how you can use the platform to write an application with a microservices architecture that uses Event Sourcing and Command Query Responsibility Segregation (CQRS). The Todo List application lets users maintain a todo list.
The Todo List application is a Java and Spring Boot application built using Eventuate™'s Event Sourcing based programming model.
Todos are implemented by an Event Sourcing-based TodoAggregate.
The aggregate's events are persisted in the Eventuate event store.
The application also maintains a materialized view of the data in MySQL.
Don't forget to take a look at the other Eventuate example applications.
Got questions?
Don't hesitate to create an issue or see
Architecture
The Todo application has a microservice architecture. It is written using the Eventuate Client Framework for Java, which provides an event sourcing based programming model. The following diagram shows the Todo List application architecture:

The application consists of the following:
- Todo service - a Java and Spring Boot-based service that has a HATEOAS-style REST API for creating, updating and querying todo list items. It uses Eventuate to persist aggregates using event sourcing.
- Todo view service - a Java and Spring Boot-based service that provides a REST API for querying todos. It implements a Command Query Responsibility Segregation (CQRS) view of todos using MySQL. MySQL is kept up to date by subscribing to events produced by the Todo service.
- MySQL database - stores the CQRS view of todo list items.
Note: for simplicity, the Todo list application can be deployed as a monolithic application.
Building and running the application
First, build the application
./gradlew assemble
Next, launch the services using Docker Compose:
export DOCKER_HOST_IP=...
./gradlew <database-mode>ComposeBuild
./gradlew <database-mode>ComposeUp
Where database-mode is one of:
mysqlbinlog- use MySQL with Binlog-based event publishingpostgreswal- use Postgres with Postgres WAL-based event publishingpostgrespolling- use Postgres with generic JDBC polling-based event publishing
Note: You need to set DOCKER_HOST_IP before running Docker Compose.
This must be an IP address or resolvable hostname.
It cannot be localhost.
See this guide to setting DOCKER_HOST_IP for more information.
Using the application
Once the application has started, you can use the application via the Swagger UI.
http://${DOCKER_HOST_IP}:8081/swagger-ui.html- the command-side servicehttp://${DOCKER_HOST_IP}:8082/swagger-ui.html- the query-side service
Got questions?
Don't hesitate to create an issue or see
Ähnliche Projekte entdecken
Wird geladen…