[IEEE 2011 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops) - Seattle, WA, USA (2011.03.21-2011.03.25)] 2011 IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOM Workshops) - Fidelity-based continuous query introspection and adaptation

Download [IEEE 2011 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops) - Seattle, WA, USA (2011.03.21-2011.03.25)] 2011 IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOM Workshops) - Fidelity-based continuous query introspection and adaptation

Post on 10-Mar-2017




2 download


Fidelity-Based Continuous Query Introspection and AdaptationChristine Julien1, Vasanth Rajamani2, Jamie Payton3, and Gruia-Catalin Roman41The University of Texas at Austin, c.julien@mail.utexas.edu2Oracle Corporation, vasanth.rajamani@oracle.com3The University of North Carolina at Charlotte, payton@uncc.edu4Washington University in Saint Louis, roman@wustl.eduAbstractIn this paper, we address the fidelity of informa-tion collected from distributed, interactive, pervasive comput-ing environments. Queries in these dynamic networks come intwo forms: snapshot queries and continuous queries. The formerexecutes through the network and returns values that satisfythe query criteria at a particular instant in time. The latterexpects a result that is updated over time to reflect changesin the system. The fidelity, or quality, of the results of thesequeries can be significantly impacted by the unpredictabilityof the dynamic network; as the query is distributed andexecuted, changes that occur due to network and environmentaldynamics can cause the query to miss potential results orto report inconsistent information. Our previous work hasshown how we can provide semantically meaningful statementsabout the fidelity, or quality, of the result of a snapshotquery in a dynamic networked environment. In this paper,we demonstrate how this fidelity can also be used to adapt acontinuous querys processing to make its execution best matchthe conditions in the underlying dynamic environment.I. INTRODUCTIONUnderstanding the fidelity of information in dynamicpervasive computing environments is an essential but largelyunexplored component in developing well-behaved appli-cations. Emerging pervasive computing applications arecharacterized by distributed networks of sensing devicesembedded into the physical environment. Mobile entities,including humans and vehicles, are also an integral part ofthese heterogeneous systems. To function in these spaces,applications must be context-aware, where context definesperceived situational awareness that stems from informationabout the surrounding environment. Understanding the fi-delity, or quality, of information collected about the environ-ment enhances decision processes and generates more well-informed, robust, and reliable applications that can moreexpressively and reliably adapt their behavior (and thus theirperformance) in response to a changing environment.Building such applications is difficult since the system isdynamic and processing is expensive. Applications queriespropagate through the network, generating results that mayor may not be correct, complete, or consistent, due to thenetwork and environmental changes during query process-ing. We consider two forms of queries: snapshot queriesand continuous queries. The former executes through thenetwork and returns values that satisfy the query criteriaat a particular instant in time. For example, in supportinga decision process on an automobile, an application mayquery for nearby gas stations. A continuous query providesa result that is updated over time to reflect changes inthe network of embedded nearby devices. For example,an automobiles application may continuously collect thelocations and velocities of nearby vehicles to monitor safetyconditions. Information about the fidelity of a continuousquerys evaluation within the pervasive computing interac-tion space can be used to assess tradeoffs between qualityand cost of execution, and to adapt the querys execution.We aim to develop a theory of the fidelity of queriesin a pervasive computing network to enhance the decisionprocesses of applications in these dynamic environments.Our original work developed a grounding theory of snapshotquery fidelity in these environments [13], [14], which wereview in Section III. We have shown that defining a contin-uous query as a sequence of snapshot queries can reduce thecost of monitoring in dynamic environments [17]; Section IIdetails our model of the environment and both snapshot andcontinuous queries. The contribution of this paper, reportedin Section IV explores how we can use reasoning about thefidelity of the component snapshot queries of a continuousquery to adapt a continuous querys processing to best reflectboth the environment and the applications requirements andexpectations.II. MODELING THE ENVIRONMENT AND QUERIESUnderstanding the execution environment is fundamentalto modeling their fidelity. We model a dynamic pervasivecomputing environment as a closed system of hosts in whicheach host has a location and data value (though a singledata value may represent a collection of values) [13], [14].A host is represented as a tuple (, , ), where is a uniqueidentifier, is the context (e.g., host location or networkinformation), and is the hosts data value.The global abstract state of such a network, a configura-tion (C), is simply a set of host tuples. To capture networkconnectivity, we define a binary logical connectivity relation,K, to express the ability of one host to communicate withanother. Using the values of a host triple, we can deriveThe Third International Workshop on Information Quality and Quality of Service for Pervasive Computing978-1-61284-937-9/11/$26.00 2011 IEEE 143.5inquery initiation boundquery termination boundactive configurationsC0 CnA0 AmFigure 1. Query bounds and active configurationsphysical and logical connectivity relations. For example,if the hosts context, , includes the hosts location, wecan define a connectivity relation based on communicationrange. K is not necessarily a symmetric relation; if it issymmetric, K specifies bi-directional communication links.We model network evolution as a state transition sys-tem where the state space contains possible configurations,and transitions are configuration changes. A configurationchange consists of: 1) a neighbor change; 2) a value change;or 3) a message exchange. To refer to the connectivity of agiven configuration, we give configurations subscripts (e.g.,C0, C1, etc.); Ki is the connectivity for configuration i.Consider the configurations shown in Figure 1. A singlesnapshot query may span such a sequence starting withthe configuration in which the query is issued (the queryinitiation bound, C0) and ending when the result is delivered(the query termination bound, Cn). Since there is processingdelay associated with issuing a query to and returning resultsfrom the network, a snapshot querys active configurationsare those within C0, C1, . . . , Cn during which the queryactually interacted with the network. Every component of aquerys result must be a part of some active configuration.A snapshot query can be viewed as a function from asequence of active configurations to a set of host tuplesthat comprise the result. Since a configuration is simplya set of host tuples, this model lends itself directly to astraightforward representation of a querys result (). In fact,the result is itself a configuration and directly correlates theresult with the environment in which the query was executed,simplifying the expression of the fidelity of query results.The ground truth of a continuous query is equivalent toa complete picture of the configurations (C0, . . . , Cj) overwhich the query is active. Since accurate evaluation of sucha query is feasible only in relatively static networks, weapproximate the results of a continuous query by modelingit as a sequence of non-overlapping snapshot queries, theresults of which are 0 . . . i. There is not necessarily a one-to-one correspondence between C0 . . . Cj and 0 . . . i sincea single snapshot query may itself execute over multipleconfigurations (see Figure 1). A continuous querys inquirystrategy includes the protocol used to implement the snap-shot queries and the pattern of snapshot query invocations(e.g., frequency). The result of a continuous query usuallyrequires integration over the sequence of snapshot queryresults. The result of a continuous query at stage i (i.e.,including the results of the ith component snapshot query)is i = f(0 . . . i), where f is an integration function.Integration defines how a sequence of results togetherprovide a result for the continuous query. An applicationmay be concerned about the quality with which the resultsreflect the sensed phenomenon; given feedback on this qual-ity, the application can adapt to network and environmentaldynamics by changing its inquiry strategy to provide betterresults. Inquiry strategies that achieve a high fidelity oftendo so at a high cost; applications may desire to weaken theinquiry strategy to reduce the overhead of query processing.We define an introspection strategy as a function over thesequence of results from the continuous query that monitorssome aspect of the quality of the continuous query. Anintrospection strategy can trigger an adaptation strategy thatgoverns changing the continuous querys inquiry strategy. Inthis paper, we investigate how a concrete measure of thefidelity of the component snapshot queries can be used asan introspection strategy for a continuous query.III. FIDELITY OF SNAPSHOT QUERIES: A REVIEWIn this section, we overview the fidelity of snapshotqueries [13], [14], which lays the foundation for our use ofthis fidelity as an introspection metric for continuous queries.To express fidelity snapshot query fidelity, we formalizethe relationship between the state of the network and aquerys result. We assign qualitative metrics (i.e., labels)to results; two of these fidelities (ATOMIC and WEAK)match the extremes currently available in mobile computingprotocols. The others show how a querys fidelity can bepartially, but not completely, weakened to express the qualityof a query given the dynamics of the execution environment.Using existing query processing protocols applicationscan insist on very strong semantic guarantees; if a strongsemantic is not possible, the protocol aborts. In our model, aquery with a strong fidelity should return only results fromthe same configuration. The ATOMIC fidelity requires thatthe query was performed on a single configuration (Ai(h))and returned a snapshot of exactly that configuration:atomic i : 0 i m = Ai(h)Setting equal to the configuration signifies not that theapplication uses all of the results but that they are allavailable, which is this fidelitys strength.Network dynamics make it not possible to capture aperfect snapshot. The ATOMIC SUBSET fidelity capturescases when all of a querys results come from the sameconfiguration, but the query cannot guarantee that the queryreturned the entire configuration:atomic subset i : 0 i m Ai(h)Here, is a proper subset of some active configuration.A slightly more complex semantic provides the queryissuer with a sense of what fraction of the results the querypossibly missed. If the returned result represents a large15sample of the possible results, the query issuer may havemore confidence in subsequent usage of the result. We referto this as QUALIFIED SUBSET because the result is qualifiedwith respect to the potential result. The formalization ofthe QUALIFIED SUBSET fidelity specializes ATOMIC SUBSETand requires that at least percent of the results that wereavailable in all of the active configurations are returned.Some existing protocols provide weak semantics with noguarantees. For this weak fidelity, the only assurance is thateach result existed in at least one active configuration.A slightly stronger version of WEAK fidelity is WEAKQUALIFIED. The results collected may come from across allactive configurations (i.e., they may not have existed at thesame time), but the query issuer is guaranteed to receive atleast some specified fraction of the possible results:weak qualified m[i=0Ai |hosts in()| > |hosts in(m[i=0Ai)|hosts in is a function that counts the number of unique hostsin a set that may contain multiple results from each host.IV. SNAPSHOT QUERY FIDELITY AS INTROSPECTIONQuery introspection is the process of determining if a con-tinuous querys inquiry mode is suitable, given the currentnetwork and environmental conditions. This decision is oftenrelated to the tradeoff between the desired properties of theresult and the cost of query execution.A. Defining Fidelity-Based IntrospectionTo support introspection, we apply adequacy metrics toquery results [16]. An adequacy metric, d, measures thelogical distance between a desired property of a continuousquery and properties of the query result. For each adequacymetric, the application can define an associated threshold ().This simple construction supports arbitrary adequacy metricsthat can enrich decision-making processes. In this section,we create such an adequacy metric based on the snapshotquery fidelity defined in the previous section.Our snapshot query fidelities fit into two classes atomic(or comparable) and non-atomic (or non-comparable). Inthe first class, the stronger semantics, all of the elementsreturned as part of the snapshot query are guaranteed to haveexisted at the same time, i.e., in the same configuration. Inthe weaker class, all of the results of the snapshot queryare guaranteed to have existed at some time during thequery execution, but nothing can be said about the temporalrelationships between individual items in the result.Intuitively and empirically, inquiry strategies that canachieve comparable fidelity semantics incur greater over-head. The query protocols that provide this semantic requireincreased interaction among the participants; exchangingmore messages incurs more resources. A continuous querycan also be labeled with a fidelity semantic. An intuitive wayto do this is to use the fidelities of the component snapshots,e.g., an application can define the fidelity of a continuousquery to be the minimum fidelity over a recent windowof snapshot queries. This is a conservative definition; anynon-atomic snapshot query within the window makes thecontinuous query non-atomic. This conservative definitionis based on the nature of integration; if one non-atomicsnapshot will be integrated with atomic ones, the resultingcontinuous query is effectively non-atomic. In this situa-tion, either the inquiry strategy should be strengthenedto generate more atomic snapshots that are integratable orweakened to reduce overhead. These decisions depend onapplication requirements; applications may need to specifytolerance for non-atomic results and for acceptable inquirystrategies (e.g., the frequency with which the continuousquery must be updated, regardless of fidelity). We use theseinsights to define introspection based on the fidelity ofsnapshot queries and an adaptation strategy that uses thisintrospection to adapt a continuous querys behavior.Si is the fidelity of the continuous querys ithsnapshot, and A is the set of atomic fidelities (e.g.,A = {atomic, atomic subset qualified subset}). We definedfidelity(w) based on the fidelity of the past w snapshots:dfidelity(w) =sum p : (k w) < p k Sp A :: 11wwhere k is the current snapshot. The value of dfidelity(w) isthe percentage of the w previous snapshot query results thathad an atomic fidelity semantic. If the value of dfidelity(w) isone, then the integrated continuous query over the previousw windows has an atomic semantic. An application canassociate a threshold with dfidelity(w); if the percentage ofatomic snapshot queries in a window of size w falls belowthe threshold, the continuous querys inquiry strategy shouldbe adapted, either to increase the quality of the continuousquery or to reduce its overhead.B. Defining Fidelity-Based AdaptationApplications use introspection to assess the continuousquerys quality. If the result does not meet the applicationsrequirements, adaptation strategies can change the query. Infidelity-based introspection, the application adapts its inquirystrategy to achieve higher fidelity results or less overhead.The following is a generic and simple structure for definingadapation strategies: I, freq, d, +/, I, freq, whereI, freq is an inquiry strategy, d is the introspection strategy, is the introspection threshold, and I, freq is a newinquiry strategy. I is the protocol used to process thesnapshot query, while freq is the frequency of the snapshot1In the three-part notation: op quantified variables : range :: expres-sion, the variables from quantified variables take on all possible valuespermitted by range. Each instantiation of the variables is substituted inexpression, producing a multiset of values to which op is applied. If noinstantiation of the variables satisfies range, the value of the three-partexpression is the identity element for op, e.g., true if op is .16queries. If the superscript of is +, adaptation is triggered ifthe value of d exceeds ; if the superscript is , adaptationis triggered if the value of d falls below .Adaptation strategies are highly application dependent.In using our fidelity-based introspection, some applicationsmay only be able to function if the continuous queryis atomic. Best effort applications may desire to focusexclusively on saving overhead. We define a sample setof adaptation strategies that straddles these tradeoffs. Forsimplicity, we look only at adapting the snapshot queryfrequency (i.e., I will not change), though one could alsoadapt the query protocol itself. Consider an applicationthat desires to achieve atomic fidelity if possible but isnot willing to incur more overhead than is associated withissuing the snapshot queries every 100ms. If the applicationcannot achieve atomic fidelity, even with a sampling rate of100ms, it desires to reduce the sampling rate to 1s to reduceoverhead. The following two adaptation rules achieve thistradeoff (I designates the single available query processingprotocol and w is an application-provided window size):I, > 100ms, dfidelity(w), 1, I, freq 100msI, (a) Percentage of atomic windows for varying query frequen-cies(b) Overhead of protocol execution (in bytes)Figure 2. Impact of query frequency on fidelity (max node speed = 15m/s, query ttl = 3 hops, number of hosts = 50)Figure 3. Impact of node speed on fidelity-based introspection (queryfrequency = 100ms, query ttl = 3 hops, number of hosts = 50)speed of the nodes increases to 5m/s after 20 seconds; to10m/s after 60 seconds, and to 15m/s after 100 seconds.We use our definition of dfidelity(w) with w = 5 and ourtwo adaptation rules from Section IV-B, with the threshold set to 0.8. Figure 4 shows the adaptation of the querysfrequency over time and the percentage of windows that areatomic over time. For brevity, we omit a plot of the querysoverhead; it exhibits the behavior expected given Figure 2.As Figure 4 shows, the continuous query rapidly adapts itsquery frequency to the changing conditions, which enablesthe continuous query to maintain a high level of fidelity.Our initial set of adaptation rules adjust the query fre-quency to compensate for decreased atomicity. A moreFigure 4. Impact of continuous query adaptation (query ttl = 3 hops,number of hosts = 50, max speed starts at 0m/s, goes to 5 m/s at 20seconds, to 10m/s at 60 seconds, to 15m/s at 100 seconds)sophisticated set could weaken the continuous query to testwhether the network conditions have changed such that aninquiry strategy with lower overhead may still achieve thequerys atomicity goals. Our second scenario begins like thefirst, but after 140 seconds, the maximum speed decreasesto 10m/s, after 180 seconds it decreases to 5m/s, and after220 seconds, it decreases back to 0m/s. We augmentedour adaptation rules to also periodically test a lower queryfrequency to see if the atomicity threshold would be violated.Specifically, after adequately maintaining the atomicity re-quirement for 10 snapshot queries at a given frequency,we decrease the query frequency by 100ms. This providesa third adaptation rule to the set listed in Section IV-B.The results for this scenario are shown in Figure 5, whichprovides the adapted query frequency and the resultingfidelities and overheads. This adaptation strategy still doesa good job of maintaining the atomicity requirement (witha few blips that result from testing higher query frequenciesthan were acceptable). More importantly, this continuousquery strategy maintains low overhead when possible, andincurs high overhead only when necessary to maintain theapplications desired atomicity.V. RELATED WORKQuery processing should adapt to the applications chang-ing environment [9]. In adapting query processing, the focusis typically to change the order of query operations tooptimize for dynamics. For example, Continuous Queries(CACQ) [11] rely on eddies [1] to determine the orderin which partial query results are processed. StreaMon [2]adapts a query plan to accommodate arbitrary changesin the data stream. These approaches use system-defined(instead of application-defined) adaptation. In model-drivenapproaches [8], a local model of the environment is used toanswer queries. The model obtains data from the networkonly when it cannot answer a query. Adaptive filters [12]use a model of the network to adjust the rate of updatesthat stream from each node in the network to a collectoras part of a continuous query; the adjustment is based on18(a) Atomicity given adaptation(b) Overhead given adaptationFigure 5. A smarter continuous query adaptation (query ttl = 3 hops,number of hosts = 50, max speed starts at 0m/s, goes to 5 m/s at 20seconds, to 10m/s at 60 seconds, to 15m/s at 100 seconds)acceptable tradeoffs between an applications tolerance ofnumerical imprecision and the current cost of sending up-dates. Such model-based approaches are not well-suited fordynamic environments because unpredictability counteractsthe temporal correlations that form the basis for the models.None of these approaches to adaptive query process-ing provide general support for dynamically adapting acontinuous query based on application-specified strategies,which is important because the application is explicitlytrading fidelity for cost [17]. Such reflection is common inmobile computing and middleware models [5], [6]; our workrecognizes the importance of reflection to the adaptivity ofmobile applications and provides a formal foundation forexposing information about query results to applicationsthrough a set of principled adaptation mechanisms. Otherrelated approaches have looked at query quality for web-based queries. This work has largely focused on how to filterquery results into those that are likely to be of high-qualityto the user [3] or to allow users to specify control parameterswith web-based queries that dictate their resolution [7].VI. CONCLUSIONSThe fidelity of query processing in dynamic pervasivenetworks depends heavily on the stability of the executingenvironment during query execution. In previous work, wedemonstrated how to associate semantic tags with snapshotquery results. Here, we extend that work and demonstratehow functions defined on these semantic tags can be usedto adapt processing of continuous queries. With respect toour goals, this adaptation allows a continuous query to learnfrom its previous results and change its operation to, forexample, increase the fidelity (usually at a higher cost) orreduce the cost (usually at a loss of fidelity).REFERENCES[1] R. Avnur and J. Hellerstein. Eddies: Continuously adaptivequery processing. In Proc. of SIGMOD, 2000.[2] S. Babu and J. Widom. StreaMon: An adaptive engine forstream query processing. In Proc. of SIGMOD, pages 931932, 2004.[3] C. Bizer and R. Cyganiak. Quality-driven information fil-tering using the WIQA policy framework. Web Semantics:Science, Services and Agents on the World Wide Web, 7(1):110, January 2008.[4] J. Broch, D. Maltz, D. Johnson, Y.-C. Hu, and J. Jetcheva.A performance comparison of multi-hop wireless ad hocnetwork routing protocols. In Proceedings of the 4th AnnualACM/IEEE International Conference on Mobile Computingand Networking, pages 8597, October 1998.[5] L. Capra, G. S. Blair, C. Mascolo, W. Emmerich, andP. Grace. Exploiting reflection in mobile computing middle-ware. ACM Mobile Computing and Communications Review,6(4):3444, October 2002.[6] A. Chan and S.-N. Chuang. MobiPADS: A reflective mid-dleware for context-aware mobile computing. IEEE TSE,29(12):10721085, December 2003.[7] Y. Chen, Q. Zhu, and N. Wang. Query processing with qualitycontrol in the world wide web. World Wide Web, 1(4):241255, 1998.[8] A. Deshpande, C. Guestrin, S. Madden, J. Hellersetin, andW. Hong. Model-driven data acquisition in sensor networks.In Proc. of VLDB, 2004.[9] A. Deshpande, Z. Ives, and V. Raman. Adaptive queryprocessing. Found. and Trends in DB, 1(1):1140, 2007.[10] M. Loebbers, D. Willkomm, and A. Koepke. The MobilityFramework for OMNeT++ Web Page. http://mobility-fw.sourceforge.net, 2008.[11] S. Madden, M. Shah, J. Hellerstein, and V. Raman. Contin-uously adaptive continuous queries over streams. In Proc. ofSIGMOD, 2002.[12] C. Olston, J. Jiang, and J. Widom. Adaptive filters forcontinuous queries over distributed data streams. In Proc.of SIGMOD, 2003.[13] J. Payton, C. Julien, and G.-C. Roman. Automatic consistencyassessment for query results in dynamic environments. InProc. of FSE, pages 245254, September 2007.[14] J. Payton, C. Julien, G.-C. Roman, and V. Rajamani. Semanticself-assessment of query results in dynamic environments.ACM TOSEM, 19(4), April 2010.[15] V. Rajamani and C. Julien. Sama: Static analysis for mobileapplications. In Proc. of HotMobile, 2010.[16] V. Rajamani, C. Julien, J. Payton, and G.-C. Roman. Inquiryand introspection for non-deterministic queries in mobilenetworks. In Proc. of FASE, March 2009.[17] V. Rajamani, C. Julien, J. Payton, and G.-C. Roman. PAQ:Persistent query middleware for dynamic environments. InProc. of Middleware, 2009.[18] A. Vargas. OMNeT++ Web Page. http://www.omnetpp.org,2008.19


View more >