Fog and Cloud Computing for the Internet of Things