Cloud-based energy management service: Design, analysis, and realization