add: notify db when init.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>
change: create global config object to contain configs;
other minor changes.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>