All Projects → rpclib → Rpclib

rpclib / Rpclib

Licence: other
rpclib is a modern C++ msgpack-RPC server and client library

Programming Languages

cpp
1120 projects
cplusplus
227 projects
cpp14
131 projects

Projects that are alternatives of or similar to Rpclib

Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (-0.4%)
Mutual labels:  rpc, msgpack
rmp-rpc
a msgpack-rpc rust library based on tokio
Stars: ✭ 45 (-95.48%)
Mutual labels:  rpc, msgpack
zerorpc-dotnet
A .NET implementation of ZeroRPC
Stars: ✭ 21 (-97.89%)
Mutual labels:  rpc, msgpack
Rpc.py
A fast and powerful RPC framework based on ASGI/WSGI.
Stars: ✭ 98 (-90.16%)
Mutual labels:  rpc, msgpack
Airframe
Essential Building Blocks for Scala
Stars: ✭ 442 (-55.62%)
Mutual labels:  rpc, msgpack
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-97.59%)
Mutual labels:  rpc
Takinrpc
RPC框架,基于netty,实现了远程调用、服务治理等功能
Stars: ✭ 13 (-98.69%)
Mutual labels:  rpc
Libra Sdk Go
Go SDK for the Libra cryptocurrency
Stars: ✭ 23 (-97.69%)
Mutual labels:  rpc
Openerp Proxy
Provides interface similar to Odoo / OpenERP internal code to perform operations on Odoo / OpenERP objects remotely using XML-RPC or JSON-RPC behind.
Stars: ✭ 17 (-98.29%)
Mutual labels:  rpc
Fusio
Open source API management platform
Stars: ✭ 946 (-5.02%)
Mutual labels:  rpc
Grpc
An Elixir implementation of gRPC
Stars: ✭ 858 (-13.86%)
Mutual labels:  rpc
Bgpmon
CSU's BGP Observatory code (bgpmon/pheme)
Stars: ✭ 25 (-97.49%)
Mutual labels:  rpc
Deepstream.io
deepstream.io server
Stars: ✭ 6,947 (+597.49%)
Mutual labels:  rpc
Scalecube Services
v2.0 - ScaleCube Services provides a low latency Reactive Microservices library for serverless service registry and discovery based on gossip protocol and without single point-of-failure or bottlenecks.
Stars: ✭ 23 (-97.69%)
Mutual labels:  rpc
Goridge
High-performance PHP-to-Golang IPC bridge
Stars: ✭ 950 (-4.62%)
Mutual labels:  rpc
Rpc Thunderdome
A comparison between Proteus RPC and other commonly used RPC frameworks
Stars: ✭ 22 (-97.79%)
Mutual labels:  rpc
Go Zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
Stars: ✭ 13,156 (+1220.88%)
Mutual labels:  rpc
Cli Chat
Cli-chat. Try it out ~
Stars: ✭ 15 (-98.49%)
Mutual labels:  rpc
Xdrpp
Stars: ✭ 7 (-99.3%)
Mutual labels:  rpc
Twjitm
项目基于idea工作环境搭建的框架,添加mybatis3,spring4,springmvc4,以及redis。主要实现通过注解和反射自定义netty私有协议栈,实现在一条socket通道上传递不同的消息,采用支持tcp,udp和http协议
Stars: ✭ 26 (-97.39%)
Mutual labels:  rpc

rpclib MIT Build Status Build status Coverage Status Coverity Gitter

waffle

rpclib is a RPC library for C++, providing both a client and server implementation. It is built using modern C++14, and as such, requires a recent compiler. Main highlights:

  • Expose functions of your program to be called via RPC (from any language implementing msgpack-rpc)
  • Call functions through RPC (of programs written in any language)
  • No IDL to learn
  • No code generation step to integrate in your build, just C++

Look&feel

Server

#include <iostream>
#include "rpc/server.h"

void foo() {
    std::cout << "foo was called!" << std::endl;
}

int main(int argc, char *argv[]) {
    // Creating a server that listens on port 8080
    rpc::server srv(8080);

    // Binding the name "foo" to free function foo.
    // note: the signature is automatically captured
    srv.bind("foo", &foo);

    // Binding a lambda function to the name "add".
    srv.bind("add", [](int a, int b) {
        return a + b;
    });

    // Run the server loop.
    srv.run();

    return 0;
}

When srv.run() is called, rpclib starts the server loop which listens to incoming connections and tries to dispatch calls to the bound functions. The functions are called from the thread where run was called from. There is also async_run that spawns worker threads and returns immediately.

Client

#include <iostream>
#include "rpc/client.h"

int main() {
    // Creating a client that connects to the localhost on port 8080
    rpc::client client("127.0.0.1", 8080);

    // Calling a function with paramters and converting the result to int
    auto result = client.call("add", 2, 3).as<int>();
    std::cout << "The result is: " << result << std::endl;
    return 0;
}

Status

All planned 1.0.0 features are done and tested; the current state is production-ready.

Who uses rpclib?

This list is updated as I learn about more people using the library; let me know if you don't want your project listed here.

Thanks

rpclib builds on the efforts of fantastic C++ projects. In no particular order:

Shoutouts to

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].