Hello again. I just looked into bitcoin/rpc.py more carefully, so before continuing with this I have to say that using HTTP connections that persist for the duration of the object is not an improvement over the "traditional" method. My reasons for that:
- Suppose you just did a proxy = rpc.Proxy(serviceurl) and decided to stop bitcoind at some remote place. It will hang there, waiting for your proxy to die.
- It makes supporting async calls impossible. You will very often hit a ResponseNotReady exception since you might not have read the response of an earlier call before making another request.
Also, the current way this is coded, I no longer see a simple way to subclass Proxy and make the calls async. Maybe the easiest way would involve firing a new thread for each call and let it handle in the standard blocking way. The futures package makes this a lot easier (and remember it is just a backport of an existing package in the standard library at Python 3.2+), although the code at rpc.py would need to be rewritten. This feature is decisive for me in order to use the package, but it might just be me.