python library for reusable client connections
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples sample thrift tutorial server Nov 4, 2012
src/thriftpool First version Nov 4, 2012
.gitignore .gitignore java classes Nov 4, 2012
LICENSE First version Nov 4, 2012
README.md First version Nov 4, 2012
setup.py First version Nov 4, 2012

README.md

Description

This library wraps the actual Thrift generated client and uses internally a pool of connections to call remote methods

Usage

#actual thrift client module
import tutorial.Calculator

from thriftpool import client

cl=client.Client(iface_cls=tutorial.Calculator.Client, host='localhost', port=9090, pool_size=3, retries=3)
for i in range(5):
	cl.ping()

#close connection pool
cl.close()

To Do

Keep only a configurable number of connections alive and drop unused ones.