- To provide a simple example of how to implement
Domain Driven Design
andMessaging Architecture
in PHP. - To show how to implement
CQRS
,Event Sourcing
andHexagonal Architecture
in PHP. - To show how to implement
Resilient
amdObservable
Microservices
in PHP.
Run docker-compose up -d
to start all services, and wait for them to start docker-compose logs -f
.
This Demo provides two integrated Applications.
- Customer Service - which allows for reporting issues by customers
- Backoffice Service - which allows for working on tickets by employees
Services communicate with each other using RabbitMQ
with Ecotone's Distributed Bus
.
- To report issue as a customer, go to Customer Service
- From Backoffice Service you may start working on ticket, that was correlated with issue reported by customer.
- You may also check Jaeger to get full overview of how communication looks like and how each component behave and what is happening.
Additionaly you may check:
- Whenever issue is reported, confirming email will be sent to the customer, which can be found Mailbox.
- First time email is sent it's set up for failing, so you can get feeling of working with system that can recover from error messages using Ecotone Pulse.
- Ecotone - PHP Framework for building resilient, business oriented system in PHP
- Symfony - PHP Framework for building web applications
- Laravel - PHP Framework for building web applications
- RabbitMQ - Message Broker for asynchronous communication
- Ecotone Pulse - Monitor for any processing errors and recover from failed messages.
- OpenTelemetry with Jaeger - Distributed Tracing for monitoring and troubleshooting microservices-based distributed systems
Customer Service
isLaravel+Ecotone application
, where customers can report issues. This happens usingCQRS
combined withEloquent Models
.
- Whenever new issue is reported, email is send to the with confirmation. This happens using
Asynchronous Event Handlers
, which are backed byRabbitMQ
.
Backoffice Service
isSymfony+Ecotone application
, where employees can be registered and work on the tickets.
All issues reported by customers are synchronized toBackoffice Service
and are correlated with tickets.
The synchronization betweenCustomer Service
andBackoffice Service
is done usingEvents
andDistributed Bus
for cross service communication viaRabbitMQ
.
- Employees can work on the tickets provides information about the status. As we want to know full history, Tickets are
Event-Sourced
.
From Event Sourced tickets we build differentRead Model Projections
, which are used to display information about the ticket.
- The whole communication between Services is monitored and traced using OpenTelemetry with
Jaeger
.