smallnest/rpcx là dự án ưu tiên API trên GitHub với 8.3k sao, viết chủ yếu bằng Go. Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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
Announce
Stable branch: v1.9.4
A tcpdump-like tool added: rpcxdump。 You can use it to debug communications between rpcx services and clients.
Cross-Languages
you can use other programming languages besides Go to access rpcx services.
rpcx-gateway: You can write clients in any programming languages to call rpcx services via rpcx-gateway
http invoke: you can use the same http requests to access rpcx gateway
Java Services/Clients: You can use rpcx-java to implement/access rpcx services via raw protocol.
rust rpcx: You can write rpcx services in rust by rpcx-rs
If you can write Go methods, you can also write rpc services. It is so easy to write rpc applications with rpcx.
Installation
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:
quic: support quic transport
kcp: support kcp transport
rdma: support the experimental RDMA transport (built on gordma's rdmanet.Conn; requires libibverbs on Linux)
Which companies are using rpcx?
Features
rpcx is a RPC framework like Alibaba Dubbo and Weibo Motan.
rpcx is created for targets:
Simple: easy to learn, easy to develop, easy to integrate and easy to deploy
Performance: high performance (>= grpc-go)
Cross-platform: support raw slice of bytes, JSON, Protobuf and MessagePack. Theoretically it can be used with java, php, python, c/c++, node.js, c# and other platforms
Service discovery and service governance: support zookeeper, etcd and consul.
It contains below features
Support raw Go functions. There's no need to define proto files.
Pluggable. Features can be extended such as service discovery, tracing.
Support TCP, HTTP, QUIC and KCP
Support multiple codecs such as JSON, Protobuf, MessagePack and raw bytes.
Service discovery. Support peer2peer, configured peers, zookeeper, etcd, consul and mDNS.
Other features: metrics, log, timeout, alias, circuit breaker.
Support bidirectional communication.
Support access via HTTP so you can write clients in any programming languages.
Support API gateway.
Support backup request, forking and broadcast.
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.
Performance
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
CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz, 32 cores
Memory: 32G
Go: 1.9.0
OS: CentOS 7 / 3.10.0-229.el7.x86_64
Use
protobuf
the client and the server on the same server
581 bytes payload
500/2000/5000 concurrent clients
mock processing time: 0ms, 10ms and 30ms
Test Result
mock 0ms process time
Throughputs
Mean Latency
P99 Latency
mock 10ms process time
Throughputs
Mean Latency
P99 Latency
mock 30ms process time
Throughputs
Mean Latency
P99 Latency
Examples
You can find all examples at rpcxio/rpcx-examples.
Register/RegisterName expose every suitable exported method of a struct as
RPC. To expose only some of them, use RegisterWithMethods /
RegisterNameWithMethods with a whitelist of method names:
// Arith has exported methods Mul, Add and Sub, but only Mul/Add
// should be callable remotely.
s := server.NewServer()
err := s.RegisterWithMethods(new(example.Arith), []string{"Mul", "Add"}, "")
// err := s.RegisterNameWithMethods("Arith", new(example.Arith), []string{"Mul", "Add"}, "")
s.Serve("tcp", addr)
Rules of the whitelist:
Whitelist only: methods not listed are not registered, so a newly added
method stays private unless you opt it in.
Errors on bad names: a name that does not exist on the receiver, or that
exists but is not a suitable RPC method, makes registration fail (the two
cases give different error messages). Nothing is partially registered.
Empty whitelist errors: pass a non-empty list, or use Register /
RegisterName to register all methods.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/smallnest/rpcx là nguồn chính thức.
smallnest/rpcx có bao nhiêu sao?
smallnest/rpcx có 8.3k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/smallnest/rpcx. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
smallnest/rpcx có những chủ đề gì?
GitHub topics của smallnest/rpcx: "dubbo", "grpc", "microservice", "microservices", "rpc", "service-discovery". TopGit xếp repo vào nhóm API.
smallnest/rpcx có trang demo không?
Dự án có trang chủ ở https://rpcx.io. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
smallnest/rpcx còn đang phát triển không?
Commit gần nhất trên smallnest/rpcx là 4 tháng trước (theo timestamp GitHub). Repo có 1.2k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
smallnest/rpcx viết bằng ngôn ngữ gì?
smallnest/rpcx chủ yếu viết bằng Go. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về rpcx?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về rpcx.