Impact of Node Density on the QoS Parameters of Routing Protocols in Opportunistic Networks for Smart Spaces

(e need and importance of Smart Spaces have been potentially realized by the researchers due to its applicability in the current lifestyle. Opportunistic network, a successor of mobile ad hoc networks and a budding technology of network, is a best-suited technology for implementing Smart Spaces due to its wide range of applications in real-life scenarios ranging from building smart cities to interplanetary communication.(ere are numerous routing protocols which are available in opportunistic network, each having their pros and cons; however, no research till the time of listing has been done which can quantitatively demonstrate the maximum performance of these protocols and standardize the comparison of opportunistic routing protocols which has been a major cause of ambiguous performance evaluation studies. (e work here presents a categorical view of the opportunistic routing protocol family and thereby compares and contrasts the various simulators suited for their simulation. (ereafter, the most popular protocols (selecting at least one protocol from each category) are compared based on node density on as many as 8 standard performance metrics using ONE simulator to observe their scalability, realism, and comparability. (e work concludes by presenting the merits and demerits of each of the protocols discussed as well as specifying the best routing protocol among all the available protocols for Smart Spaces with maximum output. It is believed that the results achieved by the implemented methodology will help future researchers to choose appropriate routing protocol to delve into their research under different scenarios.


Introduction
In the era of consistently changing environment, communication devices are getting intelligent day by day and delivering rapid and robust connections. New applications are emerging with an advanced approach in wireless networking arena which is attracting new researchers in this field for further efforts. Due to the tremendous research in the wireless section, communication has become promising even in remote regions where previously, constructing a simple communication network was a huge challenge.
Owing to the pervasive applications of networking, existing technologies on wireless networking like vehicular ad hoc wireless network, wireless sensor networks, mobile ad hoc networks are observed to be insufficient in some instances such as interplanetary communication [1], Smart source to destination does not exist at that given moment. Opportunistic networks must be delay-tolerant (i.e., ready to tolerate bigger delays). Delay-tolerant network (DTN) utilizes the idea of "store-carry-forward" of data packets. DTNs can move data or set up a correspondence in a remote area or emergency condition where there is no network set up. DTNs have numerous applications like to provide smooth Internet arrangements in remote areas, in vehicular networks, noise observing, extraordinary terrestrial situations, and so on. It is in this manner promising to recognize viewpoints for reconciliation and integration of opportunistic network systems and advances into delay-tolerant networking.
OppNet is different than mobile ad hoc networks (MANETs) in the aspect of connectivity of participating nodes carrying data [7,8]. e nodes participating in ad hoc networks for data communication remain connected constantly whether the nodes are in motion or static; on the other hand, nodes get to connect with other nodes in the OppNet when the communication is to be done between the nodes that make it a better approach in real-world applications. erefore, conventionally defined protocols such as TCP/IP, DSR, AODV, and DSDV fail to function properly in opportunistic networks [9][10][11].
Rather, OppNet which is a type of delay-tolerant network is considered as the next generation of ad hoc networks which is further derived from standard wireless networks. Figure 1 clearly illustrates the evolution of opportunistic networks originating from the wireless networks domain through step-by-step growth. Every growth in each progressive step indicates the extension of personal communication networks towards solving further real-life problems which were a challenge earlier.
According to Nayyar et al. [12], the primary aim of developing opportunistic networks is to handle critical situations with effective manner such as disaster handling, war-field communications [13], satellite communications, flying warplanes/drones networking, underwater sensor networks [14], and forest surveillance. OppNets are highly useful where communication encounters high delays, no reliable connectivity, and high error rates. Nodes participating in OppNet are equipped with several attributes such as short communication range, high dynamic mobility, and low density. OppNet is designed specifically to connect almost every device which is capable of being connected through any wireless medium such as Bluetooth and Wi-Fi, etc. thereby making it a perfect choice for network designers all over the world. A general scenario of the opportunistic network connection is depicted in Figure 2.

Advantages and Disadvantages of Opportunistic
Networks. According to Nayyar et al. [12], opportunistic networks are considered a strong option among the available networking technologies due to the following advantages: (1) OppNets can tolerate high delays if the destination or another intermediate node is not responding due to any reason during data communication (2) OppNet may allow data transfer with asymmetric data rates (3) OppNets can prevent data loss due to connection failure as it follows the store-carry-forward approach (4) OppNets can manage data communication even in continuous ups and downs with network state as it is specifically designed for operating under the situation of intermittent connection Despite all the abovementioned advantages, there are certain challenges [15] in OppNet communication that needs to be dealt with. e various shortcomings of OppNet are as follows: (1) OppNet requires high buffer space as it stores the data to be forwarded which further increases its operational cost. (2) Due to intermittent connectivity, a node communicating in OppNet requires a large amount of energy as it may wait for a long time for forwarding the data it holds. It is believed that the above-discussed challenges will soon be resolved by upcoming researchers through their continuous efforts to make OppNet better than its current version.

Role of Opportunistic Networks in Smart Spaces.
In the era of Digital Connectivity, a large amount of population is equipped with smartphones that connect a person to the digital world via the Internet [16,17]. Besides connecting the Internet, a smartphone comes with a different mode of connectivity with other devices such as Bluetooth and Wi-Fi [18]. According to Samaniego et al. [19], "Smart Spaces are common spaces that have capabilities to get data from the environment and apply knowledge to fulfill requirements of mobility, distribution, and context awareness of its inhabitants." Smart Space is nothing but a virtual world full of information as per the interest of member nodes [2,20]. According to Ismagiloiva et al. [21], the concept of Smart Spaces complements IoT technology specifically for designing smart cities. ese different modes of smartphone enable its user to make his/her private network as per the requirements as well as preferences of connected persons. ese small and customizable networks are termed as Smart Spaces in the real world [22,23]. e connected devices in such Smart Spaces are known as nodes in the networking terminology [2,24]. For its smooth connectivity, opportunistic network is the best suited due to its inherent traits. e nodes in opportunistic networks use Wi-Fi or Bluetooth for interconnectivity and primarily initiate functioning with a single

Airborne networks
Social networks Mobile communication node known as seed OppNet and expand further by implementing it among more member nodes that facilitate data forwarding in the network [25,26].
Routing in OppNets relies upon contact opportunity between the nodes which is required due to their versatile nature. e most huge technique used in OppNet for routing movement is the store-carry-forward technique, where a message can be forwarded among intermediary nodes, and accordingly, the message is passed on to the destination node. e store-carry-forward technique is seen as a capable technique to ensure message delivery to destination nodes where message delivery may bear high delays. us, Opp-Nets are a subclass of DTN where nodes must be outfitted with high buffer space to store messages for a strange timeframe to evade packet dropping.
Short-distance communication feature enabled node may help OppNet to gain large improvements and numerous scopes covering almost every industry such as information attacking, energy utilization, communication engineering, and information gathering. However, maintaining a stable network topology in OppNet is a cumbersome task; also, predicting the network topology is very difficult due to the frequent mobility among nodes and large communication range.
is paper initially presents the introduction of opportunistic networks followed by its role in building Smart Spaces and applications of OppNets which are presented in Section 2. Section 3 highlights various routing protocols associated with this class of networks. Section 4 elaborates numerous research simulators available in OppNets followed by the enlightenment of Java-based simulator ONE (Opportunistic Network Environment). Section 5 presents the analysis of the total nine standard routing protocols over standard QoS parameters. e paper concludes by submitting future work in this area.

Applications of Opportunistic Networks
Opportunistic networks have become ubiquitous nowadays. It has numerous applications in real-life scenarios covering almost all levels of modern communication requirements. Figure 3 demonstrates OppNet applications in the real world.
Some of the popular ones are described as follows: (a) LASSO: Saloni et al. [27] developed LASSO, a general-purpose smartphone-based application that uses the opportunistic networking feature using Bluetooth or smartphone for group monitoring. It has proved to be highly advantageous for the interconnectivity of a group of some persons roaming in a smart city and monitoring their locations to track if someone got missed. Its unique feature of decentralization device-to-device mode of operation makes it able to be used in any mobile scenario. Also, it does not need any pre-existence of any communication infrastructure. LASSO has performed well on small-scale implementation (i.e., 250 persons over a small geographic area) and it is being underdevelopment for further enhancements. (b) Shared wireless infostation model (SWIM): Small and Haas [28] proposed an infostation concept with the integration of opportunistic networking. It was experimented to observe the whale species by tying sensors on whale's back, thereby making them radiotagged whales. All sensor nodes are connected via opportunistic networking and data are forwarded in the same fashion as in OppNet and finally delivers to the infostation. is application has proved to be excellent to monitor whales' life closely.  Papadaki et al. [31] presented a system design that permits application developers to consider the future environment as a generic execution that opportunistically distributes and executes automatically the components of their applications. e concept of permitting mobile clients to utilize the resources present in the environment with the help of locationaware services relates this application to opportunistic networking and opportunistic computing. e primary aim of this system design is to hold a vision to a futuristic environment where clients do not require to search and use services already existing in the environment, rather, to use the environment to implement their custom applications. It has experimented successfully with the help of a prototype evaluation. (f ) Saratoga: Wood et al. [1] presented Saratoga which is a light-weight protocol based on opportunistic networks. It was developed by Surrey Satellite Technology Limited (SSTL) for file transfers of data recorded in image format by IP-based Disaster Monitoring Constellation (DMC) satellites revolving around earth from low orbit. Saratoga follows opportunistic routing as it only forwards the data packet when link connectivity is available which guarantees that the maximum possible data are transferred to the node during a 12-minute pass over a satellite ground station. Saratoga is fully operational for many years. (g) Underwater acoustic communication: underwater communication networks have been the prime area of research in recent years due to its various applications such as oil spills detection, disaster detection and avoidance, sea exploration, and detection of submarines. Menon and Prathap discussed [32] numerous opportunistic routing protocols developed especially for underwater acoustic communication. Two major categories of such protocols are pressure-based protocols and location-based protocols. Rahman et al. [33] proposed a routing algorithm named TORA (totally opportunistic routing algorithm) with a focus to overcome issues about underwater acoustic communication such as void nodes, horizontal transmission, high end-to-end delay, low throughput, and high battery drain. According to extensive simulation studies, TORA has been proved a better option over the existing algorithm up to a considerable extent.
ese are some of the major applications opportunistic networks possess. But its scope has not been limited to the mentioned applications; rather, it has vast scope in airborne networks [34], space operations [35], backend support in smart cities [36,37], and many other domains that are not discussed in this paper.

Routing Protocols in OppNets
Opportunistic networks contain a huge number of routing protocols. ese protocols came into existence as a result of the rigorous efforts of several researchers done in the domain of opportunistic networking [3,[38][39][40].
According to Juyal et al. [41], numerous protocols can be categorized into various classes, viz., flooding-based routing protocols (e.g., Epidemic routing protocol and Spray-and-Wait routing protocol), forwarding-based routing protocol (e.g., Direct Delivery routing protocol and First Contact routing protocol), probability-based routing protocols (e.g., PRoPHET and MaxProp), knowledge-based routing protocols (e.g., Epidemic Oracle routing protocol), social relationship-based routing protocols (e.g., FRESH routing protocol), and off-course hybrid routing protocols (e.g., RAPID protocol). e work presents the exhaustive survey of all these protocols in each category of routing protocols in opportunistic networks. e taxonomy of routing protocols is depicted in Figure 4.
(a) Epidemic routing protocol: the functioning of Epidemic protocol may be described as an epidemic disease spread in an area; therefore, any contact developed in such an infected area will spread it further. e only difference is that here, the disease is considered as a message containing data, and the area is considered as transmission range. Vahadat and Becker [42] introduced a message delivery technique, in which there is no connected path between source and destination. Initially, in mobile ad hoc networks, existing techniques available at that time were unable to counter this situation. Later on, it was adapted for opportunistic networks. us, epidemic routing was introduced where random pairwise interchanges of messages among participating nodes guarantee eventual message delivery.
e Epidemic routing protocol is one of the oldest routing protocols in opportunistic networks. e Epidemic routing protocol is easy to understand and implement. (b) Direct Delivery routing protocol: Spyropoulos et al. [43] presented this protocol with an idea of singlecopy routing in opportunistic networks. In this routing protocol, the message needs not to be forwarded via intermediate nodes rather; it is held by the sender node itself. It waits for sending the message until it comes into contact with the destination node directly. It is the most simple and easy to understand among all the protocols currently available in opportunistic networks. e methodology adapted is not sufficiently reliable as the sender node may have to wait for infinite delay for destination node come into its contact. If this kind of situation happens, the entire message will be lost as the whole network would have only a single of that message. Spyropoulos et al. [43] defined the formula for calculating ED direct delivery as follows: where K ⟶ transmission range of each node and N ⟶ covered area. (c) Spray-and-Wait routing protocol: Spyropoulos et al. [44] proposed this scheme with a focus to improvise the performance of the Epidemic routing protocol. It was found to be a better performer than Epidemic and other protocols that lie in the same category on  the ground of simulations as well as theory. With the increase of network size or connectivity level, Sprayand-Wait protocol also proved itself as a very scalable protocol. Also, Spray-and-Wait protocol generates less number of message replicas, thereby reducing the buffer space and relevant parameters. e functioning of this protocol can be divided into two phases, i.e., Spray phase and Wait phase. In the Spray phase, message replicas are broadcasted by source nodes among other nodes in its transmission range. All nodes accept the message from the source node and save it in their respective buffer. In the Wait phase, the nodes holding the message received from the source node wait for the opportunity to forward the message when another node comes into its contact [45].
e primary objective of Spray-and-Wait protocol is to reduce the number of message replicas to be forwarded like Epidemic routing protocol, thereby reducing the expected delay in data transmission. As per Spyropoulos et al. [44], the expected delay (ED) in Spray-and-Wait routing protocol is shown as follows: where H n ⟶ n th harmonic number, viz., H n � n i�1 (1/i) � ⊖(Log n) and n ⟶ total number of nodes. After the comparison between the formulas of expected delay of Spray-and-Wait and Direct Delivery, it may be easily concluded that Spray-and-Wait protocol saves a considerable amount of time in data delivery. (d) First Contact routing protocol: Jain et al. [46] developed a scheme that requires limited additional knowledge about network topology, considerably less than the entire topology. is scheme is known as the First Contact routing protocol. In this protocol, the sender node disseminates the message to the very first node it encountered, and this node forwards it to the next first encountered node. e process continues until the message is received by the destination node. e encounters between the nodes are based on random walk search. e message will be retained in the buffer of the node if it does not find any other node through the encounter. It is found experimentally that First Contact routing protocol performs poor as it forwards the node based on random encounter and no topology or geographic condition is taken care of for message transmission towards the destination node. It is easy for implementation and may be used as a better option for multicast messages. Packet dropping and high delays are some of the problems that arise due to the First Contact routing protocol.
(e) PRoPHET routing protocol: Lindgren et al. [47] proposed a new routing algorithm named Probabilistic Routing Protocol using History of Encounters and Transitivity (PRoPHET) in intermittently connected networks. It has similar functionality like Epidemic routing protocol, but the only difference is that in PRoPHET, every node participating in opportunistic networks calculates a "probabilistic metric" also known as delivery predictability for each evaluated/known destination which empowers the source node to find out the accomplishment of message delivery. Delivery predictability can be updated as per the following equation: where P init ∈ (0, 1) and a, b ⟶ nodes in the network. If a pair of two nodes does not have any experience of any cooperation in data forwarding due to any reason, their respective delivery predictability must be reduced as the time grows. erefore, delivery predictability may be updated as per the aging constant c [c ∈ (0, 1)] as mentioned in the following equation: where K ⟶ time units. Moreover, delivery predictability also follows the property of transitivity, i.e., if node A has high probability metric with node B and similarly node B has high probability metric with node C, then node A and node C would have also high probability metric due to the property of transitivity in PRoPHET protocol even though node A and node C do not have any recent experience of any cooperation in data forwarding. e following equation illustrates the effect of transitivity on delivery predictability: where β is a scaling constant and β ∈ [0, 1]. e computation of delivery predictability is done based on encountered nodes history or nodes visited history. At the point when two nodes came in contact with each other, summary vectors are interchanged containing delivery predictability. On the off chance that two nodes are encountered on a routine basis, they will have higher delivery predictability and those nodes which are having less predictability or never encountered have fewer changes of effective message delivery to the destination. e delivery predictability shifts from time to time. Simulation-based investigation explains that PRoPHET protocol takes fewer message interchanges, low communication overhead, and less delay and has a better packet delivery ratio when contrasted with epidemic routing. (f ) MaxProp routing protocol: Burgess et al. [48] proposed MaxProp protocol. is protocol is based on prioritizing two kinds of schedules, i.e., schedule of messages to be dropped and schedule of messages to be transferred to other nodes. e main aim of designing this protocol is to improvise delivery rate and average latency. It functions by ranking the stored packets in nodes' memory on the ground of cost assigned. e formula for calculating cost between source node a and destination node d is shown as follows: where f x x+1 ⟶ probability of successful message transfer from node x towards x + 1. MaxProp prevents duplication of packets and giving high priority to new packets. e priorities of the message are assigned based on the head start of a new message, hop count, previous intermediate nodes, and historical data. e functioning of MaxProp routing protocol starts from transmitting all the messages destined for the immediate neighbour in the network, after that, routing information is transmitted followed by acknowledgments of messages being delivered regardless of sender and receiver nodes. At last, high priority has been given to those messages which are not delivered to the destined nodes for communication. MaxProp protocol is found better than Dijkstra, ME/DLE, and random routing protocols after experimental evaluation. (g) Epidemic Oracle routing protocol: Jain et al. [46] presented it and placed under the category of knowledge-based routing protocols as it maintains a history of all participating nodes in the entire opportunistic network. Epidemic Oracle routing protocol carries the message to be forwarded until there would be enough probability of delivering the message to the right destination. It has a knowledge database concerning future connectedness; therefore, it falls under the Knowledge-based routing protocols. Epidemic Oracle routing protocol delivers a better delivery probability than Epidemic protocol, PRoPHET protocol, and Direct Delivery protocol, but sometimes it may lead to prolonged delays in a case when there would be no sufficient probability of delivering the message to the right destination. Like other routing protocols, one of the major objectives of this protocol is to achieve optimum delay. e expected delay (ED) in Epidemic Oracle routing protocol is described as follows: where e∈I v R k e,I q ⟶ summation of data segments of message K which is received by node v in time duration of I q , e∈O v X k e , I q ⟶ summation of all data segments of message K transmitted over edge e during the time duration of I ∈ I E , and (t q−1 − ω(k)) ⟶ time duration consumed since the start of message transfer. (h) FRESH routing protocol: Dubois-Ferriere et al. [49] proposed FResher Encounter SearcH (FRESH) algorithm for path discovery in opportunistic networks in an efficient manner. In FRESH, participating nodes maintain a record of their most recent encounter times with other nodes. When a node requires forwarding the message to some another node, then it searches for any intermediate node with having the most recent encounters and forward the message to it. e intermediate node follows the same process up to when the message reaches the desired location.
Calculating search cost (C s ) in finding a route between source s towards destination d can be considered as a composition of several successive searches and the mathematical expression is given in the following equation: where X i ⟶ positions of i th node and α ⟶ radius of the search area. FRESH protocol results in cheap route discovery by replacing a single whole network search to the series of small searches. It has been found experimentally that FRESH protocol reduces the flooding overhead to a considerable extent. (i) RAPID routing protocol: Balasubramanian et al. [50] presented the RAPID protocol to maximize the performance of specific performance parameters. It uses the utility function (U i ) to assign utility value to every message on the ground of the average delay parameter. Primarily, it involves routing of packets by replicating until a copy reaches to the destination node. At a transfer opportunity, it repeats a packet that locally brings about the most noteworthy increment in utility. By and large, U i is characterized as the expected contribution of i to the given routing metric. For instance, the metric limit average delay is estimated by adding the delay of packets. In like manner, the utility of a packet is its normal delay. Along these lines, RAPID is a heuristic dependent on locally improving marginal utility, i.e., the normal increment in utility per unit resource utilized. RAPID imitates packets in diminishing requests of their marginal utility at each transfer opportunity. e equation for calculating expected delay (ED) to deliver I is expressed as follows: where E(M x j z ) ⟶ expected time of x j to reach node z and n j (i) ⟶ the number of times each of the j nodes, respectively, required to contact the destination to deliver I directly.
It has been found through simulation that RAPID performs better than MaxProp, Spray-and-Wait, PRoPHET on the ground of average delay, packet delivery ratio, and overall efficiency in opportunistic networks.

Simulation Trends in Opportunistic Networks
Various researchers developed numerous simulators and made them available for simulation purposes. Some of the popular simulation tools are as shown in Table 1.
In addition to the abovementioned simulators, various custom-built simulators are also being an option for pursuing research in opportunistic networks. ese simulators help to share original coding work for its reuse in the future. Few examples of such simulators are MONICA [57], E-ONE [58], and UDTNSim [59].
Kuppusamy et al. [15] surveyed the simulation trend followed by researchers focusing on opportunistic networks. e results reveal that there has been a substantial increase in the use of ONE simulator during the current decade. Figure 5 presents the contribution of different available simulators towards OppNet research.
Also, Kuppusamy et al. [15] have brought in to light the fact that the foremost reason for selecting ONE simulator as a major tool is that it is capable of supporting the maximum number of participating nodes during simulation among all discussed simulators (except custom-based simulators). However, it has some limitations regarding the underlay layers such as the MAC sublayer, but that can be ignored for the research work of this paper. Further, it is also found as the most accurate simulator which allows the researcher to get results with the maximum number of QoS parameters among all its counterparts.
Based on the abovementioned details, it may be stated that ONE (Opportunistic Network Environment) simulator is the most widely used simulator among researchers. erefore, this paper uses ONE simulator for the implementation of the mentioned routing protocols aiming to cover a large group of researchers engaged in the opportunistic network research domain.

ONE Simulator. ONE (Opportunistic Network
Environment) is a Java-based discrete event simulator whose main functions are node movement modeling, routing, message-handling, and internode contacts, Result collection and analysis are achieved through visualization and other postprocessing tools.
e results which are generated as a result of the simulation are generally logs of events that are further processed by external tools such as Graphviz for plotting graphs. Figure 6 illustrates the simulation environment of ONE simulator. e popularity of ONE simulator is because it provides various tools to generate difficult mobility scenarios that are closer to real-life situations than any other available simulator in current time. Some of its features such as GPS Map data and Working Day Movement Model make it a better option to reality.
However, still, ONE simulator has some challenges; for example, the message generation process may perform better if group relationship and context information be added. Also, it must be mentioned here that several research groups are putting their efforts into enhancing supporting features in ONE simulator. Maybe, a newer version of ONE simulator will be added with some better features.

Performance Evaluation of Routing Protocols for Smart Spaces
Rigorous review uncovers the fact that though numerous routing protocols have been proposed by various eminent researchers, yet none of them has quantitatively evaluated them. e authors in this work showed that there is an urgent need to do the same to determine which protocol is best suited in a given environment. Keeping this in mind, the authors have meticulously compared the numerous protocols of opportunistic networks.
In this section, nine different routing protocols are compared based on standard Quality-of-Service (QoS) parameters by varying the number of participating nodes. It is believed that this simulation comparison will describe the performance behavior of different protocols on the ground of node density [26,38]. e main purpose of choosing node density as a primary factor is that it correlates to the real-life scenario of Smart Spaces very closely, for example, if we consider mobile handset device as participant node con-

Simulator Brief description
Adyton [51] (i) C++-based event-driven simulator (ii) Supports numerous routing protocols and real-world contact traces (iii) Also provides several congestion control mechanisms and buffer management policies MobEmu [52] (i) Java-based free simulator (ii) Capable of executing a mobility model or replay a trace, while applying the desired routing or dissemination algorithm Ns-3 [53] (i) Python-based free simulator under the GNU GPLv2 license (ii) Also supports a real-time scheduler that facilitates several "simulation-in-the-loop" use cases for interacting with real systems OMNet++ [54,55] (i) Free only for noncommercial organizations (ii) An extensible, component-based C++ simulation framework (iii) Runs basically on all platforms where a modern C++ compiler is available ONE [56] (i) Java-based free simulator (ii) Offers both keyboard and GUI interface for coding (iii) It allows researchers to design new protocols/architecture/framework in a very easy and defined way participant nodes would be at most 1 or even less than 1 per square km. e ratio of the number of nodes per square km becomes 100-150 when a normal highway situation is considered. It may be increased up to 200-250 when a busy pedestrian path is taken as an example. ere are many other real-life situations as well where node density differs as per the environment which directly affects the overall performance of Smart Spaces. erefore, this paper aims to find the suitability of the protocol being used in different scenarios. e simulation comparison will result in the performance of different protocols in different node densities; it will help upcoming researchers to choose routing protocol accordingly for establishing different Smart Spaces.

Common Parameters Used in Each
Case. Besides the variation in node density with a different routing protocol, several other parameters are kept constant to analyze the performance change only due to the change in several participating nodes. e details of these parameters are listed in Table 2.

Quality-of-Service (QoS) Parameters Used.
e comparison needs some standard parameters, so that the performance comparison could explain which is better and which is worse [60][61][62][63][64]. Table 3 explains the various standard parameters that have been taken to decide the behavior of routing protocols for a different number of participating nodes.
(1) Number of participating nodes: as already mentioned earlier, this paper aims to inspect the behavioral change of different routing protocols when several participating nodes vary to observe its suitability for setting up different Smart Spaces of different capabilities in different places for different purposes. e simulation study starts with several nodes 50 and it ends to 500 nodes in a particular simulation area (4500 × 3400 square meters). erefore, this paper considers it as the primary QoS metric for judging the quality of different routing protocols under various situations concerning node density.
(2) Message delivered: as per the message delivered is concerned, it is observed that FRESH routing protocol shows the best behavior for 50-250 nodes, but Spray-and-Wait protocol takes the lead as the participating nodes grow from 270 to 500. PRoPHET protocol also shows good performance after FRESH protocol for 100-250 nodes, but it lags when the number of nodes grows more than 250. Also, MaxProp starts giving good results when the number of nodes grows from 250 nodes. First Contact protocol behaves worse from starting values to the end, and also Direct Delivery protocol showed similar performance but somewhat better than First Contact protocol. Comparative performance may also be viewed by the following graph depicted in Figure 7. (3) Message dropped: it may be easily analyzed that FRESH protocol shows best behavior, i.e., zero message dropped in every case of node density. Direct Delivery protocol also shows the same but only when the number of nodes becomes more than 150. First Contact protocol also delivers minimal message drop after the FRESH protocol and Direct Delivery protocol. Epidemic protocol gives the highest most message drops up to the node density of 350 and also in the case when the number of nodes is equal to 450. Besides Epidemic, PRoPHET protocol follows the higher drop rate and delivers the highest message drops in node density of 500. e comparative graph is available for reference as depicted in Figure 8.
(4) Delivery probability: from the observations, it can be clearly stated that FRESH protocol shows the best performance up to the node density of 270. Sprayand-Wait protocol leads after the number of nodes is equal to 270 to 500, whereas the First Contact protocol and Direct Delivery protocol shows the worse performance on every case of the node number. e comparative graph is available for reference as depicted in Figure 9.
(5) Overhead ratio: the Direct Delivery protocol exhibits zero overhead ratio. Spray-and-Wait protocol also delivers the second-most lowest overhead ratio after the Direct Delivery protocol in every case of node density. As far as other protocols are concerned, Epidemic Oracle Protocol delivers almost maximum overhead ratio up to the node density of 150, Epidemic protocol leads after that, and PRoPHET protocol also exhibits the high overhead ratio but somewhat less than Epidemic for the number of nodes higher than 150 and Epidemic Oracle for the number of nodes less than 150. FRESH protocol also delivers a very less overhead ration up to the 200 nodes in the simulation area, but it slightly changes its behavior when it grows from 200 towards 500 in node density. Refer to the graph as depicted in Figure 10.
(6) Average latency: from the given graph as depicted in Figure 11, it may be easily concluded that Epidemic protocol gives the least average latency in the case of 50 nodes, but it surprisingly changes the behavior from least to higher values when many nodes grow from 50 to 100. Similarly, Direct Delivery protocol also behaves surprisingly. It exhibits considerable low average latency in case of node density of 50, 150, 250, and 350-450 as compared to the case when the number of nodes is 100, 200, 300, and 500. MaxProp and RAPID protocols consistently show a huge average latency in every case of node density. FRESH protocol shows the best performance in this Operating system e mentioned research is carried out on MS Windows 10 platform, but the ONE simulator is a Java-based application; therefore, its performance is independent of the platform being used n Involves the total number of participating nodes in the network including those nodes also which are not participating in communication at any instance.
e total number of messages successfully delivered by the sender node to the destination node via the intermediate node.
e number of intermediate nodes may vary following network topology and the distance between sender and receiver end.
e total number of messages lost due to any reason during communication between the sender node and receiver node in opportunistic networks.
It is the probability of successful delivery of a data packet originated from source node directed towards destination node via intermediate nodes and is a pointer of how solid the network is as far as message delivery.

5
Overhead ratio Overhead ratio � (( i�n i�1 M relayed -i�n i�1 M delivered )/( i�n i�1 M delivered )) e overhead ratio suggests the utilization of network resources and buffer space because of the utilization of different duplicates of a similar message to expand delivery possibilities. 6 Average latency e average time is taken by a data to be completely disseminated from a source node to the destination node. Less average latency denotes a good characteristic of a good routing protocol.    parameter; it continually grows as the number of nodes grows. See the graph as depicted in Figure 12. (8) Average buffer time: as per the buffer time is concerned, it can be easily understood that the Direct Delivery protocol needs least most buffer time when the number of nodes is greater than 150. FRESH protocol also requires considerably less buffer time throughout every case of node density. Also, it has been observed that the requirement of average buffer time of almost every routing protocol (observed here) reduces as the number of nodes increases except Spray-and-Wait protocol; rather, it shows that it requires more buffer time as the number of nodes grows. See the comparative graph as depicted in Figure 13.

Analysis of Performance Evaluation.
Total nine protocols (Epidemic protocol, PRoPHET protocol, Spray-and-Wait protocol, Epidemic Oracle protocol, MaxProp protocol, Direct Delivery protocol, First Contact protocol, RAPID protocol, and FRESH protocol) among the six different categories of routing protocols of opportunistic networks (flooding-based routing protocols, forwarding-based routing protocols, probability-based routing protocols, knowledge-based routing protocols, social relationship-based routing protocols, and hybrid routing protocols) over eight different QoS parameters (number of participating nodes, message delivered, message dropped, delivery probability, overhead ratio, average latency, average hop count, and average buffer time) have been thoroughly explored in this paper. Besides it, some protocols are observed superior in particular cases of node density concerning mentioned QoS parameters. A comprehensive evaluation of the suitability of routing protocols over node density has been prepared in Table 4 based on our simulation study.   (1) Epidemic protocol: it is a simple protocol that replicates the maximum message to be forwarded. It provides the best delivery probability in case of node density of populated environment and its average buffer time reduces as the node density increases. (2) Spray-and-Wait protocol: it must be termed as the finest routing protocol along with FRESH routing protocol among all discussed protocols in this paper. It delivers good performance and proved as a better option in all varieties of node density. It is also found better than FRESH protocol based on the criteria of overhead ratio, average hop count, message delivered, and delivery probability. (3) Direct Delivery protocol: it is the simplest protocol OppNet can have. It is a good protocol up to the node density of 400 nodes per square km. It provides zero packet drop and average delivery probability throughout all node densities. (4) First Contact protocol: First Contact protocol is suited well in node density ranging from 6 to 25 nodes per square kilometer. Packet dropping and high delays are some problems that arise in this protocol when node density increases. (5) PRoPHET protocol: PRoPHET protocol functions of the basis of the history of encounters and transitivity. Due to this feature, it achieves high delivery probability as compared to many traditional protocols. Like Epidemic, its average buffer time reduces as the node density increases. (6) MaxProp protocol: the primary objective of this protocol is to improvise delivery rate and average latency. It functions by ranking the stored packets in nodes' memory on the ground of cost assigned. It is proved a good choice in almost all categories of node densities in opportunistic networks. (7) Epidemic Oracle protocol: it falls under knowledgebased routing protocols as it maintains a knowledge database of all participating nodes in the entire opportunistic networks which makes it a good option for Sparse Opportunistic Network Environment. But its performance degrades when the number of nodes increases due to the overhead of knowledge database. (8) FRESH protocol: it is also the finest routing protocol along with Spray-and-Wait routing protocol in every case of node density discussed here. When compared to the Spray-and-Wait protocol, FRESH protocol is found better on the criteria of the number of messages dropped, average latency, and average buffer time. (9) RAPID protocol: this protocol uses utility function to assign utility value to every message on the ground of average delay parameter which helps it to perform well in every situation, but it is proved a good choice only for the extremely sparse and sparse environment when compared to the other routing protocols discussed in this paper.
It has been experimentally observed that two of the routing protocols (Spray-and-Wait and FRESH protocols) are found finest in every instance of node density. However, these routing protocols are leading as well as lagging to each other based on individual QoS parameters. e comparative performances of the two finest emerged protocols have been presented along with QoS metrics in Table 5.
From the observations made from Table 5, it can be summarized that Spray-and-Wait and FRESH protocols are exhibiting their best performance on different QoS metrics. However, due to the absence of common QoS parameters, it is hard to declare one protocol to be best among the discussed protocols on the mentioned criteria, but, for making a viable conclusion, one protocol must be declared as the best one.
To cope up with this problem, the importance of individual QoS metric must be evaluated based on its suitability for the best performance under Smart Space Environment. Literature survey [65,66] reveals the fact that certain QoS metrics such as message dropped, average latency, and average buffer time are of significant importance for accurate and fast delivery with least additional storage requirement other than data packet to be transmitted which is an ideal condition for receiving best results in Smart Space Environment. In light of this fact, it can be stated that FRESH protocol is optimally suited to Smart Space Environment.

Conclusion and Future Scope
is paper in depth explores various routing protocols of opportunistic networks which can be used for establishing Smart Spaces. It also discusses in detail various simulation trends prevailing in the arena of opportunistic networks. e protocols are thereafter compared based on node density to determine the best-suited protocol for building Smart Spaces in the given simulation environment. e paper concludes with the fact that Spray-and-Wait outperforms the FRESH protocol by giving better results on the 5 standard QoS parameters. However, with the eye and muscle of Smart Space Environment, the paper also highlights the fact that certain QoS metrics such as message dropped, average latency, and average buffer Time are of significant importance for getting the best outcome in Smart Space Environment. erefore, FRESH protocol must be considered as the best routing protocol suited for Smart Spaces Environment.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest regarding the publication of this article.