MOSES: A framework for qos driven runtime adaptation of service-oriented systems