Autonomic systems received lately a great deal of interest from the research and industrial communities due to their ability to configure, optimize, heal and protect themselves with little to no human intervention. Such systems must be able to analyze themselves and their environment in order to determine how best they can achieve the high-level goals and policies given to them by system managers. Among many approaches to this subject, real-time control loops have imposed themselves due to the direct mapping of their components onto the components of the generic autonomic computing architecture. In this paper we explore the model-driven approach to the development of real-time architecture for autonomic computing for a self-optimization scenario. This leads to the synthesis of a platform independent model (PIM) for generic autonomic computing systems and a platform specific model (PMS) for a specific application of it. Both the PIM and the PMS are then detailed up to the implementation level. The Platform Specific Model was considered for a Web service based implementation of the PIM.