Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smallnest/rpcx
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!
https://github.com/smallnest/rpcx
dubbo grpc microservice microservices rpc service-discovery
Last synced: 5 days ago
JSON representation
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!
- Host: GitHub
- URL: https://github.com/smallnest/rpcx
- Owner: smallnest
- License: other
- Created: 2016-05-18T09:34:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T10:26:18.000Z (7 months ago)
- Last Synced: 2024-04-16T07:46:43.648Z (7 months ago)
- Topics: dubbo, grpc, microservice, microservices, rpc, service-discovery
- Language: Go
- Homepage: https://rpcx.io
- Size: 26.9 MB
- Stars: 7,935
- Watchers: 350
- Forks: 1,150
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - rpcx - Distributed pluggable RPC service framework like alibaba Dubbo. (Distributed Systems / Search and Analytic Databases)
- awesomeLibrary - rpcx - Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. (่ฏญ่จ่ตๆบๅบ / go)
- awesome - smallnest/rpcx - 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! (Go)
- go-awesome - rpcx
- awesome-go - rpcx - Distributed pluggable RPC service framework like alibaba Dubbo. Stars:`8.1K`. (Distributed Systems / Search and Analytic Databases)
- awesome-grpc - rpcx - A RPC service framework based on net/rpc like alibaba Dubbo and weibo Motan (Language-Specific / Go)
- awesome-list-microservice - rpcx - language bidirectional RPC framework in Go, like alibaba Dubbo and weibo Motan in Java, but with more features, Scale easily. (service-discovery)
- my-awesome - rpcx - :white_check_mark: Faster multil-language bidirectional RPC framework in Go, like alibaba Dubbo and weibo Motan in Java, but with more features, Scale easily. (Platform/Framework/SDK/Language)
- awesome-go - rpcx - Faster multil-language bidirectional RPC framework in Go, like alibaba Dubbo and weibo Motan in Java, but with more features, Scale easily. - โ 2924 (Distributed Systems)
- awesome-go-extra - rpcx - 05-18T09:34:05Z|2022-08-20T04:38:37Z| (Distributed Systems / Advanced Console UIs)
- StarryDivineSky - smallnest/rpcx
- my-awesome - smallnest/rpcx - discovery pushed_at:2024-09 star:8.1k fork:1.2k 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! (Go)
README
- **stable branch**: v1.7.x
- **development branch**: masterOfficial site: [http://rpcx.io](http://rpcx.io/)
[![License](https://img.shields.io/:license-apache%202-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GoDoc](https://godoc.org/github.com/smallnest/rpcx?status.png)](http://godoc.org/github.com/smallnest/rpcx) [![github actions](https://github.com/smallnest/rpcx/actions)](https://github.com/smallnest/rpcx/actions/workflows/go.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/rpcx)](https://goreportcard.com/report/github.com/smallnest/rpcx) [![coveralls](https://coveralls.io/repos/smallnest/rpcx/badge.svg?branch=master&service=github)](https://coveralls.io/github/smallnest/rpcx?branch=master) [![QQ3็พค](https://img.shields.io/:QQ3็พค-953962236-blue.svg)](_documents/rpcx_dev_qq3.jpg)
**Notice: etcd**
since rpcx 1.7.6, some plugins have been moved to the independent project:
- `etcd` plugin has been moved to [rpcx-etcd](https://github.com/rpcxio/rpcx-etcd)
- `zookeeper` plugin has been moved to [rpcx-zookeeper](https://github.com/rpcxio/rpcx-zookeeper)
- `consul` plugin has been moved to [rpcx-consul](https://github.com/rpcxio/rpcx-consul)
- `redis` plugin has been moved to [rpcx-redis](https://github.com/rpcxio/rpcx-redis)
- `influxdb` plugin has been moved to [rpcx-plugins](https://github.com/rpcxio/rpcx-plugins)
- `opentelemetry` plugin has been moved to [rpcx-plugins](https://github.com/rpcxio/rpcx-plugins)## Announce
A tcpdump-like tool added: [rpcxdump](https://github.com/smallnest/rpcxdump)ใ You can use it to debug communications between rpcx services and clients.
![](https://github.com/smallnest/rpcxdump/blob/master/snapshoot.png)
## 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](https://github.com/rpcxio/rpcx-gateway)
- **http invoke**: you can use the same http requests to access rpcx gateway
- **Java Services/Clients**: You can use [rpcx-java](https://github.com/smallnest/rpcx-java) to implement/access rpcx services via raw protocol.
- **rust rpcx**: You can write rpcx services in rust by [rpcx-rs](https://github.com/smallnest/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:
```sh
go get -v -tags "quic kcp" github.com/smallnest/rpcx/...
```**_tags_**:
- **quic**: support quic transport
- **kcp**: support kcp transport## Which companies are using rpcx?
## Features
rpcx is a RPC framework like [Alibaba Dubbo](http://dubbo.io/) and [Weibo Motan](https://github.com/weibocom/motan).**rpcx** is created for targets:
1. **Simple**: easy to learn, easy to develop, easy to integrate and easy to deploy
2. **Performance**: high performance (>= grpc-go)
3. **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
4. **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](https://en.wikipedia.org/wiki/QUIC) and [KCP](https://github.com/skywind3000/kcp)
- Support multiple codecs such as JSON, Protobuf, [MessagePack](https://msgpack.org/index.html) and raw bytes.
- Service discovery. Support peer2peer, configured peers, [zookeeper](https://zookeeper.apache.org), [etcd](https://github.com/coreos/etcd), [consul](https://www.consul.io) and [mDNS](https://en.wikipedia.org/wiki/Multicast_DNS).
- Fault tolerance๏ผFailover, Failfast, Failtry.
- Load banlancing๏ผsupport Random, RoundRobin, Consistent hashing, Weighted, network quality and Geography.
- Support Compression.
- Support passing metadata.
- Support Authorization.
- Support heartbeat and one-way request.
- 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](https://github.com/smallnest/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](https://github.com/rpcx-ecosystem/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
ThroughputsMean LatencyP99 Latency
### mock 10ms process time
ThroughputsMean LatencyP99 Latency
### mock 30ms process time
ThroughputsMean LatencyP99 Latency
## Examples
You can find all examples at [rpcxio/rpcx-examples](https://github.com/rpcxio/rpcx-examples).
The below is a simple example.
**Server**
```go
// define example.Arith
โฆโฆs := server.NewServer()
s.RegisterName("Arith", new(example.Arith), "")
s.Serve("tcp", addr)```
**Client**
```go
// 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)
```## Contributors
## Contribute
see [contributors](https://github.com/smallnest/rpcx/graphs/contributors).
Welcome to contribute:
- submit issues or requirements
- send PRs
- write projects to use rpcx
- write tutorials or articles to introduce rpcx## License
Apache License, Version 2.0