Novel Application Models and Efficient Algorithms for Offloading to Clouds