Real-Time Data Analytics in Sensor Networks