• Stars
    star
    132
  • Rank 272,951 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A microservice project using .NET Core 2.0, DDD, CQRS, Event Sourcing, Redis and RabbitMQ

Library

A microservice project using .NET Core 2.0, DDD, CQRS, Event Sourcing, Redis and RabbitMQ.

Components

Components

System Architecture

System Architecture

Prerequisites

  • Visual Studio 2017 (For development and debug propose)
  • RabbitMQ
  • Redis
  • Consul (Service Discovery and registeration)
  • Consult Template (Update and Restart Nginx)
  • Nginx (For Load Balance)
  • MongoDB (For Event Store)

EDA

EDA

Service Discovery

We will use the Nginx, Consul, Consul Template to create an service discovery and service registeration mechanism.

Service Discovery

  • The nginx will do the load balance work.
  • All the web or api instances will be registered in the consul server with the SelfRegister method.
  • Consul template will listen the consul server, if there is new instance, consul template will update the nginx.conf with assigned template and restart the nginx server, so the new instance will be connected with the nginx server correctly

Use the Log service as an example.

public void SelfRegister()
{
    var serviceDiscovery = InjectContainer.GetInstance<IServiceDiscovery>();
    serviceDiscovery.RegisterService(new Infrastructure.Operation.Core.Models.Service
    {
        Port = 5003,
        ServiceName = "LogService",
        Tag = "Microservice API"
    });

    Console.WriteLine("Register to consul successfully.");
}

More Repositories

1

CoolCat

A sample about how to create a dynamic plugins mechanism with ASP.NET Core Mvc at runtime. This sample is based on .NET Core 3.1 and .NET 5
C#
336
star
2

EventHandlerInSingleApplication

A sample project about how to create event subscribe/publish feature in single application in asp.net core
C#
22
star
3

GraphQL_Blogs

翻译总结http://fiyazhasan.me/graphql-with-asp-net-core/
JavaScript
21
star
4

Sample_MiniProfiler

A sample how to use the MiniProfiler to profiling ASP.NET Core WebApi
C#
16
star
5

webapi-logger

a logger application based on ASP.NET Core WebApi via RabbitMQ, Azure Service Bus and etc
C#
12
star
6

ObjectEquality

A open-source library to compare whether two object are same in C#
C#
11
star
7

DynamicInjection

使用Autofac动态注入Api服务
C#
8
star
8

StreamingInSignalR

A project to show how to use data-streaming in SignalR
JavaScript
8
star
9

FluentValidationExample

An example for how to FluentValidation in ASP.NET Core WebApi
C#
7
star
10

LamondLu.EmailClient

A email client built with Mailkit under .NET 8
C#
6
star
11

AzureFileProvider

A library to use Azure File Storage as File Provider in ASP.NET Core
C#
6
star
12

CompressedStaticFileSample

A sample about how to enable compressed static file in ASP.NET Core
C#
4
star
13

Sample_DownloadFileInAuth

A sample for download file with bearer token in .NET Core
C#
3
star
14

EntityFrameworkCoreAuditSample

C#
3
star
15

EFCoreFindSample

A sample about how to use find method to load the new added item from change tracker.
C#
2
star
16

AWSS3FileProvider

a library for exposing object in the AWS S3 bucket to the ASP.NET Core Application with IFileProvider
C#
2
star
17

angular-t87ruz

Created with StackBlitz ⚡️
TypeScript
2
star
18

CLR.MessageService

A common service for message notification with SignalR
C#
2
star
19

EventHandlerInDistributedProject

A sample of how to add event handler in distributed project with RabbitMQ and ASP.NET Core
C#
1
star
20

LamondLu.DynamicConfiguration

A project to manage and load the configuration without appsettings.json
C#
1
star
21

PollyLearning

A project to learn the Polly
C#
1
star
22

dynamic_form

An open-source project for dynamic form builder
CSS
1
star
23

lamondlu

1
star
24

LoadConfigurationFromCloud

A sample project about thow to use Parameter Store in AWS Service and App Configuration in Azure to store the app configurations
C#
1
star
25

Sample_TestHttpClient

C#
1
star