Middleware for effective cloud management