resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. This general definition shows the power that cloud computing makes available to the Internet of Things. The basic idea is to collect information, usually big amounts of data, in the point of interest (this so-called the edge, where information is generated) and upload it to be properly processed in the cloud, where ideally permanent and enough processing resources are available. This model may work perfectly with some approaches where the energy resource is not a limitation or the time required for any decision does not impose a very fast reaction. However, the cloud computing paradigm applied directly to IoT presents a set of drawbacks regarding latency, bandwidth and storage [10] because of the huge amount of data that have to be uploaded and processed. Due to these limitations, more layers have been proposed during the last years, getting closer to the source of data.