jason 075d766964 first | 3 yıl önce | |
---|---|---|
.. | ||
_documents | 3 yıl önce | |
_testutils | 3 yıl önce | |
client | 3 yıl önce | |
codec | 3 yıl önce | |
errors | 3 yıl önce | |
log | 3 yıl önce | |
protocol | 3 yıl önce | |
reflection | 3 yıl önce | |
server | 3 yıl önce | |
serverplugin | 3 yıl önce | |
share | 3 yıl önce | |
tool | 3 yıl önce | |
util | 3 yıl önce | |
.gitignore | 3 yıl önce | |
.travis.yml | 3 yıl önce | |
CHANGELOG.md | 3 yıl önce | |
LICENSE | 3 yıl önce | |
Makefile | 3 yıl önce | |
README.md | 3 yıl önce | |
TODO.md | 3 yıl önce | |
go.mod | 3 yıl önce | |
go.sum | 3 yıl önce |
Official site: http://rpcx.io
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 ping
、quic
、kcp
、utp
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 ping utp" github.com/smallnest/rpcx/...
tags:
rpcx is a RPC framework like Alibaba Dubbo and Weibo Motan.
rpcx 3.0 has been refactored 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 := 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