EFFICIENT ROUTING AND OFFLOADING DESIGN IN INTERNET-OF-THINGS SYSTEMS