# SIoT: A New Strategy to Improve the Network Lifetime with an Efficient Search Process
## 4 Our Proposal
### Main Steps  
The objective of this contribution is to create a social network that can improve network navigability, boost rapid service discovery, and prolong the network lifetime, knowing that the enhancement of network navigability alone is not sufficient to quickly search for a service. Algorithm 1 shows the main steps to achieve our objective. At first, the nodes create groups dynamically, where each group possesses only one master. Then, the master groups agree on a specific value using a consensus algorithm. After that, the friendship selection begins using the agreed value and other properties. The three steps above are applied once. ```
1./*Initial phase*/
2.Creation of groups
3.A consensus algorithm on a common value
4.Friendship selection
5./*Second phase*/
6.Sorting the friends
7.For each request
8.Service search process
9.//Resorting the friends if needed
10.End
11. The scenario of the proposed algorithm can be given in case of a smart city where a large number of devices are connected peer-to-peer and each device is surrounded by connected devices, such as, monitoring of temperature, monitoring of temperature, control electricity consumption, human detection movement, human detection, human detection, etc. The devices can request each other (one-hop communication) for a given service until the target device is found. The devices that exist in the same communication range could create a group dynamically according to some criteria (Section 4.2). Then the devices will create a social network by selecting a set of devices as friends (Section 4.5) that will be capable to achieve efficiency at the destinations of a device, for example, a detection movement device can use monitoring of temperature and monitoring of temperature devices as friends. For efficient service search, the devices sort their friends periodically (Section 4.6) considering the capability to process the incoming requests and rapid search process (Section 4.3). The social network is created to improve network navigability, to be a suitable network that can be used to prolong the network lifetime, and to support the optimal paths during the service search task. The service search can be launched after the creation of the social network. Each node sorts its friends in a decreasing manner in order to balance between the rapid search and the available resources. When a node does not find any friend that can provide or execute a given service, it chooses the friend on the top of the list to receive this request. ### Construction of Node Groups

The construction of groups is used principally to support a social network that improves the network navigability and initialize the balanced resources between friends. However, its role is secondary during the search phase. In IoT networks, there are nodes with a low number of connections and others with a high number of connections, and with different capabilities. Therefore, a semi-uniform distribution of density and resources is needed. Furthermore, the search process in lossy networks is often not exploited due to several reasons, such as the longest path length from the request to the provider, a high number of services, limited capabilities of the nodes, etc. To deal with these issues, the mechanism of groups is adopted as a key concept to achieve the given goals. A mechanism for automatic and self-organizing groups has been proposed, the groups are created according to two rules as stated below:

**Rule (1):** In an area with N neighbors, the node with a high number of connections has a priority to be the master group. **Rule (2):** The group with a low number of members has a priority to add a new node. Each node has information about its neighbor nodes (nodes that are in communication range) such as the number of connections, information groups (if they were constructed), etc.