https://github.com/ipjohnson/easyrpc
RPC Service and Client for AspNetCore
https://github.com/ipjohnson/easyrpc
aspnetcore json-rpc-server
Last synced: 10 months ago
JSON representation
RPC Service and Client for AspNetCore
- Host: GitHub
- URL: https://github.com/ipjohnson/easyrpc
- Owner: ipjohnson
- License: mit
- Created: 2017-02-19T04:09:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:21:20.000Z (over 3 years ago)
- Last Synced: 2025-08-14T17:13:00.872Z (10 months ago)
- Topics: aspnetcore, json-rpc-server
- Language: C#
- Homepage:
- Size: 6.9 MB
- Stars: 95
- Watchers: 2
- Forks: 12
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EasyRpc
Adds rpc service support to AspNetCore
```
public void ConfigureServices(IServiceCollection services)
{
services.AddRpcServices();
}
public void Configure(IApplicationBuilder app)
{
app.UseRpcServices(api =>
{
// simple web method at /Status
api.Method.Get("/Status", () => new { status = "Ok"});
// Expose methods at /IntMath
api.Expose().As("IntMath");
});
}
public class IntMathService
{
// expose web api POST /IntMath/Add expecting {"a":int,"b":int}
public int Add(int a, int b)
{
return a + b;
}
}
```
### Features
EasyRpc allow developers to write business related classes and host them as remote procedure calls.
In essence developers focus on writing services that fullfil requirements vs. writing RESTful services
that require the developer to think about which verbs they want to use.
* Performs faster than MVC as seen in [these](https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=json&p=zik0zj-zik0zj-zijocf-zik0zj-v&c=6) 3rd party benchmarks
* Services participate in Asp.Net Core dependency injection framework
* Integrates with Asp.Net Core authorization schemes including Roles & Polices
* Built in data context idea that can be used to fetch and save data into header
* Filter support similar to Asp.Net filter (not exactly the same as no controller is ever created)
* Support for request/response gzip compression, br compression
* Built in Swagger UI
### Build
[](https://ci.appveyor.com/project/ipjohnson/easyrpc)