Study how sagas coordinate transactions across multiple microservices without a shared database
See a working example of CQRS and event sourcing in a Java Spring Boot application
Run a multi-service Docker Compose setup to learn how microservices communicate via Kafka
Requires Docker and at least 16 GB of RAM to run all services together, documentation is sparse and relies on the companion book.
The FTGO application is the example codebase that accompanies the book Microservice Patterns by Chris Richardson. FTGO stands for Food to Go, a fictional food delivery service. The codebase exists to demonstrate the architectural patterns described in the book rather than to be a production system, so the business logic is intentionally minimal and the documentation points readers to the book for explanations. The application is split into several independent services: one for consumers, one for restaurants, one for orders, one for the kitchen, one for accounting, and one for order history. There is also an API gateway that serves as the single entry point for outside clients. Each service is a separate Spring Boot application with its own Gradle build module and its own Swagger UI for exploring its API. Services communicate in two ways. They expose REST APIs for direct HTTP calls, and they also exchange messages through Apache Kafka using a framework called Eventuate Tram. The order service in particular uses a pattern called sagas to keep data consistent across services without a shared database. Sagas coordinate multi-step operations by exchanging messages between services, so if one step fails the system can compensate. The application uses Docker containers and can be run locally using Docker Compose or deployed to Kubernetes. It requires significant resources: the README recommends a machine with at least 16 GB of RAM to run all the services together. This codebase is most useful as a learning resource for developers reading the Microservice Patterns book who want to see saga patterns, event sourcing, and CQRS working in real code.
← microservices-patterns on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.