Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Microservices on .NET platforms used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12

License

NotificationsYou must be signed in to change notification settings

aspnetrun/run-aspnetcore-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository ->https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=MAYY25

See the overall picture ofimplementations on microservices with .net tools on real-worlde-commerce microservices project;

microservices

There is a couple of microservices which implementede-commerce modules overCatalog, Basket, Discount andOrdering microservices withNoSQL (DocumentDb, Redis) andRelational databases (PostgreSQL, Sql Server) with communicating overRabbitMQ Event Driven Communication and usingYarp API Gateway.

Check Explanation of this Repository on Medium

Whats Including In This Repository

We have implemented belowfeatures over the run-aspnetcore-microservices repository.

Catalog microservice which includes;

  • ASP.NET Core Minimal APIs and latest features of .NET8 and C# 12
  • Vertical Slice Architecture implementation with Feature folders and single .cs file includes different classes in one file
  • CQRS implementation using MediatR library
  • CQRS Validation Pipeline Behaviors with MediatR and FluentValidation
  • Use Marten library for .NET Transactional Document DB on PostgreSQL
  • Use Carter for Minimal API endpoint definition
  • Cross-cutting concerns Logging, Global Exception Handling and Health Checks

Basket microservice which includes;

  • ASP.NET 8 Web API application, Following REST API principles, CRUD
  • UsingRedis as aDistributed Cache over basketdb
  • Implements Proxy, Decorator and Cache-aside patterns
  • Consume DiscountGrpc Service for inter-service sync communication to calculate product final price
  • Publish BasketCheckout Queue with usingMassTransit and RabbitMQ

Discount microservice which includes;

  • ASP.NETGrpc Server application
  • Build a Highly Performantinter-service gRPC Communication with Basket Microservice
  • Exposing Grpc Services with creatingProtobuf messages
  • Entity Framework Core ORM — SQLite Data Provider and Migrations to simplify data access and ensure high performance
  • SQLite database connection and containerization

Microservices Communication

  • Sync inter-servicegRPC Communication
  • Async Microservices Communication withRabbitMQ Message-Broker Service
  • UsingRabbitMQ Publish/Subscribe Topic Exchange Model
  • UsingMassTransit for abstraction over RabbitMQ Message-Broker system
  • Publishing BasketCheckout event queue from Basket microservices and Subscribing this event from Ordering microservices
  • CreateRabbitMQ EventBus.Messages library and add references Microservices

Ordering Microservice

  • ImplementingDDD, CQRS, and Clean Architecture with using Best Practices
  • DevelopingCQRS with using MediatR, FluentValidation and Mapster packages
  • ConsumingRabbitMQ BasketCheckout event queue with usingMassTransit-RabbitMQ Configuration
  • SqlServer database connection and containerization
  • UsingEntity Framework Core ORM and auto migrate to SqlServer when application startup

Yarp API Gateway Microservice

  • Develop API Gateways withYarp Reverse Proxy applying Gateway Routing Pattern
  • Yarp Reverse Proxy Configuration; Route, Cluster, Path, Transform, Destinations
  • Rate Limiting with FixedWindowLimiter on Yarp Reverse Proxy Configuration

WebUI ShoppingApp Microservice

  • ASP.NET Core Web Application with Bootstrap 4 and Razor template
  • CallYarp APIs with Refit HttpClientFactory

Docker Compose establishment with all microservices on docker;

  • Containerization of microservices
  • Containerization of databases
  • Override Environment variables

Run The Project

You will need the following tools:

Installing

Follow these steps to get your development environment set up: (Before Run Start the Docker Desktop)

  1. Clone the repository
  2. Once Docker for Windows is installed, go to theSettings > Advanced option, from the Docker icon in the system tray, to configure the minimum amount of memory and CPU like so:
  • Memory: 4 GB
  • CPU: 2
  1. At the root directory of solution, selectdocker-compose andSet a startup project.Run docker-compose without debugging on visual studio.Or you can go to root directory which includedocker-compose.yml files, run below command:
docker-compose-f docker-compose.yml-f docker-compose.override.yml up-d
  1. 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)

  2. LaunchShopping Web UI ->https://localhost:6065 in your browser to view index page. You can use Web project in order tocall microservices over Yarp API Gateway. When youcheckout the basket you can followqueue record on RabbitMQ dashboard.

mainscreen2

Authors

See also the list ofcontributors who participated in this project. Check alsogihtub page of repository.

About

Microservices on .NET platforms used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp