1. An apparatus in a system comprising a wireless sensor network (WSN), a service cloud, and a device, the apparatus comprising: a virtual sensor configured to receive data from one of a plurality of physical sensors in the WSN; a virtual sensor controller configured to receive a request for the data and a format specification of the data from the service cloud or the device, and spawn a virtual machine (VM) on a VM host based on the request; and the VM configured to receive the data from the virtual sensor and transmit the received data to the service cloud or the device, wherein the virtual sensor controller is executed by computing resources and each of the plurality of physical sensors are configured to monitor and capture the data at different locations and the VM host is computing resources where the VM runs, wherein the VM comprises: a slave VM configured to receive a first data from a first virtual sensor, and a master VM configured to receive a second data from a second virtual sensor, receive the first data from the slave VM, and transmit the first and second data to the service cloud or the device, wherein the slave VM is changed to another master VM to move and manipulate the data, wherein the another master VM is configured to receive a third data from a third virtual sensor, receive a fourth data from another slave VM, and transmit the third and fourth data to the service cloud or the device.