## 6 Application of the Optimization Techniques: Routing Protocols
### Attribute-based or Data-centric Routing Protocols
#### 6.1.1 SPIN (Sensor Protocols for Information via Negotiation)  
In [9] the authors present a family of adaptive protocols, called SPIN (Sensor Protocols for Information via Negotiation), that efficiently disseminate information among sensors in an energy-constrained wireless sensor network. Nodes running a SPIN communication protocol name their data using high-level data descriptors, called meta-data. They use meta-data negotiations to eliminate the transmission of redundant data throughout the network. In addition, SPIN nodes can base their communication decisions both upon application-specific knowledge of the data and upon knowledge of the resources that are available to them. This allows the sensors to efficiently distribute data given a limited energy supply. Four specific SPIN protocols were simulated and analyzed: SPIN-PP and SPIN-EC, which are optimized for a point-to-point network, and SPIN-BC and SPIN-RL, which are optimized for a broadcast network.  
In point-to-point networks, the sender announces that it has new data with an advertisement message to each neighbor. When the neighbor receives the message, the node checks the metadata to know if it already stores the data item. If the neighbor is interested in the information, it responds with a request message. Upon receiving it, the sender transmits the information in a data message. The neighbor that receives the data, inform about its availability to its own neighbors with an advertisement message. The three-handshake protocol is then repeated. The described process is known as SPIN-PP. The algorithm SPIN-EC introduces a technique in the nodes so when their current energy resources do not exceed a predetermined threshold that allows them to complete the three hand-shake protocol, they do not participate in the process. The SPIN-BC and SPIN-RL variants extend the algorithm to support broadcast transmissions. In this way, one advertisement message can reach all the neighbors. In this case, the neighbors do not respond immediately with a request message but they must wait a random time. To optimize the process, a node different from the advertising one cancels its own request message when it detects another similar message. Taking into account the broadcast transmission, the advertising node also responds with just one data message even when it has received multiple request messages.  
\begin{table}
\begin{tabular}{l l l l l} \hline GAF & Yes & Yes & & & \\ LEACH & Yes & & & Yes \\ PEGASIS & Yes & & Yes & Yes \\ TEEN & Yes & & & Yes \\ DirQ & & & & Yes \\ SHRP & Yes & & Yes & Yes \\ SAR & & & Yes & Yes \\ Maximum Lifetime & Yes & & Yes & \\ Energy Aware & Yes & & Yes & \\ M-MPR & Yes & Yes & Yes & \\ \hline \end{tabular}
\end{table}
Table 1: _Cont._Additionally, SPIN-RL incorporates some reliability functionalities. Specifically, nodes keep track of the advertisement messages that they receive and their corresponding originators. If they send a request message, but the announcing node does not respond in a given interval, the node asks again for the data with a request message.  
Comparing the SPIN protocols to other possible approaches, the SPIN protocols can deliver 60% more data for a given amount of energy than conventional approaches in a point-to-point network and 80% more data for a given amount of energy in a broadcast network. In addition, in terms of dissemination rate and energy usage, the SPIN protocols perform close to the theoretical optimum in both point-to-point and broadcast networks. One of the major advantages of these protocols is that nodes are only required to know its 1-hop neighborhood.