KDF DBPool Design Overview

From KallestadWiki

Jump to: navigation, search

The following image shows the basic depiction of how the database pool is supposed to work.


Image:Db_pool.gif


Client connections all come into the master process. The master process carries several responsibilities:

  • Maintain an understanding of the queue size within each child process.
  • Intelligently distribute query requests to the fastest possible child process.
  • Manage permissions such that unknown / unauthenticated clients cannot access database level data
  • Potentially return data - I'm not sure at this point whether it would be preferable to have the child processes communicate directly to the client, or whether the child processes should talk directly to the Master only.
  • Collect Performance statistics so that proper query statement handle cacheing and query results caching is occurring. This could require manual intervention to act on this information.
  • Spawn and Kill child processes appropriately.
  • Intelligently keep track of which data sources each child is connected to.

Essentially, when a client request comes into the DB Master, the DB Master decides which Child DB Connection to send the request to. Once decided, the request is passed off to the Child DB Connection.

The Child DB Connection processes have a focused set of responsibilities:

  • Maintain data source connectivity
  • Process data requests
  • Cache appropriately for optimal performance


Database Connection Pooling Topics

Kallestad Development Framework Topics

Personal tools