basho/riak_core — pull request #217 by russelldb (2012-07-25 14:52:34+00:00)
Title: restructure supervision tree so that folsom is an included app

All stat mods depend on folsom, yet they are not linked to it.
This change brings folsom under supervision of a core stat sup,
which also supervises the riak stat subsystem. Now when folsom exits
everyone gets to restart clean and recover.

riak_core_sup
|
riak_core_stat_sup (rest_for_one)
\
- folsom_sup
- riak_core_stats_sup (one_for_one)
\
- riak_*_stat
- riak_stat_cache

riak_core_stats_sup will start and supervise gen_server stat mods at
registration time, and will re-start them should the sup crash.