Service Based Applications (SBA) running in distributed and heterogeneous environments are subject to varying constraints that can lead to fluctuations in the quality of the application. We propose a solution in the form of a distributed framework for adaptation to improve in a autonomous way the quality delivered by those applications and to maintain it above a minimum level. This framework, named SAFDIS for Self-Adaptation For DIstributed Services, enables the dynamic evolution of service-based architectures by providing all the functionalities of the MAPE model. Among these functionalities, particular emphasis is put on the analysis phase which permits to use several reasoners able to take decisions with multiple temporal scopes, at short term as well as at long term. Specific attention is also paid to the planning phase, which enables to schedule parallel actions while taking into account different constraints.