Resource-aware computational offloading