1. A wireless sensor network comprising: a plurality of nodes that communicate over wireless communication links, wherein at least one of the plurality of nodes receives sensor data from a sensor; wherein the wireless sensor network is queried by specifying a set of events of interest; wherein for each event of interest included in the set of events of interest, a producer node included in the plurality of nodes identifies when that event of interest occurs and, when that event of interest occurs, transmits event data related to that event of interest to a consumer node included in the plurality of nodes; and wherein the query is expressed in a discrete event process algebra that is used to manage processing performed to implement the query.