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
Copy file name to clipboardExpand all lines: README.md
+81-48Lines changed: 81 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -3,61 +3,80 @@
3
3
4
4
**UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this repository -> https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=C624710F8B411FE7A4FB**
5
5
6
-
For those who comes from udemy, the course repository moved here ->
6
+
**NOTE :**For those who comes from udemy, I have just updated the repository so udemy course will be updated soon. Since that time the course repository moved here ->
7
7
https://github.com/mehmetozkaya/MicroservicesApp
8
8
9
9
See the overall picture of **implementations on microservices with .net tools** on real-world **e-commerce microservices** project;
There is a couple of microservices which implemented **e-commerce** modules over **Product, Basket** and **Ordering** microservices with **NoSQL (MongoDB, Redis)** and **Relational databases (Sql Server)** with communicating over **RabbitMQ Event Driven Communication** and using **Ocelot API Gateway**.
13
+
There is a couple of microservices which implemented **e-commerce** modules over **Product, 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**.
14
14
15
15
## Whats Including In This Repository
16
16
We have implemented below **features over the run-aspnetcore-microservices repository**.
17
17
18
18
#### Catalog microservice which includes;
19
19
* ASP.NET Core Web API application
20
-
* REST API principles, CRUD operations
21
-
***Mongo DB NoSQL database** connection on docker
22
-
* N-Layer implementation with Repository Pattern
23
-
* Swagger Open API implementation
24
-
* Dockerfile implementation
20
+
* REST API principles, CRUD operations
21
+
***MongoDB database** connection and containerization
22
+
* Repository Pattern Implementation
23
+
* Swagger Open API implementation
25
24
26
25
#### Basket microservice which includes;
27
-
* ASP.NET Core Web API application
28
-
* REST API principles, CRUD operations
29
-
***Redis** connection as a Database on docker
30
-
* Redis connection implementation
31
-
***RabbitMQ trigger event queue** when checkout cart
32
-
* Swagger Open API implementation
33
-
* Dockerfile implementation
34
-
35
-
#### RabbitMQ messaging library which includes;
36
-
* Base **EventBus implementation** and add references Microservices
37
-
38
-
#### Ordering microservice which includes; (over the catalog specs)
39
-
* ASP.NET Core Web API application
40
-
***Entity Framework Core on SQL Server** docker
41
-
* REST API principles, CRUD operations
42
-
***Consuming RabbitMQ** messages
43
-
***Clean Architecture** implementation with CQRS Design Pattern
44
-
* Event Sourcing
45
-
* Implementation of MediatR, Autofac, FluentValidator, AutoMapper
46
-
* Swagger Open API implementation
47
-
* Dockerfile implementation
48
-
49
-
#### API Gateway Ocelot microservice which includes;
50
-
***Routing** to inside microservices
51
-
* Dockerization api-gateway
52
-
53
-
#### WebUI ShoppingApp microservice which includes;
54
-
* Asp.net Core Web Application with Razor template
55
-
* Call **Ocelot APIs** with **HttpClientFactory**
56
-
* Aspnet core razor tools - View Components, partial Views, Tag Helpers, Model Bindings and Validations, Razor Sections etc..
26
+
* ASP.NET Web API application
27
+
* REST API principles, CRUD operations
28
+
***Redis database** connection and containerization
29
+
* Consume Discount **Grpc Service** for inter-service sync communication to calculate product final price
30
+
* Publish BasketCheckout Queue with using **MassTransit and RabbitMQ**
31
+
32
+
#### Discount microservice which includes;
33
+
* ASP.NET **Grpc Server** application
34
+
* Build a Highly Performant **inter-service gRPC Communication** with Basket Microservice
35
+
* 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
38
+
39
+
#### Microservices Communication
40
+
* Sync inter-service **gRPC Communication**
41
+
* Async Microservices Communication with **RabbitMQ Message-Broker Service**
42
+
* Using **RabbitMQ Publish/Subscribe Topic** Exchange Model
43
+
* Using **MassTransit** for abstraction over RabbitMQ Message-Broker system
44
+
* Publishing BasketCheckout event queue from Basket microservices and Subscribing this event from Ordering microservices
45
+
* Create **RabbitMQ EventBus.Messages library** and add references Microservices
46
+
47
+
#### Ordering Microservice
48
+
* Implementing **DDD, CQRS, and Clean Architecture** with using Best Practices
49
+
* Developing **CQRS with using MediatR, FluentValidation and AutoMapper packages**
50
+
* Consuming **RabbitMQ** BasketCheckout event queue with using **MassTransit-RabbitMQ** Configuration
51
+
***SqlServer database** connection and containerization
52
+
* Using **Entity Framework Core ORM** and auto migrate to SqlServer when application startup
53
+
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
59
+
60
+
#### WebUI ShoppingApp Microservice
61
+
* 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
57
76
58
77
#### Docker Compose establishment with all microservices on docker;
59
-
*Dockerization of microservices
60
-
***Dockerization** of database
78
+
*Containerization of microservices
79
+
*Containerization of databases
61
80
* Override Environment variables
62
81
63
82
**Quick DEMO on Youtube -> https://www.youtube.com/watch?v=p6lVqDNUYaY**
@@ -68,30 +87,44 @@ We have implemented below **features over the run-aspnetcore-microservices repos
68
87
You will need the following tools:
69
88
70
89
*[Visual Studio 2019](https://visualstudio.microsoft.com/downloads/)
71
-
*[.Net Core 3.1 or later](https://dotnet.microsoft.com/download/dotnet-core/3.1)
90
+
*[.Net Core 5 or later](https://dotnet.microsoft.com/download/dotnet-core/5)
Follow these steps to get your development environment set up: (Before Run Start the Docker Desktop)
76
95
1. Clone the repository
77
-
2. At the root directory which include **docker-compose.yml** files, run below command:
96
+
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:
97
+
***Memory: 4 GB**
98
+
* CPU: 2
99
+
3. At the root directory which include **docker-compose.yml** files, run below command:
5. Launch http://localhost:8003/ 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**.
107
+
***Catalog API -> http://host.docker.internal:8000/swagger/index.html**
108
+
***Basket API -> http://host.docker.internal:8001/swagger/index.html**
109
+
***Discount API -> http://host.docker.internal:8002/swagger/index.html**
110
+
***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**.
>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`.
127
+
95
128
## The Book - Microservices Architecture and Step by Step Implementation on .NET
96
129
97
130
You can find **Microservices Architecture and Step by Step Implementation on .NET book** which **step by step developing** this repository with extensive explanations and details. This book is the **best path to leverage your .NET skills** in every aspect from beginner to senior level you can benefit to ramp-up faster on **Enterprise Application Development practices** and easy to **Onboarding to Full Stack .Net Core Developer jobs**.
0 commit comments