IV. Resource and service discovery through compatibility
4.3 Compatibility match and search mechanism
4.3.4 Network change adaptability
The mobility of nodes in an ad hoc network represent a challenge for the compatibility match and search mechanisms since not only the movement of nodes causes the topology to change, but also the network is susceptible to nodes arriving and leaving the network at any instant.
To deal with the changes in the network, when nodes receive a search request, they create and add an active search list containing all the searches currently running in the network. The information contained in the list is used to notify new nodes joining the network using a dissemination of the relevant information as described in section 4.2.
On the other hand, when a node leaves the network, the information contained in that particular node should be eliminated from the list and data table of other nodes. The communication routes are directly affected, and a recovery mechanism has to take action to ensure the connectivity among nodes, more details are described in section 4.4 of the chapter.
The active searches in the list remain alive until a response is received from a node in the network or a cancellation request is sent by the node that initially started the search process. In case a node decides to apply modifications to its active search request description, the cancellation request can be used by specifying explicitly the descriptions to be eliminated from a search. Hence, the cancellation request contains the search identifier 𝑛𝑛𝑛𝑛𝑅𝑅 and the set of service
39
descriptions to be modified or complete cancel command 𝐻𝐻𝑎𝑎𝐻𝐻𝑗𝑗𝑡𝑡 as the second parameter in the expression respectively:
𝑅𝑅𝐶𝐶 = {𝑛𝑛𝑛𝑛𝑅𝑅, �𝑛𝑛𝑆𝑆1, 𝑛𝑛𝑆𝑆2, . . 𝑛𝑛𝑆𝑆𝑆𝑆�} (13)
𝑅𝑅𝐶𝐶 = {𝑛𝑛𝑛𝑛𝑅𝑅, 𝐻𝐻𝑎𝑎𝐻𝐻𝑗𝑗𝑡𝑡} (14)
The nodes in the network that receive the cancellation request perform a check on the current entries of their active search lists and perform the modifications or completed cancellation of the search, disseminating the request to the neighbor nodes until reaching the maximum number of hops for message spread. If a node that initiated a search requests is no longer available in the network, the neighbor nodes will be notified through the neighbor detection procedure explained in section 4.2.1 and cancel the active search from the list.
Figure 10 shows the adaptability to network change for a node joining the network and cancellation of an active search among nodes participating in the same.
A search request 𝑅𝑅𝑆𝑆=
{𝑛𝑛𝑛𝑛𝑅𝑅, (𝑛𝑛𝑠𝑠1, 𝑛𝑛𝑠𝑠2)} is sent from node A d d
The active search list in nodes B and F shows the entry propagated by node
A new node D joins the network, the active search list of node B contains the entry previously sent by node A, and hence the information is transmitted to D from node B.
40
Figure 10: Search mechanism adaptability to network change and cancellation request process 4.4 Route Composition
The dynamic nature of mobile ad hoc networks requires solutions capable of adapting to the constant changes and variations among nodes in the network. The route composition has the objective of constructing the communication link between the nodes initiating a search process and the different services that fulfill the requirements of such search description. As opposed to fixed topology networks, the routes descriptions and construction cannot be assumed to be part of nodes’ knowledge, hence, mechanisms that create the links and allows nodes to communicate with each other are an essential part of a service discovery algorithm.
Section 4.2 mentions the necessary features used in the dissemination process that allows to trigger the route composition function, the following sections present the details of the same and operation mechanism to create the connectivity links.
The active search list in D is updated and a response is produced from node D directed to A.
A cancellation request is given by node A containing the data to eliminate 𝑛𝑛𝑠𝑠1 from the active search lists.
The contents in the lists of all
participating nodes are updated to no longer contain a 𝑛𝑛𝑠𝑠1 description.
41
4.4.1 Connectivity bridge formation
To create the connections between two particular nodes, a couple of considerations have to be taken, the first one is the group of neighbor nodes that can transfer the message 𝐴𝐴𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘𝑠𝑠 and the second one is the group of nodes that can be reached 𝐴𝐴𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑. The group of neighbor nodes 𝐴𝐴𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘𝑠𝑠 contains the node identifier information of the nodes participating during the message transferring.
In the dissemination layer explained in section 4.2 refers to the use of the data type tables containing the type of data handled by the node as well as the projection hops and node identifier of the service. The connectivity bridge formation works on the same principle of tables, each node in the network contains a Link Table (𝐿𝐿𝑇𝑇) used to record the known paths to different nodes that are relevant to others. The table relates the two groups mentioned previously as follow:
𝐿𝐿𝑇𝑇: 𝐴𝐴𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑 → 𝐴𝐴𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘𝑠𝑠 (15)
For a particular node 𝐼𝐼, the link table entry in its particular 𝐿𝐿𝑇𝑇𝑒𝑒 is called a bridge 𝐵𝐵. Multiple bridges can be contained in a single 𝐿𝐿𝑇𝑇𝑒𝑒. A bridge expression is described by:
𝐵𝐵𝑘𝑘= {𝑛𝑛𝑛𝑛𝐵𝐵, 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑, 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘} (16)
Where 𝑛𝑛𝑛𝑛𝐵𝐵, is the single identifier of a particular bridge, 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑 is the destination node reached through the bridge and 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 is the intermediate node to transfer the message towards the final destination. When a request is initiated in a node, the set of carriers 𝐻𝐻𝑛𝑛𝑡𝑡𝐷𝐷𝑖𝑖 use the information contained in the link tables to transfer the message towards a particular node, as well as providing the information to create new entries if a response message is created from a node.
Figure 11 shows a graphical representation of the link tables of different nodes and the bridge created during message transfer.
42
Figure 11: Link table and bridge formation in mobile ad hoc configuration
State 1 shows the initial state before a message is transferred in the network, the link tables 𝐿𝐿𝑇𝑇 are show for each node in the network with the 𝑛𝑛𝑛𝑛𝐵𝐵, 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑, 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 fields for each bridge entry.
State 2 shows a request initiated in node A and disseminated to the neighbor nodes B and F, the bridge entry is created in the link tables of the nodes receiving the message, the bridge identifier 𝑛𝑛𝑛𝑛𝐵𝐵 is created using the node identifier 𝑛𝑛𝑛𝑛𝑛𝑛 and a message counter exclusive to the link table of a particular node in the network. The fields 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑 and 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 contain the final destination node and intermediate node through which the message will be transferred, respectively.
State 3 shows a response message generated from node D directed to the request started by node A, hence, the entries in the link tables of node F and A contain the bridge identifier 𝑛𝑛𝑛𝑛𝐵𝐵 of node D and the information of 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑 and 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 is transferred to the entries of the nodes, creating the bridge that allows the communication within node A and node D. In this case, the link table in node B does not contain any entry to connect to node F or D, hence the communication between these particular nodes is not possible.
The communication paths or bridges are defined by the bridge identifier 𝑛𝑛𝑛𝑛𝐵𝐵, two different paths cannot have the same identifier. Hence, the process can create multiple paths that connect two particular nodes, but a single path cannot share its identifier with another. In case of nodes
State 1 State 2
State 3
43
joining or disappearing form the network, the connections created in a previous instance are constantly updated through the neighbor detection process explained in section 4.2.1.
As nodes join or leave the network, the connections should be modified to maintain the most optimal result in the tables. Different characteristics can be considered to choose the most ideal communication bridge to be recorded in a table, for the current work, the shortest path method is applied in the connectivity bridge formation process to achieve the result. Many factors and considerations can be studied for the development of more accurate or improved performance mechanisms, being a complementary part of the present work, it remains as a proposed improvement or future research topic for investigations.
4.4.2 Route control
Section 4.3.2 explains the search process that initiates when a node starts a search request, the message is propagated to the neighbor nodes. The route composition takes place after the search process is initiated, creating the bridge entries with the responses received from the different services available in the network that fit the search description requirements.
To adapt to the mobility of nodes in an ad hoc network and validate the entries in the link tables of different nodes in the network, update messages containing the necessary modifications or eliminations of entries in tables is applied. If a neighbor node 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘leaves the network, the destination nodes 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑 originally reached through the mentioned 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 are no longer available, hence the entries in the link tables containing the node no longer available should be modified or eliminated from the tables.
The elimination messages follow the expression:
𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒= � 𝑛𝑛𝑛𝑛𝑛𝑛, 𝑛𝑛𝑛𝑛𝐵𝐵1, 𝑛𝑛𝑛𝑛𝐵𝐵2. . , 𝑛𝑛𝑛𝑛𝐵𝐵𝑆𝑆� | 𝑗𝑗 > 0 (17)
Where 𝑛𝑛𝑛𝑛𝑛𝑛 is the single identifier of the node sending the 𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 message, and 𝑛𝑛𝑛𝑛𝐵𝐵𝑆𝑆 is the multiple bridge identifiers no longer available and that should be eliminated from the link tables of the different nodes participating in the communication. The dissemination of the message takes place through multiple hops among nodes in the network and each performs a check in their table entries and eliminate the matching results. The multiple paths that lead to a single destination node are only affected if it contain the bridge identifier specified in the elimination message, else the destination can still be reached and the communication link between the participating nodes is kept alive.
44
Figure 12 shows the elimination message function when a connection between two nodes is lost and the modifications in the link table entries of the affected nodes.
Figure 12: Bridge elimination after lost connectivity between two nodes in the network
State 1 shows the entries in the link tables of the different nodes in the network when the connection between node A and node F is broken.
State 2, the elimination message 𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 containing the node identifier of the nodes sending the message and the bridge identifier 𝑛𝑛𝑛𝑛𝐵𝐵 to be eliminated from the link tables of the nodes containing a match for the same. Node F produces a 𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 containing 𝑛𝑛𝑛𝑛𝐵𝐵 = A:1 which is the bridge identifier that was used to connect node F with node A, on the other hand, node A produces an elimination message with D:1 as bridge identifier.
State 3 shows the modifications in the link tables occurred after the elimination message is disseminated to the nodes in the network and the same perform the elimination process if a match is found in their table entries.
4.4.3 Route composition algorithm
The route composition function reacts to the events created in the network by nodes requests.
When a message is received by a node it performs a check to handle the message as a new link table entry in the particular node or an entry elimination due to node disappearance or link
State 1 State 2
State 3
45
connectivity loss. The bridge entry is created in the link table 𝐿𝐿𝑇𝑇 containing the bridge identifier, the intermediate communication node to carry the message and the destination node represented by the expressions 𝑛𝑛𝑛𝑛𝐵𝐵, 𝑛𝑛𝑒𝑒𝑒𝑒𝑑𝑑𝑘𝑘 and 𝑛𝑛𝑑𝑑𝑑𝑑𝑆𝑆𝑡𝑡𝑒𝑒𝑑𝑑, respectively. As mentioned in section 4.4.2, the elimination message contains the node identifier and the bridge identifiers of the entries that need to be eliminated from the link tables of participating nodes.
When an elimination message is received, a check of the different destination nodes is handled by the algorithm, the data received is stored in a variable to later disseminate through the neighbor nodes before being eliminated from the table of the respective node. The 𝑐𝑐𝐻𝐻𝑂𝑂𝑂𝑂_𝑐𝑐𝐻𝐻𝑗𝑗𝑗𝑗𝐼𝐼𝐼𝐼𝑗𝑗 sub-function is activated to start the dissemination of the message following the method explained in section 4.2 and this way allowing the neighbor nodes to make the proper changes in their link tables. Figure 13 shows the algorithm with the variables and data operating in the same.
Check n(i) ϵ Ntarget if true then
EliminateTarget(n(i), m.IDB, m.ntarget, m.nlink) melim (m.IDB, m.ntarget, m.nlink)
End
If Ntarget(i) > 0 then
For each Ntarget ntar in melim do GetNeighbor (ntar, melim data)
V. Protocol Assessment
The network simulator chosen for assessment of the proposed service discovery protocol is the discrete event simulator ns-2, popular and widely used in fields targeted at networking research for its support of TCP, routing and multicast protocols in both wired and wireless networks.
Section 2.2 expands the considerations and reasons of using network simulator results as validation for a protocol or solution, also a comparison and more detail study of the different network simulators, the capabilities and limitations of the same, can be found and referenced in Table 1 in chapter 2 of the present work.
The protocol is implemented using the Java Development Kit 7 or Java SE 7 with the update u65 as recommended by Oracle for its latest security fixes. The standard communication libraries and packages includes networking functionalities as well as sockets communication using either Datagram sockets or UDP sockets for transport of messages. The current work makes use of UDP sockets as the main communication mechanism, transferring messages and operating in the dissemination of the same between nodes in the ad hoc network environment.
The ns-2 network simulator allows to run a Java protocol using the AgentJ extension, hence the mentioned code written in Java is able to run in every node of the network in the simulation environment. The work in〔43〕presents a modification of the AgentJ extension and explains more in detail the functionality and capability of the same to allow Java protocols to run within ns-2 network simulator.
The network simulator requires a set of parameters to be set for operating in adequate conditions, the Table 2 presented in chapter 2 define the wireless communication and other aspects for the simulation, besides the mentioned parameters, section 5.1 introduces the settings and specifications that influence the outcome of results in the testing period.
5.1 Network and environment configuration
The environment for the simulation is created using three machines forming a secured local area network where nodes are free to move within the same. The environment is controlled in the main machine handling all the initial settings and triggering the random transmission of nodes throughout the network. Ubuntu operative system is installed and used in all machine of the network for the easy connectivity, robust behavior and fast accessibility to cloud server for data record.
47
To simulate the mobility of nodes in the network, the random way-point model is chosen for its characteristics, different mobility models are presented in the work〔22〕. The model allows nodes in the network to move using a range of velocities specified in the simulation parameters and random directions located within the provided network space and simulation area, an idle period is applied so nodes will remain in a certain position for a period of time before moving to a different location.
Figure 14 show the configuration of the environment where the simulation takes place.
Figure 14: Simulation environment for service discovery protocol
The parameters are set in a main machine controlling the settings and specifications to follow during the simulation, Table 3 shows the different parameters and the values selected for each for the execution of tests. A series of twenty repetitions have been made for each section of the tests to obtain an average of the results represented in the graphs, each execution generates data that is passed to a cloud server that handles the comparison and calculates the average for the final result to be displayed for a specific section of the simulation.
Data
Nodes Nodes
Nodes
Communication link Parameters setting
48
Table 3: Service discovery protocol parameters configuration for simulation
Parameter Value
Machine Intel Core i7-3770 CPU (x64) Intel Core i5-4200u CPU (x64) Intel Core 2 Quad-q6600 CPU (x64) Operative system Ubuntu 14.04 LTS
Network Secure LAN
Repetitions 20
Nodes 1000
Virtual environment area 800m X 800m Mobility model Random way-point
Node velocity Uniform distribution [0.5]m/s Mobility Interval 100s, 200s
Deciding an appropriate simulation scenario is a complicated but important process, the work
〔20〕presents several models that take into account two metrics for the creation of simulation scenarios that meet the evaluation standards:
- Average shortest-path hop count
The transition of a message from a node to a neighbor node via a communication link is defined as hop. The average shortest-path is the shortest average distance that can exist between two nodes in the network. In the mentioned work the average shortest-path hop count is taken by the equation:
𝐴𝐴𝑠𝑠𝑝𝑝𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻 = ∑∑𝑇𝑇𝑡𝑡=1𝑝𝑝𝑑𝑑𝑑𝑑ℎ𝑠𝑠ℎ𝑜𝑜𝑝𝑝𝑠𝑠𝑡𝑡
𝑇𝑇 𝑡𝑡
𝑡𝑡=1 (18)
49
Where 𝑇𝑇 is the number of snapshots constructed, ℎ𝐻𝐻𝐻𝐻𝐻𝐻𝑑𝑑 is the total number of hops among all node pairs at time 𝑡𝑡 and 𝐻𝐻𝐻𝐻𝑡𝑡ℎ𝐻𝐻𝑑𝑑 is the number of non-zero elements at time 𝑡𝑡 . For more details refer to the bibliography in〔20〕.
- Average amount of network partitioning
Refers to the proportion of node pairs that do not have a communication path between each other. The ANP (average network partitioning) is defined by the equation:
𝐴𝐴𝐴𝐴𝐴𝐴 = 𝑑𝑑(𝑑𝑑−1)𝑇𝑇∑𝑇𝑇𝑡𝑡=1𝑧𝑧𝑡𝑡 (19)
Where 𝑧𝑧𝑑𝑑 is the amount of node pairs without a connection path in between at time 𝑡𝑡, 𝑛𝑛 is the number of nodes making 𝑛𝑛(𝑛𝑛 − 1) the potential number of links and 𝑇𝑇 is the number of snapshots. Low network partitioning increase the possibility of message delivery during the evaluation of a protocol in MANET networks.
Following the equations presented above with the characteristics of the environment used in the present work the results obtained for average shortest-path hop count and average amount of network partitioning respectively are:
∗ 𝐴𝐴𝑠𝑠𝑝𝑝𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻 = 4.15
∗ 0 < 𝐴𝐴𝐴𝐴𝐴𝐴 ≤ 5%
Hence, the values for 𝐻𝐻𝑝𝑝 and 𝑇𝑇𝑇𝑇𝐿𝐿 in Table 3 are set much higher than the 𝐴𝐴𝑠𝑠𝑝𝑝𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻 required, allowing the messages to spread and fully cover the whole network used in the simulation, increasing the possibility of fully discovering the services scattered across the network and testing the protocol in an adequate scenario.
5.2 Dissemination layer message reduction
The dissemination relies on the transfer of messages hop by hop between nodes participating in the network, as described in section 4.2, a service is originally known by the node that offers it in the beginning, for other nodes to be aware of the available service, the dissemination takes place using messages to notify other nodes of the services. Similarly, the compatibility match and search mechanism makes use of the features of the dissemination layer to spread the search descriptions and find services that meet the requirements of it.
50
This particular part of the testing phase aims to compare and show the reduction of messages use during the dissemination layer and other processes relying on message spread when the data compatibility service discovery algorithm runs.
The graphs show a side by side comparison of the results when the algorithm does not run and when it does. As specified in the simulation parameters, a total of one thousand nodes is randomly spread across the virtual networked environment with the liberty of moving freely across the network. A variable amount of services from 20 to 200 are disseminated in random nodes in the environment with each service containing six data type (input & output) classified by an ontology.
Figure 15 shows the results of the comparison when the compatibility match service discovery is running against the outcome of a traditional service discovery protocol that does not make use of any compatibility mechanism among data types handled by the nodes. Two different node mobility intervals are applied during the simulation, where at first nodes will move every 100 seconds and the second set is the result when nodes move every 200 seconds.
Figure 15: Reduction of the amount of transferred messages in the dissemination process Figure 16 shows the performance of the compatibility match and search mechanism when using
Figure 15: Reduction of the amount of transferred messages in the dissemination process Figure 16 shows the performance of the compatibility match and search mechanism when using