katja-beam / katja

A simple Riemann client written in Erlang.
https://hex.pm/packages/katja
ISC License
27 stars 19 forks source link

Add pooling support #1

Closed nifoc closed 10 years ago

nifoc commented 10 years ago

It should be possible to easily integrate Katja with existing pooling solutions like Poolboy or Pooler.

Since I want to keep Katja as lightweight as possible (dependency-wise), Katja will not take care of managing pools in any way (including pool membership). All Katja will do in regards to supporting pooling is:

  1. Provide a way to not start/supervise the katja_metrics and katja_queries processes
  2. Add APIs that do not depend on katja_metrics and katja_queries being registered processes

1. is basically already implemented in the development branch. The supervisor will look at the pool application setting and not add a process to its children if it's present in the poollist.

For 2. it will come down to adding APIs that take a PID (of a katja_metrics or katja_queries process) as their first argument.