Skip to content

high performance dotnet core google protobuf rpc,supports millions of communication

License

Notifications You must be signed in to change notification settings

beetlex-io/BeetleX.Light.gpRPC

Repository files navigation

BeetleX.Light.gpRPC

high performance dotnet core google protobuf rpc,supports millions of rps communication

server

RpcServer<ApplicationBase> server = new RpcServer<ApplicationBase>();
server.Options.SetDefaultListen(o =>
{
    o.Port = 8080;
});
server.RegisterMessages<RegisterReq>();
server.Options.AddLogOutputHandler<LogOutputToConsole>();
server.Options.LogLevel = LogLevel.Trace;
server.Start();
await Task.Delay(3000);

client

RpcClient client = "tcp://localhost:8080";
client.AddLogOutputHandler<LogOutputToConsole>();
client.RegisterMessages<RegisterReq>();
client.LogLevel = LogLevel.Trace;
IUserHandler handler = client.Create<IUserHandler>();
RegisterReq req = new RegisterReq();
req.Address = $"guangzhouLongdong";
req.City = $"guzngzhou";
req.Email = "henryfan@msn.com";
req.FirstName = $"fan";
req.LastName = $"henry";
req.Password = "122";
var resp = await handler.Register(req);

performance

Test hardware: 32-core cloud server, 100Gb network

1 connection 100 concurrency

image

20 connections 2000 concurrency

image

About

high performance dotnet core google protobuf rpc,supports millions of communication

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages