All Projects → ghorsington → zerorpc-dotnet

ghorsington / zerorpc-dotnet

Licence: MIT license
A .NET implementation of ZeroRPC

Programming Languages

C#
18002 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to zerorpc-dotnet

Rpclib
rpclib is a modern C++ msgpack-RPC server and client library
Stars: ✭ 996 (+4642.86%)
Mutual labels:  rpc, msgpack
Airframe
Essential Building Blocks for Scala
Stars: ✭ 442 (+2004.76%)
Mutual labels:  rpc, msgpack
Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (+4623.81%)
Mutual labels:  rpc, msgpack
Rpc.py
A fast and powerful RPC framework based on ASGI/WSGI.
Stars: ✭ 98 (+366.67%)
Mutual labels:  rpc, msgpack
zero
Zero: A simple, fast, high performance and low latency Python framework (RPC + PubSub) for building microservices or distributed servers
Stars: ✭ 296 (+1309.52%)
Mutual labels:  zeromq, rpc
rmp-rpc
a msgpack-rpc rust library based on tokio
Stars: ✭ 45 (+114.29%)
Mutual labels:  rpc, msgpack
Sleuth
A Go library for master-less peer-to-peer autodiscovery and RPC between HTTP services
Stars: ✭ 331 (+1476.19%)
Mutual labels:  zeromq, rpc
callosum
An RPC Transport Library for asyncio
Stars: ✭ 17 (-19.05%)
Mutual labels:  zeromq, rpc
Discord-Netflix
A updated and improved version from the original Discord-Netflix from Nirewen.
Stars: ✭ 26 (+23.81%)
Mutual labels:  rpc
PyDFS
Tiny distributed file system like HDFS (and of-course GFS)
Stars: ✭ 68 (+223.81%)
Mutual labels:  rpc
CoreRemoting
RPC library with classic .NET Remoting flavour
Stars: ✭ 23 (+9.52%)
Mutual labels:  rpc
yar-c
Yar C Framework
Stars: ✭ 107 (+409.52%)
Mutual labels:  rpc
twjitm-core
采用Netty信息加载实现长连接实时通讯系统,客户端可以值任何场景,支持实时http通讯、webSocket通讯、tcp协议通讯、和udp协议通讯、广播协议等 通过http协议,rpc协议。 采用自定义网络数据包结构, 实现自定义网络栈。
Stars: ✭ 98 (+366.67%)
Mutual labels:  rpc
rpc
Go stdlib net/rpc with context.Context support
Stars: ✭ 28 (+33.33%)
Mutual labels:  rpc
hprose-as3
Hprose for ActionScript 3.0
Stars: ✭ 18 (-14.29%)
Mutual labels:  rpc
dubbo.js
No description or website provided.
Stars: ✭ 23 (+9.52%)
Mutual labels:  rpc
ws-promise
A tiny, Promise-based WebSocket protocol allowing request-response usage in ECMAScript
Stars: ✭ 20 (-4.76%)
Mutual labels:  rpc
re-gent
A Distributed Clojure agent for running remote functions
Stars: ✭ 18 (-14.29%)
Mutual labels:  zeromq
ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (+319.05%)
Mutual labels:  msgpack
wsapix
Next generation Websocket framework for nodejs
Stars: ✭ 17 (-19.05%)
Mutual labels:  rpc

ZeroRPC.NET

Build status

ZeroRPC.NET is a 100% CIL implementation of zerorpc, a simple library for communication and Remote Procedure Calls between distributed processes.

Current version of ZeroRPC.NET supports .NET Framework 3.5 and zerorpc version 3.

The API and core logic were mimicked off zerorpc-node, but modified to work within .NET.

Features

  • Supports .NET 3.5 and Unity
  • Simple API for zeroservices through IService interface
  • Replaceable paramter/return value (de)serializer
  • Synchronous method invoking w/ first-class exceptions
  • Asynchronous invoking through callbacks

Current progress

As of right now, the library is in early beta stage: no official release is available, some useful client-side extensions are missing and not everything has been tested properly yet. However, the library is capable of successfully communicating with zeroservices written in both Python and Node.JS.

Basic example

Server

using ZeroRpc.Net;
using ZeroRpc.Net.ServiceProviders;

namespace ClientExample 
{
    public class ExampleService
    {
        [MethodDocumentation("Echoes the provided string back")]
        public string Echo(string str)
        {
            return str;
        }
    }

    public class ServerShowcase
    {
        public static void Main(string[] args) 
        {
            // ZeroRPC.NET provides a built-in zeroservice that exposes the methods in a provided object
            SimpleWrapperService<ExampleService> service = new SimpleWrapperService<ExampleService>(new ExampleService());

            Server s = new Server(service);

            // Bind the server to local host port 1234
            // The server will provide its zeroservice through TCP
            s.Bind("tcp://127.0.0.1:1234");
            Console.WriteLine("Now serving at 127.0.0.1:1234!");

            // Most errors are fired asynchronously as to not prevent the main data flow
            s.Error += (s, args) => Console.WriteLine(errorArgs.Info);

            // Prevent the console from closing, since Bind returns immediately
            Console.ReadKey();

            // Dispose of the server in the end.
            s.Dispose();
        }
    }
}

Client

using ZeroRpc.Net;

namespace ClientExample 
{
    public class ClientShowcase
    {
        public static void Main(string[] args)
        {
            Client c = new Client();

            // Most errors are fired asynchronously as to not prevent the main data flow
            c.Error += (s, errorArgs) => Console.WriteLine(errorArgs.Info);

            // Connect to a local zeroservice on port 1234 through TCP
            c.Connect("tcp://127.0.0.1:1234");

            // Supports simple synchronous calls with first class exceptions

            try 
            {
                Console.WriteLine(c.Invoke<string>("Echo", "Hello, world!"));
            } catch (RemoteException re) 
            {
                Console.WriteLine($"Error: {re.ErrorName}");
                Console.WriteLine($"Remote stack trace: {re.RemoteStackTrace}");
            }

            // Dispose of the client in the end.
            c.Dispose();
        }
    }
}
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].