This project is an implementation of Social media Microservices using DDD, CQRS, Event Sourcing, Kafka message broker, Mongo DB Event store, SQL Server and Postgre Read DB, Serilog, Elasticsearch integration for log Management, Authentication & Authorization, and Distributed cache (Redis).
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Docker
- Docker Compose
- Clone the repository:
git clone https://github.com/Rezakazemi890/SM-POST-EventSourcing-kafka.git
- Navigate to the project directory:
cd SM-POST-EventSourcing-kafka
- Run Docker Compose:
docker-compose up
This will start all the required services and microservices.
The Social media Microservices project uses Domain-Driven Design (DDD), Command Query Responsibility Segregation (CQRS), Event Sourcing, and Kafka message broker.
Domain-Driven Design is used to ensure that the business logic of the application is separated from other concerns such as the user interface and infrastructure. This enables developers to create a flexible and maintainable architecture that can easily adapt to changes in the business requirements.
Command Query Responsibility Segregation is used to separate the application into two parts: Commands and Queries. Commands are responsible for modifying the state of the application while Queries are responsible for retrieving data from the application. This separation enables scalability and performance optimization for the application.
Event Sourcing is used to persist events as the source of truth for the application state. This allows developers to easily reconstruct the state of the application at any point in time by replaying events.
Kafka message broker is used to provide a highly scalable and distributed messaging system for the application. This enables the different microservices to communicate with each other in a decoupled and asynchronous manner.
MongoDB Event store is used to store the events that are generated by the application. This allows developers to easily replay events and reconstruct the state of the application.
SQL Server and Postgre Read DB are used to store the read models for the application. This enables developers to easily query and retrieve data from the application.
Serilog and Elasticsearch are used to provide a centralized log management system for the application. This allows developers to easily monitor and debug the application.
Authentication and Authorization are used to provide secure access to the application. This ensures that only authorized users can access the application.
Distributed cache (Redis) is used to provide a highly scalable and distributed caching system for the application. This enables the application to easily retrieve data from the cache instead of the database.
- .NET 6
- ASP.NET Core
- Kafka
- MongoDB
- SQL Server
- Postgre SQL
- Redis
- Serilog
- Elasticsearch
This project is licensed under the MIT License - see the LICENSE.md file for details.