A message-oriented middleware for sensor networks