-
Notifications
You must be signed in to change notification settings - Fork 22
Home
Henry edited this page Oct 12, 2019
·
1 revision
组件是基于BeetleX
扩展的远程方法调用,它和我们常用的WebApi
有所不同XRPC
是完全基于二进制的通讯协议,在性能上有着比HTTP
更出色的通讯效能(在一台4核PC上轻松支持数十万RPS的远程方法调用)。
- 支持Linux,Windows等多平台部署
- 支持SSL,可制定更可靠安全的通讯服务
- 支持支持虚拟Actor创建,实现更高效率业务处理模型
- 基于接口来实现服务调用,制定服务更方便
- 支持过虑器定义,轻松实现全局的逻辑控制和管理
Install-Package BeetleX.XRPC
https://github.com/IKende/XRPC/tree/master/Samples
- CPU:E3-1230V2
- 系统:windows 2008 r2
- 内存:16Gb
- 带宽:10Gb
public Task<User> Add(string name, string email, string city, string remark)
{
User user = new User();
user.Name = name;
user.EMail = email;
user.City = city;
user.Remark = remark;
return Task.FromResult(user);
}
public Task<List<User>> List(int count)
{
List<User> result = new List<User>();
for (int i = 0; i < count; i++)
{
User user = new User();
user.ID = Guid.NewGuid().ToString("N");
user.City = "GuangZhou";
user.EMail = "Henryfan@msn.com";
user.Name = "henryfan";
user.Remark = "http://ikende.com";
result.Add(user);
}
return Task.FromResult(result);
}
public Task<bool> Login(string name, string pwd)
{
return (name == "admin" && pwd == "123456").ToTask();
}
详细代码 https://github.com/IKende/XRPC/tree/master/Samples/Performance