Skip to content

jimichan/maya-thrift-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

maya-thrift-pool

a thrift pool

功能列表

  1. 指定多个服务地址
  2. 负载均衡
  3. 自动检测后段存活
  4. 如果服务离线,自动检测如果恢复那么自动上线
  5. 如果服务故障,自动剔除
  6. 连接池配置
  7. 使用javassist字节码生成实现iface类,性能比反射调用高。且iface的实现是多线程安全、只需要单例
ThriftConnectionPool pool = new ThriftConnectionPool(
				ThriftConnectionPool.config);
final Iface face = SimpleClientProxyFactory.
				makeClientFramedTransport(SegService.Iface.class, new SegService.Client.Factory(),
						"127.0.0.1:9091,127.0.0.1:9090", pool, new TBinaryProtocol.Factory());
						
face.dosomeing();
face.dosomeing2();

About

a thrift pool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages