## 4 Enabling Applications and Platforms for Cyber Physical Sensor Network  
For monitoring remote sensor applications over the IP framework, cloud computing can provide a middleware cost effective solution to CPSN that provides a rich interactive communication platform. Since network communication costs a lot of bandwidth overhead for linking Virtual Machines (VMs) in data intensive environments, a decentralized approach, where migration of VM services is provided with monitoring of traffic fingerprints can relieve the wasted overhead. Also, in particular cases, faults can occur in the middle of a query from distributed databases. This can be fixed by dividing queries into sub-queries and mapping them in an intelligent way such that the results return on different nodes. A global middleware concept can be a convenient way to provide flexibility integration and discovery of sensor networks and sensor data. Such a middleware would be required to provide fast deployment of testbeds with distributed querying, filtering and aggregation of sensor data with support for dynamic adaptation of the system configuration parameters. This would be linked to the use of virtual sensor abstraction that can enable users to declaratively specify deployment descriptions in an open standard human readable language like XML. Such an approach becomes more powerful for remote monitoring once there is a possibility of integration of sensor network data through querying language like SQL over local and remotely available sensor network resources. Sensor Modeling Language (SML) can be used to represent any of the physical sensor's metadata like their accuracy, type, physical location and similar measures. In addition to SML, XML encodingwill be used for the measurement and description of the physical sensor specifications. The use of XML language allows encoding the sensors in a way that the implementation is available across several hardware platforms and operating systems through simple translation or use of a wrapper. A map for translating between physical and virtual sensor parameters can be used to translate commands. The concept of metadata in Sensor-Cloud perspective holds the importance of publishing the type and location of the sensor at the time of data generation. In CPSN, location for different data generating and terminating points would serve as a first class knowledge for many relevant applications [24]. Compared to outdoor location detection through GPS and similar approaches, indoor location estimation or localization proves more challenging. Typical systems proposed in this context such as the Bat and Cricket [25] relate to smaller scale environments, while to cope with newer demands of extended scaled up systems, pattern matching of data can be applied as a useful solution. Locating the event on the relevant sensor node when requested by a remote application is an important issue. Several methods have been proposed in the literature to account this issue. One method is to locate the physical sensors with data faults by assuming a mismatch between the sensor data rank and the distance rank. The command translating agent at the gateway side linked to the Cloud would directly depend upon the CPSN programming scope for implementation of remote sensor network monitoring using cyber physical systems [26]. Major aspects in the middleware programming scope are highlighted in Figure 7 where the code implementation can be done in a number of ways depending upon the sensor data and processing requirements. Typical sensor data processing implementations include sequential, event driven, functional and rule based filtering. An example of typical programming instance to be run on data sensing model is given in Figure 8 that uses an event driven approach to detect a sensor value that is categorized as a leak. The data access model for connecting the data base can be implemented using several combinations of steps like message parsing and use of mobile code for timely data retrieval (Figure 7).