In current end systems, multiple flexible, complex and distributed applications concurrently share and compete both end systems resources and transmission bandwidth of heterogeneous multi-protocol networks, especially the Internet. Our objective is to enable adaptation awareness in these applications to fully cope with the dynamics in resource availability over the heterogeneous Internet, as well as fluctuations in Q0S requirements of the applications themselves. In this paper, we present the theoretical and practical aspects of a Task Control Model implemented in the middleware layer, which applies control theoretical approaches to utilize measurement-based samples monitored in the network traffic, as well as resource and Q0S demand dynamics observed in the end systems.In our Task Control Model, we introduce Adaptation Tasks for controlling the adaptive behavior of applications, and Observation Tasks for measurements of traffic and end systems resources. We have made several contributions based on the Task Control Model. First, we are able to quantitatively analyze the stability and responsiveness properties of adaptive algorithms, as well as maintaining fairness properties among all applications. Secondly, we present specific translation mechanisms to theoretical output of Adaptation Tasks to semantic adaptive behavior within the applications. Thirdly, we explore necessary enabling service platforms in the middleware level to embrace the Task Control Model. Finally, the theoretical analysis in the paper is carried out in the context of a distributed visual tracking application, in order to demonstrate the effects of adaptation in real systems.