Embracing. NET Core, A lightweight RPC:Rabbit.Rpc across platforms

Source: Internet
Author: User
<span id="Label3"></p> <blockquote> <blockquote> <p>Recently published a blog Post. " NET lightweight Rpc framework: RABBIT.RPC ", originally only implemented a very simple function, but also listed the plan after a few days of continuous efforts to rabbit.rpc added a wave of new features, today mainly introduce the status of the Project.</p> </blockquote> </blockquote>Features at a glance <ol> <ol> <li>Apache License 2.0 Protocol Open source</li> <li>Supports client load Balancing (provides polling, implementation of random Algorithms)</li> <li>Support Zookeeper and file sharing in the form of service coordination</li> <li>Run-time Client Agent Generation (based on Roslyn)</li> <li>Pre-build Client Agent</li> <li>Client Agent Pre-build (based on Roslyn)</li> <li>Abstract codec (provides the implementation of json, Protobuffer Protocol)</li> <li>Abstract transport channel (provides porting implementations of Dotnetty and Cowboy.sockets)</li> <li>Exception Message Delivery (local exceptions to the server runtime can be passed to the Client)</li> <li><strong>NET Core Project Architecture</strong></li> <li><strong>Cross-platform</strong></li> </ol> </ol>Project Overview<p><p></p></p> <p><p><strong>Open Source Address:</strong> <strong>https://github.com/RabbitTeam/Rpc</strong></p></p>Rabbit.rpc (cross-platform support)<p><p>The RPC Core class library has the following functions:</p></p> <ol> <ol> <li>Service ID Generation</li> <li>Transport Message Model</li> <li>Type conversions</li> <li>Service Route Abstraction</li> <li>Serializer Abstraction (json Serializer is provided by Default)</li> <li>Transport abstraction</li> <li>Codec Abstraction (a codec implementation that provides JSON by Default)</li> <li>Client runtime (address resolver, address selector, Remote Call Service)</li> <li>Server-side Runtime (service Item management, Service executor, Service Discovery abstraction, rpcserviceattribute Markup Service Discovery Implementation)</li> </ol> </ol>Rabbit.Rpc.ProxyGenerator (cross-platform support)<p><p>The service agent generator, which provides the functionality:</p></p> <ol> <ol> <li>Service Agent Implementation Generation</li> <li>Service Broker Instance Creation</li> </ol> </ol>Extensions (related Extensions) Rabbit.Rpc.Codec.ProtoBuffer (cross-platform support)<p><p>The codec implementation of the Protobuffer Protocol.</p></p>Rabbit.Rpc.Coordinate.Zookeeper (cross-platform support)<p><p>zookeeper-based Service Routing Management.</p></p>Rabbit.Transport.DotNetty (not supported across Platforms)<p><p>dotnetty-based Transport Implementations.</p></p> <p><p><em>Ps: official to have dotnetty support NET core plan, everyone can wait, after the official support, will be adapted as soon as Possible.</em></p></p>Rabbit.Transport.Simple (cross-platform support)<p><p>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.</p></p>Tools Rabbit.Rpc.Tests<p><p>Unit Test Project.</p></p>Rabbit.Rpc.ClientGenerator (cross-platform support)<p><p>A tool for pre-production service agents that provides the following features:</p></p> <ol> <ol> <li>Build the service Proxy implementation code file</li> <li>Build the Service Proxy implementation assembly file</li> </ol> </ol>Performance testing<p><p>Test environment</p></p> <table cellspacing="0" cellpadding="2" width="552" border="1"> <tbody> <tr> <td valign="top" width="145"><p align="center">OS</p></td> <td valign="top" width="87"><p align="center">Cpu</p></td> <td valign="top" width="53"><p align="center">Memory</p></td> <td valign="top" width="68"><p align="center">Hard disk</p></td> <td valign="top" width="115"><p align="center">Network environment</p></td> <td valign="top" width="84"><p align="center">Virtual machines</p></td> </tr> <tr> <td valign="top" width="145"><p align="center">Windows Ten x64</p></td> <td valign="top" width="87"><p align="center">I7 3610QM</p></td> <td valign="top" width="53"><p align="center">16GB</p></td> <td valign="top" width="68"><p align="center">Ssds</p></td> <td valign="top" width="115"><p align="center">127.0.0.1</p></td> <td valign="top" width="84"><p align="center">Whether</p></td> </tr> <tr> <td valign="top" width="145"><p align="center">Ubuntu 16.04 x64</p></td> <td valign="top" width="87"><p align="center">I7 3610QM</p></td> <td valign="top" width="53"><p align="center">4GB</p></td> <td valign="top" width="68"><p align="center">Ssds</p></td> <td valign="top" width="115"><p align="center">127.0.0.1</p></td> <td valign="top" width="84"><p align="center">Is</p></td> </tr> </tbody> </table>Windows10+netcoreapp1.0+json Protocol +simple Transmission<p><p></p></p>Overview <blockquote> <blockquote> <p>Average Time: 2601.6 ms</p> <p>Average time: 0.26 milliseconds</p> <p>by Rate: 100%</p> </blockquote> </blockquote>Windows10+netcoreapp1.0+protobuffer Protocol +simple Transmission<p><p></p></p>Overview <blockquote> <blockquote> <p>Average Time: 2625.4 ms</p> <p>Average time: 0.25 milliseconds</p> <p>by Rate: 100%</p> </blockquote> </blockquote>Ubuntu16.04-x64+netcoreapp1.0+json Protocol +simple Transmission<p><p></p></p>Overview <blockquote> <blockquote> <p>Average Time: 3108.4 ms</p> <p>Average time: 0.31 milliseconds</p> <p>by Rate: 100%</p> </blockquote> </blockquote>Ubuntu16.04-x64+netcoreapp1.0+protobuffer Protocol +simple Transmission<p><p></p></p>Overview <blockquote> <blockquote> <p>Average Time: 3580.4 ms</p> <p>Average time: 0.35 milliseconds</p> <p>by Rate: 100%</p> </blockquote> </blockquote> <p><p><em>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.</em></p></p> <p><p><strong>Test code</strong></p></p> <p><p>Https://github.com/RabbitTeam/Rpc/tree/master/src/examples/performances</p></p>Next?<p><p>Wait for the Dotnetty component to support Netcore and Adapt.</p></p> <p><p>Continue writing RABBIT.RPC related Articles.</p></p> <p><p>The next article should be, <strong>how to run Rabbit.rpc on Ubuntu</strong>.</p></p>Mode of communication<p><p><strong>QQ Group:</strong> <strong>384413261</strong> <strong>(rabbithub)</strong></p></p><p><p><strong>Email:</strong> <strong> <span class="__cf_email__" data-cfemail="91fcf0fbf8f0ffa0a4a8d1fdf8e7f4bff2fefc">[email protected]</span></strong></p></p> <p><p></p></p> <p><p></p></p><p><p>Embracing. NET Core, A lightweight RPC:Rabbit.Rpc across platforms</p></p></span>
Related Article

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.