Skip to main content

An extensible driver framework with pooling

Project description

© 2013 Urban Airship

https://github.com/urbanairship/kiddiepool

https://secure.travis-ci.org/urbanairship/kiddiepool.png?branch=master

Goals

  • Create a reusable connection pool class that handles failover

  • Allow connection pool to discover service locations via Zookeeper

Creating a New Client

Subclass at least KiddieClient to create the public API for your client driver. Should call KiddieClient._sendall(<str>) to send data.

Using the Pool

Using a static pool

  1. Create a list of "<host>:<port>" strings to target for connections.

  2. Instantiate a KiddiePool with that list of strings.

  3. Pass the KiddiePool instance to your KiddieClient subclass for use.

  4. Use your client’s API and it will use the pool automatically.

Using a dynamic pool

  1. Instantiate a TidePool with the Zookeeper quorum and znode whose children to monitor.

  2. Use a context manager with TidePool() as pool: or the start() and stop() methods to manage the connection to Zookeeper.

  3. Use the dynamic pool exactly like the static pool. Candidates will be added/removed from the pool by a background thread.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiddiepool-1.0.2.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file kiddiepool-1.0.2.tar.gz.

File metadata

  • Download URL: kiddiepool-1.0.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kiddiepool-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7be39ff95d3bf3e406e577ea0263b2247c4584f45158f7ec156a26b7e1443c9f
MD5 633e18067df36d17aec511b9f762aa5a
BLAKE2b-256 2f7879cc77a9d897f3685bb61b7cc5ce2b3b32d6155c15f2b6895dfca97af79f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page