Framework for offloading and partitioing mobile-cloud computing