# Software Defined Networks in Wireless Sensor Architectures
## 4 Emerging Sensor Networks: Software Defined Sensor Networks
### Software Defined Sensor Networks Challenges  
Therefore, SDSN get the best features of the union of WSNs and SDNs due to the design of Sensor OpenFlow [13]. One of the achieved advantages is the versatility since they are able to support several applications without installing any software (plug-and-play). Another benefit is the flexibility in terms of a quick change in the network behaviour due to the centralized control. In addition, the ease of management to control the network through an open Application Programming Interface (API) is a very important factor in these types of networks. SDSNs have inspired several applications. [PERSON] et al. [62] propose the DASN project, which is the acronym for the Demand-Addressable Sensor Network. The purpose of this project is to build a sensor network that is able to perform sensing tasks based on user requirements. These demands are searched within sensor nodes and, if the requests are satisfied, such requests are mixed with more data in the network and are finally displayed to the user through a terminal. SDSNs present some technical challenges [13] in that the research community tries to solve proposing several solutions. The first issue belongs to data flows (data plane), which are composed of packets and their addressing. In contrast to SDNs, WSNs do not use IP addresses, but employ addressing through attributes (e.g., sensor nodes over N atmospheres). The problem is solved with the inclusion of IP addressing (IPv4 [63] and IPv6 [64]) within WSNs. In the same way of the previous problem, the sensor OpenFlow channel [20] provides TCP/IP connectivity in the sending of data, and, as stated before, WSNs do not incorporate this addressing. An approach to give a solution to such a problem is using transport protocols over WSN, and, then, traffic will be delivered in its target. Moreover, since WSNs are sensitive to every change in the environment, the overhead of the network control traffic supposes a huge problem. Developing an algorithm that only sends the first packet when a table-miss is occurred, reduces the overhead of the network until the flow-mod message arrives. Finally, traffic generation is the most important issue in WSN since data packets that are sent from sensor nodes augment the traffic across the network. Adding a module that generates traffic in the network using synchronous, asynchronous and round-robin methods proposes a solution to control the amount of traffic in the network. [PERSON] et al. [65] propose an approach to use the OpenFlow technology within a WSN. Moreover, they expose four ideas to be developed in sensor networks in order to achieve an increment in reliability: firstly, it presents the concept of flow-sensor instead typical sensor that are being used in the present. Secondly, the use of the OpenFlow protocol in the communication between the flow-sensors and the controller. Thirdly, the traffic flow belonging to control messages (control plane) does not interfere in the data traffic (data plane). Finally, it intends to achieve a fool-proof routing in both traffic directions. Its main feature is the routing procedure to forward the data traffic. It assigns a value (cost) to all available routes in the network, and, after that, it saves each computed route in a tree structure. Once the routes' tree has been calculated, the routing optimizer chooses the best route in terms of the number of hops that it is composed of. It will choose as the best route the one with a minimal number of hops. Nevertheless, if a problem occurs in a sensor node and it becomes inactive, the route optimizer will pick the second best route following the same choosing parameters. Another challenge is the resource allocation and its management. In this way, [PERSON] et al. [66] propose some ideas to manage network resources efficiently: data-aggregation only when is necessary, flexibility in routing paths and energy saving in sensor nodes when the radio is not working.