  The Internet of Things (IoT) aims to connect everyday physical objects to the
internet. These objects will produce a significant amount of data. The
traditional cloud computing architecture aims to process data in the cloud. As
a result, a significant amount of data needs to be communicated to the cloud.
This creates a number of challenges, such as high communication latency between
the devices and the cloud, increased energy consumption of devices during
frequent data upload to the cloud, high bandwidth consumption, while making the
network busy by sending the data continuously, and less privacy because of less
control on the transmitted data to the server. Fog computing has been proposed
to counter these weaknesses. Fog computing aims to process data at the edge and
substantially eliminate the necessity of sending data to the cloud. However,
combining the Service Oriented Architecture (SOA) with the fog computing
architecture is still an open challenge. In this paper, we propose to decompose
services to create linked-microservices (LMS). Linked-microservices are
services that run on multiple nodes but closely linked to their
linked-partners. Linked-microservices allow distributing the computation across
different computing nodes in the IoT architecture. Using four different types
of architectures namely cloud, fog, hybrid and fog+cloud, we explore and
demonstrate the effectiveness of service decomposition by applying four
experiments to three different type of datasets. Evaluation of the four
architectures shows that decomposing services into nodes reduce the data
consumption over the network by 10% - 70%. Overall, these results indicate that
the importance of decomposing services in the context of fog computing for
enhancing the quality of service.
