All Projects → Coldairarrow → Dotnettyrpc

Coldairarrow / Dotnettyrpc

Licence: apache-2.0
A RPC Framework Based On DotNetty

Projects that are alternatives of or similar to Dotnettyrpc

Samples-NET.Core-MVC-CSharp
ASP.NET Core 2.0 MVC C# samples for Stimulsoft Reports.Web reporting tool.
Stars: ✭ 28 (-81.7%)
Mutual labels:  core, net
CoreRemoting
RPC library with classic .NET Remoting flavour
Stars: ✭ 23 (-84.97%)
Mutual labels:  core, rpc
tortuga
A modern game engine built using dot net core
Stars: ✭ 14 (-90.85%)
Mutual labels:  core, net
Cauldron
C# Toolkit
Stars: ✭ 27 (-82.35%)
Mutual labels:  core, net
Sharer
Arduino & .NET serial communication library to read/write variables and remote call functions using the Sharer protocol. Works on Windows, Linux and MacOS.
Stars: ✭ 21 (-86.27%)
Mutual labels:  rpc, net
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-90.85%)
Mutual labels:  core, net
Entrypoint
Composable CLI Argument Parser for all modern .Net platforms.
Stars: ✭ 136 (-11.11%)
Mutual labels:  core, net
ASP.NET-Core-2-MVC-CRUD-datatables-jQuery-Plugin
Asp.Net Example implementation of datatables.net using Asp.Net Core 2 Mvc CRUD datatables jQuery Plugin
Stars: ✭ 25 (-83.66%)
Mutual labels:  core, net
Sapphiredb
SapphireDb Server, a self-hosted, easy to use realtime database for Asp.Net Core and EF Core
Stars: ✭ 326 (+113.07%)
Mutual labels:  core, net
Raft.net
Implementation of RAFT distributed consensus algorithm among TCP Peers on .NET / .NETStandard / .NETCore / dotnet
Stars: ✭ 112 (-26.8%)
Mutual labels:  core, net
Raptor
拍拍贷微服务rpc框架
Stars: ✭ 139 (-9.15%)
Mutual labels:  rpc
Autocser
AutoCSer is a high-performance RPC framework. AutoCSer 是一个以高效率为目标向导的整体开发框架。主要包括 TCP 接口服务框架、TCP 函数服务框架、远程表达式链组件、前后端一体 WEB 视图框架、ORM 内存索引缓存框架、日志流内存数据库缓存组件、消息队列组件、二进制 / JSON / XML 数据序列化 等一系列无缝集成的高性能组件。
Stars: ✭ 140 (-8.5%)
Mutual labels:  rpc
Blog
一般不会写 API 类文章,努力写有营养的文章,喜欢请点 star
Stars: ✭ 146 (-4.58%)
Mutual labels:  rpc
Rpg Core
UNITY engine RPG framework
Stars: ✭ 146 (-4.58%)
Mutual labels:  core
Noproto
Flexible, Fast & Compact Serialization with RPC
Stars: ✭ 138 (-9.8%)
Mutual labels:  rpc
Incubator Brpc
Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services. "brpc" means "better RPC".
Stars: ✭ 12,655 (+8171.24%)
Mutual labels:  rpc
E200 opensource
This repository hosts the project for open-source hummingbird E203 RISC processor Core.
Stars: ✭ 1,909 (+1147.71%)
Mutual labels:  core
Rxcore
开发框架基于RxJava2+Retrofit2
Stars: ✭ 135 (-11.76%)
Mutual labels:  core
Mango
A high-performance, open-source java RPC framework.
Stars: ✭ 150 (-1.96%)
Mutual labels:  rpc
Goworld
Scalable Distributed Game Server Engine with Hot Swapping in Golang
Stars: ✭ 2,007 (+1211.76%)
Mutual labels:  rpc

DotNettyRPC

1.简介

DotNettyRPC是一个基于DotNetty的跨平台RPC框架,支持.NET45以及.NET Standard2.0

2.产生背景

传统.NET开发中遇到远程调用服务时,多以WCF为主。而WCF虽然功能强大,但是其配置复杂,不易于上手。而且未来必定是.NET Core的天下,WCF暂不支持.NET Core(只有客户端,无法建立服务端)。市面上的其他.NET的 RPC框架诸如gRPC、surging甚至微服务框架Orleans等,这些框架功能强大,性能也很好,并且比较成熟,但是使用起来不够简单。基于上述比较(无任何吹捧贬低的意思),鄙人不才撸了一个轮子DotNettyRPC,它的定位是一个跨平台(.NET45和.NET Standard)、简单却实用的RPC框架

3.使用方法

3.1引入DotNettyRPC

打开Nuget包管理器,搜索DotNettyRPC即可找到并使用

或输入Nuget命令:Install-Package DotNettyRPC

3.2定义服务接口

    public interface IHello
    {
        string SayHello(string msg);
    }
	
    public class Hello : IHello
    {
        public string SayHello(string msg)
        {
            return msg;
        }
    }

3.3服务端

using Coldairarrow.DotNettyRPC;
using Common;
using System;

namespace Server
{
    class Program
    {
        static void Main(string[] args)
        {
            RPCServer rPCServer = new RPCServer(9999);
            rPCServer.RegisterService<IHello, Hello>();
            rPCServer.Start();

            Console.ReadLine();
        }
    }
}

3.4客户端

using Coldairarrow.DotNettyRPC;
using Common;
using System;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
            IHello client = RPCClientFactory.GetClient<IHello>("127.0.0.1", 9999);
            var msg = client.SayHello("Hello");
            Console.WriteLine(msg);
            Console.ReadLine();
        }
    }
}

3.5运行

先运行服务端,再运行客户端,即可在客户端输出Hello

4.结语

本机测试一次RPC请求平均0.4ms左右,性能不高,但是足以应对绝大多数业务场景,重在简单实用。可以优化的地方很多,还望大家多多支持。

GitHub地址:https://github.com/Coldairarrow/DotNettyRPC

QQ群:373144077

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].