You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a couple of microservices which implemented **e-commerce** modules over **Catalog, Basket, Discount** and **Ordering** microservices with **NoSQL (MongoDB, Redis)** and **Relational databases (PostgreSQL, Sql Server)** with communicating over **RabbitMQ Event Driven Communication** and using **Ocelot API Gateway**.
8
-
9
-
And here continuation of the main course -> [Microservices Observability with Distributed Logging, Health Monitoring, Resilient and Fault Tolerance with using Polly](https://www.udemy.com/course/microservices-observability-resilience-monitoring-on-net/?referralCode=D162C050483C75452136)
7
+
There is a couple of microservices which implemented **e-commerce** modules over **Catalog, Basket, Discount** and **Ordering** microservices with **NoSQL (DocumentDb, Redis)** and **Relational databases (PostgreSQL, Sql Server)** with communicating over **RabbitMQ Event Driven Communication** and using **Yarp API Gateway**.
10
8
11
9
### Check Explanation of this Repository on Medium
12
-
*[Microservices Architecture on .NET with applying CQRS, Clean Architecture and Event-Driven Communication](https://medium.com/aspnetrun/microservices-architecture-on-net-3b4865eea03f)
13
-
*[Microservices Observability, Resilience, Monitoring on .Net](https://medium.com/aspnetrun/microservices-observability-resilience-monitoring-on-net-a5dfbdbb0fbd)
10
+
*[.NET 8 Microservices: DDD, CQRS, Vertical/Clean Architecture and Event-Driven Communication](https://medium.com/@mehmetozkaya/net-8-microservices-ddd-cqrs-vertical-clean-architecture-2dd7ebaaf4bd)
14
11
15
12
## Whats Including In This Repository
16
13
We have implemented below **features over the run-aspnetcore-microservices repository**.
17
14
18
15
#### Catalog microservice which includes;
19
-
* ASP.NET Core Web API application
20
-
* REST API principles, CRUD operations
21
-
***MongoDB database** connection and containerization
22
-
* Repository Pattern Implementation
23
-
* Swagger Open API implementation
16
+
* ASP.NET Core Minimal APIs and latest features of .NET8 and C# 12
17
+
***Vertical Slice Architecture** implementation with Feature folders and single .cs file includes different classes in one file
18
+
* CQRS implementation using MediatR library
19
+
* CQRS Validation Pipeline Behaviors with MediatR and FluentValidation
20
+
* Use Marten library for .NET Transactional Document DB on PostgreSQL
21
+
* Use Carter for Minimal API endpoint definition
22
+
* Cross-cutting concerns Logging, Global Exception Handling and Health Checks
24
23
25
24
#### Basket microservice which includes;
26
-
* ASP.NET Web API application
27
-
*REST API principles, CRUD operations
28
-
***Redis database** connection and containerization
25
+
* ASP.NET 8 Web API application, Following REST API principles, CRUD
26
+
*Using **Redis** as a **Distributed Cache** over basketdb
27
+
*Implements Proxy, Decorator and Cache-aside patterns
29
28
* Consume Discount **Grpc Service** for inter-service sync communication to calculate product final price
30
29
* Publish BasketCheckout Queue with using **MassTransit and RabbitMQ**
31
30
32
31
#### Discount microservice which includes;
33
32
* ASP.NET **Grpc Server** application
34
33
* Build a Highly Performant **inter-service gRPC Communication** with Basket Microservice
35
34
* Exposing Grpc Services with creating **Protobuf messages**
36
-
*Using **Dapper for micro-orm implementation** to simplify data access and ensure high performance
37
-
***PostgreSQL database** connection and containerization
35
+
*Entity Framework Core ORM — SQLite Data Provider and Migrations to simplify data access and ensure high performance
36
+
***SQLite database** connection and containerization
38
37
39
38
#### Microservices Communication
40
39
* Sync inter-service **gRPC Communication**
@@ -46,33 +45,19 @@ We have implemented below **features over the run-aspnetcore-microservices repos
46
45
47
46
#### Ordering Microservice
48
47
* Implementing **DDD, CQRS, and Clean Architecture** with using Best Practices
49
-
* Developing **CQRS with using MediatR, FluentValidation and AutoMapper packages**
48
+
* Developing **CQRS with using MediatR, FluentValidation and Mapster packages**
50
49
* Consuming **RabbitMQ** BasketCheckout event queue with using **MassTransit-RabbitMQ** Configuration
51
50
***SqlServer database** connection and containerization
52
51
* Using **Entity Framework Core ORM** and auto migrate to SqlServer when application startup
53
52
54
-
#### API Gateway Ocelot Microservice
55
-
* Implement **API Gateways with Ocelot**
56
-
* Sample microservices/containers to reroute through the API Gateways
57
-
* Run multiple different **API Gateway/BFF** container types
58
-
* The Gateway aggregation pattern in Shopping.Aggregator
53
+
#### Yarp API Gateway Microservice
54
+
* Develop API Gateways with **Yarp Reverse Proxy** applying Gateway Routing Pattern
***Rate Limiting** with FixedWindowLimiter on Yarp Reverse Proxy Configuration
59
57
60
58
#### WebUI ShoppingApp Microservice
61
59
* ASP.NET Core Web Application with Bootstrap 4 and Razor template
62
-
* Call **Ocelot APIs with HttpClientFactory** and **Polly**
63
-
64
-
#### Microservices Cross-Cutting Implementations
65
-
* Implementing **Centralized Distributed Logging with Elastic Stack (ELK); Elasticsearch, Logstash, Kibana and SeriLog** for Microservices
66
-
* Use the **HealthChecks** feature in back-end ASP.NET microservices
67
-
* Using **Watchdog** in separate service that can watch health and load across services, and report health about the microservices by querying with the HealthChecks
68
-
69
-
#### Microservices Resilience Implementations
70
-
* Making Microservices more **resilient Use IHttpClientFactory** to implement resilient HTTP requests
71
-
* Implement **Retry and Circuit Breaker patterns** with exponential backoff with IHttpClientFactory and **Polly policies**
72
-
73
-
#### Ancillary Containers
74
-
* Use **Portainer** for Container lightweight management UI which allows you to easily manage your different Docker environments
75
-
***pgAdmin PostgreSQL Tools** feature rich Open Source administration and development platform for PostgreSQL
60
+
* Call **Yarp APIs with Refit HttpClientFactory**
76
61
77
62
#### Docker Compose establishment with all microservices on docker;
78
63
* Containerization of microservices
@@ -82,8 +67,8 @@ We have implemented below **features over the run-aspnetcore-microservices repos
82
67
## Run The Project
83
68
You will need the following tools:
84
69
85
-
*[Visual Studio 2019](https://visualstudio.microsoft.com/downloads/)
86
-
*[.Net Core 5 or later](https://dotnet.microsoft.com/download/dotnet-core/5)
70
+
*[Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)
71
+
*[.Net Core 8 or later](https://dotnet.microsoft.com/download/dotnet-core/8)
@@ -92,39 +77,18 @@ Follow these steps to get your development environment set up: (Before Run Start
92
77
2. Once Docker for Windows is installed, go to the **Settings > Advanced option**, from the Docker icon in the system tray, to configure the minimum amount of memory and CPU like so:
93
78
***Memory: 4 GB**
94
79
* CPU: 2
95
-
3. At the root directory which include **docker-compose.yml** files, run below command:
80
+
3. At the root directory of solution, select **docker-compose** and **Set a startup project**. **Run docker-compose without debugging on visual studio**.
81
+
Or you can go to root directory which include **docker-compose.yml** files, run below command:
>Note: If you get connection timeout error Docker for Mac please [Turn Off Docker's "Experimental Features".](https://github.com/aspnetrun/run-aspnetcore-microservices/issues/33)
101
-
102
86
4. Wait for docker compose all microservices. That’s it! (some microservices need extra time to work so please wait if not worked in first shut)
103
87
104
-
5. You can **launch microservices** as below urls:
105
-
106
-
***Catalog API -> http://host.docker.internal:8000/swagger/index.html**
107
-
***Basket API -> http://host.docker.internal:8001/swagger/index.html**
108
-
***Discount API -> http://host.docker.internal:8002/swagger/index.html**
109
-
***Ordering API -> http://host.docker.internal:8004/swagger/index.html**
***Web Status -> http://host.docker.internal:8007**
119
-
***Web UI -> http://host.docker.internal:8006**
120
-
121
-
5. Launch http://host.docker.internal:8007 in your browser to view the Web Status. Make sure that every microservices are healthy.
122
-
6. Launch http://host.docker.internal:8006 in your browser to view the Web UI. You can use Web project in order to **call microservices over API Gateway**. When you **checkout the basket** you can follow **queue record on RabbitMQ dashboard**.
88
+
5. Launch **Shopping Web UI -> https://localhost:6065** in your browser to view index page. You can use Web project in order to **call microservices over Yarp API Gateway**. When you **checkout the basket** you can follow **queue record on RabbitMQ dashboard**.
>Note: If you are running this application in macOS then use `docker.for.mac.localhost` as DNS name in `.env` file and the above URLs instead of `host.docker.internal`.
0 commit comments