1. A method comprising: determining, by a middleware layer running on a computing device, capabilities of the computing device in response to receiving a request for an application; determining, by the middleware layer, a service level agreement associated with the application; selecting one or more services of the middleware layer to assign to the application based on the service level agreement and the capabilities of the computing device; and determining whether to install the one or more services on the computing device or on a remote computing device based on the service level agreement, the capabilities of the computing device and properties of the one or more services.