Abstract: With the emergence of various kinds of mobile clients, it is an increasing need for applications to use the resources of the cloud and clients on demand, such as computation, storage, network and even energy. There are two key challenges to realize such goal, i.e., "how to enable the cloud and client resources to be on-demand used" and "How to make services and apps have the ability of using resources on-demand". This project takes the structure of apps as a breakthrough point, establishing the software architecture and program framework of on-demand usage of cloud and client resources. Therefore, it can solve three key technical problems: collaboratively managing resources, adaptively using resources, and transparently enabling legacy apps. The main contents of this project include: a new agent-based adaptive software architecture, which supports apps to use the cloud and client resources on-demand; a synchronization mechanism for computation offloading to the cloud dynamically; an object persistence mechanism to decouple the app data, improving the security and consistency of the data; a model-based resource management mechanism for the cloud, network and client, enabling the apps to on-demand use the computation, storage, network, energy and other resources; a run-time model-based self-adaptation mechanism, enabling the app to on-demand use the resources in the cloud and the client; a Java bytecode refactoring framework for legacy apps; a lightweight user-driven service composition mechanism for the cloud-side service and client-side apps. The outcome of this project is a platform that automatically analyzing and refactoring existing Java apps, which enables on-demand resources usage. After the refactoring, the performance (i.e. the execution time for computation-intensive methods) of computation-intensive apps is improved more than 10 times under WiFi and cellular network, while the energy consumption are reduced to 80%. The platform can also refactor existing cloud apps, and for computation-intensive cloud apps, the computation workload can be reduced to 80% after refactoring. This project is applied in typical cloud-client-convergence scenarios for the apps from the government and large corporations.