Official site: http://rpcx.io
Notice: etcd
since rpcx 1.7.6, some plugins have been moved to the independent project:
etcd
plugin has been moved to rpcx-etcd
zookeeper
plugin has been moved to rpcx-zookeeper
consul
plugin has been moved to rpcx-consul
redis
plugin has been moved to rpcx-redis
influxdb
plugin has been moved to rpcx-plugins
opentelemetry
plugin has been moved to rpcx-plugins
A tcpdump-like tool added: rpcxdump。 You can use it to debug communications between rpcx services and clients.
you can use other programming languages besides Go to access rpcx services.
If you can write Go methods, you can also write rpc services. It is so easy to write rpc applications with rpcx.
install the basic features:
go get -v github.com/smallnest/rpcx/...
If you want to use quic
、kcp
registry, use those tags to go get
、 go build
or go run
. For example, if you want to use all features, you can:
go get -v -tags "quic kcp" github.com/smallnest/rpcx/...
tags:
rpcx is a RPC framework like Alibaba Dubbo and Weibo Motan.
rpcx is created for targets:
It contains below features
rpcx uses a binary protocol and platform-independent, which means you can develop services in other languages such as Java, python, nodejs, and you can use other prorgramming languages to invoke services developed in Go.
There is a UI manager: rpcx-ui.
Test results show rpcx has better performance than other rpc framework except standard rpc lib.
The benchmark code is at rpcx-benchmark.
Listen to others, but test by yourself.
Test Environment
Use
Test Result
Throughputs | Mean Latency | P99 Latency |
---|---|---|
Throughputs | Mean Latency | P99 Latency |
---|---|---|
Throughputs | Mean Latency | P99 Latency |
---|---|---|
You can find all examples at rpcxio/rpcx-examples.
The below is a simple example.
Server
// define example.Arith
……
s := server.NewServer()
s.RegisterName("Arith", new(example.Arith), "")
s.Serve("tcp", addr)
Client
// prepare requests
……
d, err := client.NewPeer2PeerDiscovery("tcp@"+addr, "")
xclient := client.NewXClient("Arith", client.Failtry, client.RandomSelect, d, client.DefaultOption)
defer xclient.Close()
err = xclient.Call(context.Background(), "Mul", args, reply, nil)
see contributors.
Welcome to contribute:
Apache License, Version 2.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型