  The Internet of Things (IoT) networks are expected to involve myriad of
devices, ranging from simple sensors to powerful single board computers and
smart phones. The great advancement in computational power of embedded
technologies have enabled the integration of these devices into the IoT
network, allowing for cloud functionalities to be extended near to the source
of data. In this paper we study a multi-layer distributed IoT architecture
supported by fog and cloud. We optimize the placement of the IoT services in
this architecture so that the total power consumption is minimized. Our results
show that, introducing local computation at the IoT layer can bring up to 90%
power savings compared with general purpose servers in a central cloud.
