# Data Gathering Techniques in WSN: A Cross-Layer View
## 1 Introduction
The ability to successfully transmit and gather vast streams of data incoming from an enormous number of devices and sensors and finally to successfully analyze them, in order to automatically control a much larger scope of everyday life systems, directly couples the process of data gathering with Big Data related challenges (e.g., [14, 15, 16, 17]). Furthermore, leveraging Cloud Computing platforms offers significant advances in data analytical abilities (e.g., [18, 19, 20]). It provides new horizons to further develop and increase the size of WSN/IoT networks both in the sense of the number of sensing units and in the sense of the amount of the acquired data (e.g., [21, 22, 23]). (iii) Connectivity -- collecting and disseminating data from and to many devices, potentially through vast, dense, heterogeneous networks, will be one of the biggest challenges of the future of IoT; accordingly, novel MAC protocols and coding schemes should be devised to comply with this challenge. With this respect, air time utilization and energy efficiency are of primary importance for the MAC layer protocol design. Any MAC layer protocol should ensure that devices utilize the wireless channel frugally and with minimum energy consumption. (iv) Security and Privacy -- Connecting enormous numbers of devices to the Internet exposes the IoT network to serious security vulnerabilities. All the more so since the relevant entities are limited. Accordingly, issues such as authenticity, data encryption, and vulnerability to attacks (e.g., device impersonation) are critical for the IoT paradigm's continuous growth (e.g., [24]). In addition, since the information transmitted over the WSN and IoT networks can be highly confidential (e.g., health reports, device tracking), the collection and dissemination of this information create significant challenges related to data protection and privacy. This survey will explore the state-of-the-art of data collection and dissemination aspects in WSNs and IoT environments mentioned above. We will review essential milestones yet mainly focus on recent publications and present the new trends and research directions. Our resources included mainly Google Scholar, IEEE Xplore and our university's library databases, utilizing the keywords of this paper. We also used important references from the bibliography of the initial papers and ones that cited them. Data collection spans all the networking layers, from the physical implementation of transmitting bits across a communication medium to the application layer. Due to the wide-ranging scope of the topic, we will not be able to cover all its aspects (for example, in this paper, we will not discuss the critical topic of security and privacy). Some of the issues will be covered more thoroughly than others. However, since some of the topics we discussed rely on the general wireless communication technology and on broad setup protocols which are not data-gathering oriented per se, on some of the topics, we will provide a more comprehensive background and describe protocols that are aimed at a broader domain than data-gathering. For example, many medium access control (MAC) and wireless routing protocols are designed for a wide range of topologies, traffic patterns, quality of service requirements, etc. Even though they can be applied, they are not explicitly designed for data gathering. We will include some more general yet essential studies in our survey. To grasp the whole picture and to better understand some data-gathering-related issues, in some cases, we will delve into the pertinent background and stray into some peripheral topics. We will cover topics related to all layers of the protocol stack. Sometimes classification based on a stack is not clear-cut, as some of the issues involve multiple stacks.