flyaways / Pool
Licence: mit
General Purpose Connection Pool for GRPC,RPC,TCP Sevice Cluster
Stars: ✭ 98
Projects that are alternatives of or similar to Pool
Swoft Im
基于swoft-cloud的微服务架构,最小化拆分粒度,PHP7、多进程、协程、异步任务、mysql连接池、redi连接池、rpc连接池、服务治理、服务注册与发现、Aop切面、全注解
Stars: ✭ 189 (+92.86%)
Mutual labels: rpc, pool, tcp
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (+560.2%)
Mutual labels: grpc, rpc
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! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱!
Stars: ✭ 6,516 (+6548.98%)
Mutual labels: grpc, rpc
Alibaba Rsocket Broker
Alibaba RSocket Broker: Mesh, Streaming & IoT
Stars: ✭ 485 (+394.9%)
Mutual labels: grpc, rpc
Getty
a netty like asynchronous network I/O library based on tcp/udp/websocket; a bidirectional RPC framework based on JSON/Protobuf; a microservice framework based on zookeeper/etcd
Stars: ✭ 532 (+442.86%)
Mutual labels: rpc, tcp
Rpc Thunderdome
A comparison between Proteus RPC and other commonly used RPC frameworks
Stars: ✭ 22 (-77.55%)
Mutual labels: grpc, rpc
Javaspringbootsamples
SpringBoot、Dubbo、SpringCloud的各种集成例子:Atomikos、gRPC、Thrift、Seata、ShardingSphere、Dubbo、Hmily、Nacos、Consul、Ribbon、Jedis、Lettuce、Redisson等框架
Stars: ✭ 399 (+307.14%)
Mutual labels: grpc, rpc
Lnd Grpc Client
A python grpc client/async client for LND ⚡⚡⚡
Stars: ✭ 26 (-73.47%)
Mutual labels: grpc, rpc
Dora Rpc
DoraRPC is an RPC For the PHP MicroService by The Swoole
Stars: ✭ 475 (+384.69%)
Mutual labels: rpc, tcp
Rpc Benchmark
java rpc benchmark, 灵感源自 https://www.techempower.com/benchmarks/
Stars: ✭ 463 (+372.45%)
Mutual labels: grpc, rpc
Grain
grain是一个极简的、组件式的RPC框架,灵活且适合渐进学习,可与任何框架整合。同时包含(系统通用多线程模型与消息通讯 || 多对多关系的分布式锁 || 基于Servlet的HTTP框架 || 基于系统通用多线程模型的Websocket框架 || 支持行级锁的多线程锁 )等组件,按需选择组件,不绑架开发者。
Stars: ✭ 577 (+488.78%)
Mutual labels: rpc, tcp
Servicetalk
A networking framework that evolves with your application
Stars: ✭ 656 (+569.39%)
Mutual labels: grpc, rpc
Go Api Boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
Stars: ✭ 373 (+280.61%)
Mutual labels: grpc, 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 (-76.53%)
Mutual labels: rpc, tcp
Pool
Pool is Used to manage and reuse client connections to service cluster.
Pool provides several key features:
-
General Purpose - Pool for GRPC,RPC,TCP.support RPC timeout.
-
Support Cluster - Connet to Cluster.
-
Danamic Update - Danamic update targets.
Pool runs on Linux, Mac OS X, and Windows.
Note: Random to pick a target to get one connection for loadbalance.
Install
go get -u gopkg.in/flyaways/pool.v1
Usage
import "gopkg.in/flyaways/pool.v1"
Example
package main
import (
"log"
"time"
"gopkg.in/flyaways/pool.v1"
"google.golang.org/grpc"
)
func main() {
options := &pool.Options{
InitTargets: []string{"127.0.0.1:8080"},
InitCap: 5,
MaxCap: 30,
DialTimeout: time.Second * 5,
IdleTimeout: time.Second * 60,
ReadTimeout: time.Second * 5,
WriteTimeout: time.Second * 5,
}
p, err := pool.NewGRPCPool(options, grpc.WithInsecure())//for grpc
//p, err := pool.NewRPCPool(options) //for rpc
//p, err := pool.NewTCPPool(options) //for tcp
if err != nil {
log.Printf("%#v\n", err)
return
}
if p == nil {
log.Printf("p= %#v\n", p)
return
}
defer p.Close()
//todo
//danamic update targets
//options.Input()<-&[]string{}
conn, err := p.Get()
if err != nil {
log.Printf("%#v\n", err)
return
}
defer p.Put(conn)
//todo
//conn.DoSomething()
log.Printf("len=%d\n", p.IdleCount())
}
Reference
- https://github.com/fatih/pool
- https://github.com/silenceper/pool
- https://github.com/daizuozhuo/rpc-example
Contribution Welcomed !
Contributors
License
- The MIT License (MIT) - see LICENSE for more details
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].