Refactor server to use daemon as the service layer in controllers Upstream-commit: 4895a887e2e88699a07ab6fea9113a5ff13d2450 Component: engine