NET Core, cross-platform lightweight RPC

Source: Internet
Author: User

NET Core, a lightweight RPC:Rabbit.Rpc across platformsfeatures at a glance
  1. Apache License 2.0 Protocol Open source
  2. Supports Client load balancing (provides polling, implementation of random algorithms)
  3. Support Zookeeper and file sharing in the form of service coordination
  4. Run-time Client Agent generation (based on Roslyn)
  5. Pre-build Client Agent
  6. Client Agent pre-build (based on Roslyn)
  7. Abstract codec (provides the implementation of JSON, Protobuffer protocol)
  8. Abstract transport channel (provides porting implementations of Dotnetty and Cowboy.sockets)
  9. Exception message Delivery (local exceptions to the server runtime can be passed to the client)
  10. NET Core Project Architecture
  11. 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:

    1. Service ID Generation
    2. Transport Message Model
    3. Type conversions
    4. Service Route Abstraction
    5. Serializer abstraction (JSON serializer is provided by default)
    6. Transport abstraction
    7. Codec abstraction (a codec implementation that provides JSON by default)
    8. Client runtime (address resolver, address selector, Remote Call service)
    9. 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:

    1. Service Agent Implementation Generation
    2. 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:

    1. Build the service Proxy implementation code file
    2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.