1. A method of driving a sensor based application, comprising: generating a context hierarchy for the sensor based application, wherein the context hierarchy comprises a plurality of contexts, each context being either a static context having no associated sensors from a sensor network or a dynamic context having at least one associated sensor from the sensor network, wherein the plurality of contexts includes at least one static context and at least one dynamic context; discovering a set of sensors from the sensor network using the context hierarchy, wherein each sensor included in the discovered set of sensors is associated with a dynamic context from among the plurality of contexts, wherein the discovered set of sensors includes only sensors from the sensor network that are needed to meet a goal of the sensor based application; reading data values from the discovered set of sensors; applying the data values read from the discovered set of sensors in the sensor based application; setting a priority for the at least one dynamic context of the plurality of contexts, wherein the priority of the at least one dynamic context is set by a superior context within the context hierarchy, and the priority does not exceed a priority of the superior context; and adjusting the priority of the at least one dynamic context based on an amount of use of the at least one associated sensor corresponding to the at least one dynamic context.
1. A method of driving a sensor based application, comprising: generating a context hierarchy for the sensor based application, wherein the context hierarchy comprises a plurality of contexts, each context being either a static context having no associated sensors from a sensor network or a dynamic context having at least one associated sensor from the sensor network, wherein the plurality of contexts includes at least one static context and at least one dynamic context; discovering a set of sensors from the sensor network using the context hierarchy, wherein each sensor included in the discovered set of sensors is associated with a dynamic context from among the plurality of contexts, wherein the discovered set of sensors includes only sensors from the sensor network that are needed to meet a goal of the sensor based application; reading data values from the discovered set of sensors; applying the data values read from the discovered set of sensors in the sensor based application; setting a priority for the at least one dynamic context of the plurality of contexts, wherein the priority of the at least one dynamic context is set by a superior context within the context hierarchy, and the priority does not exceed a priority of the superior context; and adjusting the priority of the at least one dynamic context based on an amount of use of the at least one associated sensor corresponding to the at least one dynamic context. 2. The method of claim 1 , further comprising: setting a level of interest for each of the plurality of contexts, wherein the level of interest of at least one of the plurality of contexts is set by the superior context within the context hierarchy, and the level of interest does not exceed a level of interest of the superior context.