Skip to content

ipjohnson/EasyRpc

Repository files navigation

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<IntMathService>().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 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

Build status

About

RPC Service and Client for AspNetCore

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published