MaD-WiSe: a distributed stream management system for wireless sensor networks