Flights API for microservices v2.
860
An example of domain driven microservice architecture with event sourcing & CQRS in docker containers. Use docker-compose.prod.yml to test it out. Images are available at https://hub.docker.com/u/elpulgo. Serves an application where the user can handle flights and passengers, and in realtime see the auditlog, based on an event store.
- Client / Angular
- API-Gateway / NetCore WebApi / Ocelot
- Flights API / NetCore WebApi / CQRS w MediatR / JSON-RPC
- Flights Processor / Net Core Worker
- Flights read database / Postgre SQL
- Passengers API / NetCore WebApi / CQRS w MediatR / JSON-RPC
- Passengers Processor / Net Core Worker
- Passenger read database / Postgre SQL
- Event store / EventStoreDB
- Auditlog API / NetCore WebApi
Serves as an example of how to compose a microservice architecture with a domain driven design. The project is done with a goal of learning event sourcing and CQRS pattern. The project is structured around the domains 'Flight' and 'Passenger'.
I have investigated topics such as CQRS (with MediatR), RPC, Event sourcing among others to be able to build this architecture.
The project is structured around the different domains, i.e 'Flights' and 'Passengers'. Each domain uses generic implementations from a shared dependency, like database connections/operations, RPC server host/client and operations, event store connections/operations.
Each domain is structured with the same template:
| Suffix | Content |
|---|---|
| API | NetCore webapi, which host the server for the specified domain |
| Application | CQRS related logic, commands, queries, RPC implementations etc. |
| Core | Models, extensions, repository interfaces, mappings, events |
| Infrastructure | Event store related implementations, read/write database repository implementations |
| Processor | Worker for handling subscriptions from event store |
Images provided by me can be found on docker hub, and in the root directory there is a docker-compose.prod.yml to be used if you don't want to use the source code.
Content type
Image
Digest
Size
26.8 MB
Last updated
almost 6 years ago
docker pull elpulgo/microservices_v2_flights-api