sensor nodes. The most feasible form of reprogramming is remote reprogramming whereby the code is disseminated wirelessly while the nodes are deployed. Different reprogramming protocols exist that provide different levels of speed of operation, reliability, energy expenditure, requirement of code resident on the nodes, suitability to different wireless environments, resistance to DoS, etc. Popular reprogramming protocols are Deluge (2004), Trickle (2004), MNP (2005), Synapse (2008), and Zephyr (2009). Security Infrastructure-less architecture (i.e. no gateways are included, etc.) and inherent requirements (i.e. unattended working environment, etc.) of WSNs might pose several weak points that attract adversaries. Therefore, security is a big concern when WSNs are deployed for special applications such as military and healthcare. Owing to their unique characteristics, traditional security methods of computer networks would be useless (or less effective) for WSNs. Hence, lack of security mechanisms would cause intrusions towards those networks. These intrusions need to be detected and mitigation methods should be applied. There have been important innovations in securing wireless sensor networks. Most wireless embedded networks use omni-directional antennas and therefore neighbors can overhear communication in and out of nodes. This was used this to develop a primitive called “local monitoring” which was used for detection of sophisticated attacks, like blackhole or wormhole, which degrade the throughput of large networks to close-to-zero. This primitive has since been used by many researchers and commercial wireless packet sniffers. This was subsequently refined for more sophisticated attacks such as with collusion, mobility, and multi-antenna, multi-channel devices. Distributed sensor network If a centralized architecture is used in a sensor network and the central node fails, then the entire network will collapse, however the reliability of the sensor network can be increased by using a distributed control architecture. Distributed control is used in WSNs for the following reasons: Sensor nodes are prone to failure, For better collection of data, To provide nodes with backup in case of failure of the central node. There is also no centralised body to allocate the resources and they have to be self organized. As for the distributed filtering over distributed sensor network. the general setup is to observe the underlying process through a group of sensors organized according to a given network topology, which renders the individual observer estimates the system state based not only on its own measurement but also on its neighbors’. Data integration and sensor web The data gathered from wireless sensor networks