Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dotnetcore/surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
https://github.com/dotnetcore/surging
apigateway apollo consul dns-server grpc json-serialization kafka kestrel log4net memorycache messagepack microservices nlog protobuffer rabbitmq redis skywalking surging swagger zookeeper
Last synced: about 1 month ago
JSON representation
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
- Host: GitHub
- URL: https://github.com/dotnetcore/surging
- Owner: fanliang11
- License: mit
- Created: 2017-06-16T13:17:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T09:23:04.000Z (6 months ago)
- Last Synced: 2024-10-29T14:53:44.214Z (about 1 month ago)
- Topics: apigateway, apollo, consul, dns-server, grpc, json-serialization, kafka, kestrel, log4net, memorycache, messagepack, microservices, nlog, protobuffer, rabbitmq, redis, skywalking, surging, swagger, zookeeper
- Language: C#
- Homepage:
- Size: 27.2 MB
- Stars: 3,242
- Watchers: 304
- Forks: 924
- Open Issues: 252
-
Metadata Files:
- Readme: README.EN.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-dotnet-core - surging - Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS, Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, Hash Algorithms, random, polling, pressure minimum priority as a load balancing algorithm, built-in service governance to ensure reliable RPC communication. (Frameworks, Libraries and Tools / Application Frameworks)
- awesome-dotnet-core - surging - Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS, Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, Hash Algorithms, random, polling, pressure minimum priority as a load balancing algorithm, built-in service governance to ensure reliable RPC communication. (Frameworks, Libraries and Tools / Application Frameworks)
- awesome-dotnet-core - surging - Surging是一种微服务引擎,提供了轻量级,高性能的模块化RPC请求管道。服务引擎支持http,TCP,WS,Mqtt,UDP和DNS协议。它使用ZooKeeper和Consul作为注册表,使用哈希算法,随机,轮询,压力最小优先级作为负载平衡算法,内置服务管理以确保可靠的RPC通信。 (框架, 库和工具 / 应用程序框架)
README
# surging [中文](https://github.com/dotnetcore/surging/blob/master/README.md)
[![Member project of .NET Core Community](https://img.shields.io/badge/member%20project%20of-NCC-9e20c9.svg)](https://github.com/dotnetcore)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://mit-license.org/)
# surging is a distributed micro service framework that provides high-performance RPC remote service calls, using Zookeeper, Consul as the registration center for surging services, integrating hash, random, polling as a load balancing algorithm, RPC integration using the netty framework, Using asynchronous transmission.### Architecture:
### Start configuration:
```c#
var host = new ServiceHostBuilder()
.RegisterServices(builder =>
{
builder.AddMicroService(option =>
{
option.AddServiceRuntime();//
// option.UseZooKeeperManager(new ConfigInfo("127.0.0.1:2181")); //Using a Zookeeper management
option.UseConsulManager(new ConfigInfo("127.0.0.1:8500"));//Use the Consul management
option.UseDotNettyTransport();//Use Netty transmission
option.UseRabbitMQTransport();//Use the rabbitmq transmission
option.AddRabbitMQAdapt();//Based on the consumption of the rabbitmq service adaptation
builder.Register(p => new CPlatformContainer(ServiceLocator.Current));//Initializes the injection container
});
})
.SubscribeAt() //News Feeds
.UseServer("127.0.0.1", 98)
//.UseServer("127.0.0.1", 98,“true”) //Automatically generate Token
//.UseServer("127.0.0.1", 98,“123456789”) //Fixed password Token
.UseLog4net("Configs/log4net.config") //Use log4net to generate the log
.UseLog4net() //Use log4net to generate the log
.UseStartup()
.Build();
using (host.Run())
{
Console.WriteLine($"The server startup success,{DateTime.Now}。");
}
```
Subscription function:
```c#
ServiceLocator.GetService< ISubscriptionAdapt >().SubscribeAt();
```
Increase service fault-tolerant, fault-tolerant forcibly demote demotion and service* Increase the fault tolerance strategy Injection, the local module injection:
```c#
[Command(Strategy= StrategyType.Injection ,Injection = @"return null;")]
```
```C#
[Command(Strategy= StrategyType.Injection ,Injection = @"return
Task.FromResult(new Surging.IModuleServices.Common.Models.UserModel
{
Name=""fanly"",
Age=18
});",InjectionNamespaces =new string[] { "Surging.IModuleServices.Common"})]
```* Increase Injection fault-tolerant strategy, local Injection module:
```C#
[Command(Strategy= StrategyType.Injection ,Injection = @"return true;")]
```
Increase the cache relegation, how to use?
Add the following features in the business interface methods```C#
[Command(Strategy= StrategyType.Failover,FailoverCluster =3,RequestCacheEnabled =true)] //RequestCacheEnabled =true Is to enable the cache
```
How to intercept access to cache?
Add the following features in the business interface methods
```C#
[InterceptMethod(CachingMethod.Get, Key = "GetUser_id_{0}", Mode = CacheTargetType.Redis, Time = 480)]
```
How to intercept the delete cache?
Add the following features in the business interface methods
```C#
[InterceptMethod(CachingMethod.Remove, "GetUser_id_{0}", "GetUserName_name_{0}", Mode = CacheTargetType.Redis)]
```
How to add the cache KEY
On the business model attribute to add, the following features, can support multiple
```C#
[CacheKey(1)]
```
Configuring Interceptors
```C#
.AddClientIntercepted(typeof(CacheProviderInterceptor))
```IDE:Visual Studio 2017 15.3 Preview ,vscode
The framework:.NET core 2.0
如有任何问题可以加入QQ群:542283494 Gitter:not room
[Blog]:https://www.cnblogs.com/fanliang11