NET Core, a lightweight RPC:Rabbit.Rpc across platformsfeatures at a glance
- Apache License 2.0 Protocol Open source
- Supports Client load balancing (provides polling, implementation of random algorithms)
- Support Zookeeper and file sharing in the form of service coordination
- Run-time Client Agent generation (based on Roslyn)
- Pre-build Client Agent
- Client Agent pre-build (based on Roslyn)
- Abstract codec (provides the implementation of JSON, Protobuffer protocol)
- Abstract transport channel (provides porting implementations of Dotnetty and Cowboy.sockets)
- Exception message Delivery (local exceptions to the server runtime can be passed to the client)
- NET Core Project Architecture
- Cross-platform
Project Overview
Open Source Address: https://github.com/RabbitTeam/Rpc
Rabbit.rpc (cross-platform support)
The RPC Core class library has the following functions:
- Service ID Generation
- Transport Message Model
- Type conversions
- Service Route Abstraction
- Serializer abstraction (JSON serializer is provided by default)
- Transport abstraction
- Codec abstraction (a codec implementation that provides JSON by default)
- Client runtime (address resolver, address selector, Remote Call service)
- Server-side Runtime (Service item management, service executor, Service Discovery Abstraction, Rpcserviceattribute Markup Service discovery implementation)
Rabbit.Rpc.ProxyGenerator (cross-platform support)
The service agent generator, which provides the functionality:
- Service Agent Implementation Generation
- Service Broker Instance Creation
extensions (related extensions)Rabbit.Rpc.Codec.ProtoBuffer (cross-platform support)
The codec implementation of the Protobuffer protocol.
Rabbit.Rpc.Coordinate.Zookeeper (cross-platform support)
Zookeeper-based service routing management.
Rabbit.Transport.DotNetty (not supported across platforms)
Dotnetty-based transport implementations.
PS: Official to have dotnetty support net core plan, everyone can wait, after the official support, will be adapted as soon as possible.
Rabbit.Transport.Simple (cross-platform support)
Because Dotnetty does not support cross-platform operation, in order to allow RPC to run on other platforms, the "Cowboy.sockets" has been ported to achieve a simple transmission implementation.
ToolsRabbit.Rpc.Tests
Unit test Project.
Rabbit.Rpc.ClientGenerator (cross-platform support)
A tool for pre-production service agents that provides the following features:
- Build the service Proxy implementation code file
- Build the Service Proxy implementation assembly file
Performance Testing
Test environment
os |
cpu |
memory |
hard disk |
network environment |
virtual machine |
windows 10 x64 |
|
|
|
|
Ubuntu 16.04 x64 |
I7 3610QM |
4GB |
Ssds |
127.0.0.1 |
Is |
Windows10+netcoreapp1.0+json Protocol +simple transmission
Overview
Average Time: 2601.6 ms
Average time: 0.26 milliseconds
by rate: 100%
Windows10+netcoreapp1.0+protobuffer Protocol +simple transmission
Overview
Average Time: 2625.4 ms
Average time: 0.25 milliseconds
by rate: 100%
Ubuntu16.04-x64+netcoreapp1.0+json Protocol +simple transmission
Overview
Average Time: 3108.4 ms
Average time: 0.31 milliseconds
by rate: 100%
Ubuntu16.04-x64+netcoreapp1.0+protobuffer Protocol +simple transmission
Overview
Average Time: 3580.4 ms
Average time: 0.35 milliseconds
by rate: 100%
Ps:linux performance and performance on Windows have some gaps, do not know is not the cause of the virtual machine, but there is an interesting phenomenon, protobuffer performance on Linux than JSON, should be Protobuffer library implementation is not good enough.
Test code
Https://github.com/RabbitTeam/Rpc/tree/master/src/examples/performances
Next step?
Wait for the Dotnetty component to support Netcore and adapt.
Continue writing RABBIT.RPC related articles.
The next article should be, how to run Rabbit.rpc on Ubuntu.
NET Core, cross-platform lightweight RPC