The Stream System: a Data Collection and Communication Abstraction for Sensor Networks