8000 GitHub - jsonbb/boa_rpc: Thrift-based rpc framework
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jsonbb/boa_rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boa_rpc

Boa_rpc is based on the distributed RPC service framework developed by thrift (expandable to other protocols)

Architecture

Feature

  • the server automatically registers
  • client service automatic discovery
  • client load balancing
  • service fault tolerance

Python dependency

python2.7+

  • thrift==0.11.0
  • gevent==1.3.1
  • kazoo==2.4.0
  • gunicorn==19.3.0
  • demjson==2.2.4

example

Define service

from boarpc.baseEndpoint import Endpoint

class HelloWorld(Endpoint):

    @Endpoint.register
    def test(self,param):
        print param
        return {'code':1,'data':{'1':0},'msg':'ok'}

Invoke service
python client

from client.thrift_connector.boa_client import BoaClient

client = BoaClient()
print client.request('app_name.helloWorldEndpoint.HelloWorld.test',['44'])

java client

 BoaConf conf = new BoaConf("10.28.102.136:2181");
 BoaClient client = new BoaClient(conf);
 Map paramMap = new HashMap<>();
 paramMap.put("id","`123456yt");
 Map re = client.request("app_name.helloWorldEndpoint.HelloWorld.test",paramMap);

About

Thrift-based rpc framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0