Asynchronous Event Detection for Context ... - Semantic Scholar

7 downloads 0 Views 5MB Size Report
He received his PhD from Digital Enterprise Research Institute, National University ... His research interests include process-aware information system, service-.
Int. J. Ad Hoc and Ubiquitous Computing, Vol. 0, No. 00, 2012

1

Asynchronous Event Detection for Context Inconsistency in Pervasive Computing Daqiang Zhang School of Computer Science, Nanjing Normal University, Nanjing, China E-mail: [email protected]

Zhangbing Zhou School of Information Engineering, China University of Geosciences (Beijing) E-mail: [email protected]

Qin Zou School of Computer, Wuhan University, Wuhan, China E-mail: [email protected]

Tianyi Zhan Department of Computer Science, Nanjing University, Nanjing, China E-mail: [email protected]

Minho Jo* College of Information & Communications, Korea University, Seoul, South Korea E-mail: [email protected] *Corresponding author Abstract: Event detection for context inconsistency is challenging in pervasive computing environments, where contexts are often noisy owing to fragile connectivity, node frequent movement and resource constraints. As a recent scheme, CEDA — Concurrent Event Detection for Asynchronous inconsistency checking (CEDA) — concurrently detects context inconsistency by exploring the happened-before relation among events. Nevertheless, CEDA suffers from several problems — unscalable from partial centralized detection manner, heavy computation complexity and false negative. To address these challenges, we propose in this paper the SECA scheme — asynchronous event detection for context inconsistency in pervasive computing. It puts forward a new type logical clock — snapshot timestamp — to check event relations, which enables it to be efficient in the scenarios where CEDA fails to. Meanwhile, SECA comes up with a lightweight update mechanism for the snapshot clock, which considerably reduces time and space complexity. Extensive experiments have been conducted and results show that SECA surmounts CEDA with respect to detection accuracy and scalability. Keywords: Context Inconsistency; Context-awareness; Event Detection; Snapshot-based Timestamp; Pervasive Computing. Biographical notes: Daqiang Zhang ... Zhangbing Zhou is an associate professor at China University of Geosciences (Beijing). He received his PhD from Digital Enterprise Research Institute, National University of Ireland, Galway. His research interests include process-aware information system, serviceoriented computing, cloud computing, and sensor network middleware. Qin Zou received his PhD from Wuhan university, China in 2012. From Oct. 2010 to Oct. 2011, he was a visiting student at the Computer Vision Lab, University of South Carolina. His research interests involve computer vision, machine learning, ubiquitous computing and intelligent transportation systems. Tianyi Zhan is a PhD student at Nanjing University. Her research interests include multiagent system, mechanism design, algorithmic game theory. Minho

c 2009 Inderscience Enterprises Ltd. Copyright ⃝

Jo

...

2

D. Zhang et al.

1 Introduction Growing convergence of wireless communication technologies, hand-held devices and embedded systems has fostered an attention to pervasive computing, which is a new computing paradigm shift from distributed system (1). The new paradigm aims at creating intelligent spaces so that users access services from spaces without awareness of underlying technologies. This kind of intelligence is chiefly achieved by contextawareness that refers to a mechanism that assists pervasive applications in adapting to varying contextual information. Contexts are pieces of information that captures the features of pervasive computing environments (2). Owing to the context noise caused by unreliable connectivity, resource constraints and dynamic context evolution, context inconsistency remains open (3). For instance, a RFID-based application may obtain two pieces of location contexts: the user is in the living room and the user is in the kitchen owing to the RFID data noise or signal interference (4) (5) (6) (1). A wide spectrum of schemes for context inconsistency checking have been proposed over the past three years. In (7; 8; 9), hidden rules and axioms from ontology have been exploited to check context inconsistency where contexts were denoted as assertions. In (2), two policies drop-all and drop-best were proposed to resolve context inconsistency where contexts were modeled by tuples. Nevertheless, these two schemes did not delineate the context inconsistency checking. In (10), a treebased checking scheme on top of the first-order logic was reported, which detected context inconsistency by refining consistency trees using context constraints. To further extend the work, (11) reported the manners by which the context consistency was built and checked with partial constraints. However, most existing schemes are seriously limited by two problems. They require central control or centralized, which incurs their less scalability in large-scale pervasive computing environments with a huge number of nodes. Moreover, they implicitly assume that contexts being checked belong to the same snapshot so that they could not fairly measure the temporal relations among context events. For the above RFIDbased location acquisition, they could detect the context inconsistency with the assumption that these two pieces of location context took place at the same time. This assumption is criticized in (4) and (12) because it may not hold in some pervasive computing environments that concurrent events (formal definition as Figure 5) are normal owing to the asynchronous communication and network delay. To eliminate the above two assumptions, CEDA (Concurrent Event Detection for Asynchronous inconsistency checking) (4) was proposed. Intuitively, it mapped context inconsistency checking into context event detection, and checked concurrent context events based on the happened-before relation. CEDA has three limitations. Firstly, it checked event inconsistency in a centralized manner, incurring its less effectiveness

in large-scale pervasive applications. Secondly, it introduced false negative because happened-before relation could hardly capture all event relations accurately. Finally, CEDA suffered heavy time and space complexity, resulting in its poor performance. Figure 1 illustrates the fairness of central-based systems in detecting context inconsistency among n nodes. All nodes are in the same environment, and every node acquires one kind of context and delivers contextual information to central node D by m message. Thus, the node D will get m ∗ n communication overhead, n times as much as that of the normal node, (e.g., node A or F ).

m m m m

m m

Figure 1

The fairness of central-based systems in event detection for context inconsistency. The numbers in the figure refer to the corresponding link’s bandwidth demand.

To address the challenges of the current schemes, we propose in this paper SECA scheme – asynchronous event detection for context inconsistency in pervasive computing environments, which is built based on time snapshots and logical clocks. SECA detects context inconsistency in a distributed manner, which enables checking nodes not to be blocked or to become system bottlenecks. It adopts logical clocks rather than vector clocks to evaluate event relations. In order to be scalable, SECA customizes logical clocks by holding the value part. Thus, it detects event relations that CEDA can and cannot support. Theoretical analysis and extensive experimental results show that SECA achieves higher detection accuracy than that of CEDA in a more scalable manner. To summarize, the main contributions of this paper are the following three-fold. • SECA scheme is significantly improved compared with the state-of-the-art detecting techniques, such as CEDA scheme from the performance aspect. Specifically, CEDA is a central-based checking system, which makes the payload of the system heavy. In contrast, SECA achieves its function in a fully distributed manner.

Asynchronous Event Detection for Context Inconsistency in Pervasive Computing • SECA scheme can detect false negative scenarios where CEDA fails to. We also conduct theoretical analysis to discuss about the reasons that SECA can while CEDA cannot. • SECA scheme respectively reduces CEDA’s complexity of time and space from O(n2 ) to O(n) and from O(1) to O(n), where n is the number of nodes in a pervasive network. Preliminary result of this paper has been reported in our previous work (13; 14). This paper gives a more comprehensive presentation and discussion about the asynchronous event detection for checking the context inconsistency, including details of definitions, tractable algorithms, and evaluation of the algorithms. The remaining of this paper is structured as follows. Section 2 provides an overview of the existing work. Section 3 briefly introduces the background knowledge that is the basis of our work. Section 4 presents the design of SECA scheme, following by theoretical analysis. Section 5 reports our extensive experimental results. Section 6 concludes the paper and point out directions of the future improvement.

2 Related Work Context-awareness is a main mechanism for pervasive computing that enables people to unobtrusively access services without the awareness of underlying technologies. Noisy contexts usually lead to contextaware applications incongruous behaviors and user perplexed feelings. Hitherto, context inconsistency detection has drawn increasing attention in recent years. A bunch of schemes have been proposed in the existing literature. In (7) (15), ontology was used to model contexts and their properties. In (8) (9), context consistency was specified by ontology assertions such that it could be checked by hidden rules and axioms in ontology. In (10), context consistency was modeled by tuples and inconsistency checking was mapped to the comparison among the elements in tuples. This kind of context inconsistency was resolved in (2), where three resolution policies including drop-all and dropbest had been proposed. To further detect context inconsistency based on first order logic, (11) reported the work that built context consistency trees and refined these trees by checking partial constraints. However, most existing schemes suffer from a couple of problems. They are heavily centralized or require central control, which incurs their ineffectiveness in large-scale pervasive environments or pervasive applications. Moreover, they do not consider the event relations, particularly temporal relations. As a matter of fact, most of them implicitly assume that contexts being examined belong to the same snapshot. This assumption may not always be satisfied in pervasive computing environments, which are characterized by asynchronous cooperation and

3

schedule. Note that DCCI (12) reported the work that detected context inconsistency in a peer-to-peer manner. However, this work also relies on the above two assumptions. CEDA (4), as a derivation of (16), took event temporal relations into account and presented a scheme on the basis of happened-before relation. It consisted of a checker process that determined context inconsistency, and several normal processes that reported the values of event vector clocks. However, CEDA was a semicentralized scheme in which the checker process might be the system bottleneck when the system scale increases. Another prominent issue is that its communication overhead was heavy, since normal processes reported their observations from time to time owing to the frequent happened context events. Taking RFID for example, a reader gets around 50 values each second from the same tag as usual (5). In addition, CEDA ignored some false negative scenarios, which affected its detection accuracy. It is worthwhile to mention that our work SECA is similar with IEEE 1516 time management (17) (18) with several differences. • Firstly, we share the similar idea in time management in IEEE 1516. We focus on the concept of snapshot timestamp, as well as its characteristics with theoretical analysis. While IEEE 1516 emphasizes on the usage of time management with distributed time clocks. • Secondly, we develop and implement the snapshot clock for concurrent event detection, while IEEE 1516 is a standard that does not provide a way to checking event concurrency detection. Actually, IEEE 1516 is designed for simulations to ensure that temporal aspects of the system under investigation are correctly reproduced by the simulation model. • Finally, SECA is an independent scheme and can be customized for personal computers, and smart devices. While IEEE 1516 relies on federates and the Runtime Infrastructure (RTI), because it is just a part of IEEE 1516 standard. IEEE 1516 time management can be extracted as an independent module after modification. In addition, IEEE 1516 is more complex than SECA, providing various functions that are not mentioned in SECA, e.g., clock synchronization and time compensation. Consequently, we find it appropriate to revisit the event relation in asynchronous pervasive computing environment. Owing to the absence of a global clock and absence of 100% accurately synchronized clocks, logical clock was introduced in (19) and happened-before was designed to measure event relations. In this paper, SECA customizes a logical clock for event detection of context inconsistency. Theoretical analysis and experimental results show that SECA address the issue of context

4

D. Zhang et al.

inconsistency detection with an accurate and scalable manner.

3 Background In this section we introduce happened-before relation. Then we give an overview about the logical clock and Lamport’s algorithm. Finally, we briefly present what vector clock is.

3.1 Happened-Before Relation The happened-before relation is coined in (19). It refers to a way of ordering events by the potential causal relation of pairs of events in a concurrent system, particularly asynchronous distributed systems. Suppose a single process is a set of events with a priori total ordering, the events of a process form a sequence, and sending or receiving messages in a process is an event (20). Thus, the happened-before relation denoted by ”→”, is given as Definition 3.1. Definition 3.1 The “→” among events of a system is a relation such that:

By Definition 3.2, the clocks of the entire system is represented by the function C that assigns to any event a the number C(a), where C(a) = Cj (a) if a is an event in the process Pj . Thus, only when one of following conditions is satisfied, the happened-before relation is true: 1. Events a and b are in the same Pi , and a occurs before b, then Ci (a) < Ci (b). 2. Event a in the process Pi sends the message to an event b in the process pj , then Ci (a) < Ci (b). Let P0 , P1 and P2 be three processes, and a, b, ..., k be events. All events are counted by Lamport’s logical clock algorithm. Figure 2 illustrates an example using Lamport’s logical clock, which partially orders the events happened in P0 , P1 and P2 . Lamport’s logical clock algorithm gets local events sequenced, e.g., a and b events. However, it causes an issue of identical timestamps and thus it hardly states which events are causally related. For instance, whether events a and f may have the same timestamps or not. To address the identical timestamp issue, vector clock is introduced. (a,1)

1. If b and c are events in the same process, and b occurs before c, then b → c. 2. If b is sending a message by one process and c is the receipt of the same message by another process, then b → c. 3. If b → c and c → d, then b → d. Note that any event cannot occur before itself, i.e., b 9 b for any event b. Two events b and c are concurrent if both b 9 c and c 9 b. In fact, the happened-before relation is a kind of strict partial order, which is inherently transitive, irreflexive and asymmetric. Note that the processes that compose a distributed system have no knowledge of the happened-before relation unless they are ordered by a logical clock, e.g., Lamport clock or vector clock (21) (22). Even though one event b occurs physically earlier than another event c, this does not imply that b → c. For the same reason, b → c neither indicates that the event b occurs physically earlier than the event c.

3.2 Logical Clock Logical clock is introduced in distributed computing owing to the lack of global physical clocks and completely accurate synchronization clocks. It is a mechanism for capturing causal and chronological relations between events. It is defined as follow: Definition 3.2 Given an event a in a process Pi , the corresponding logical clock Ci is a function that assigns a number Ci (a), where the number is regarded as the time when the event occurred.

(b,2)

(c,3)

(f,1)

(d,4)

(g,4)

(e,5)

(k,5)

(j,6)

Figure 2

An example of Lamport’s logical clock. b, (2, 0, 0)

d, (2, 2, 0)

c, (2, 1, 0)

f, (2, 2, 2)

Figure 3

An example of vector clock.

3.3 Vector Clock Vector clock refers to a mechanism for partially ordering events in a distributed system and detecting causality violations. The vector clock of a holistic system is an array/vector of N logical clocks, and every process maintains a clock. A local smallest possible value copy of the global clock-array is kept in every process. Figure 3 shows an example of vector clock. V C(b) < V C(c) ⇔

∀j [V Cj (b) 5 V Cj (c)] Λ ∃k [V Ck (b) < V Ck (c)]

(1)

Let V C be a function of assigning the number V C(a) to an event a, where V C(a) = V Cj (a) if a is an event in the process Pj . Equation 1 gives the judgement of

Asynchronous Event Detection for Context Inconsistency in Pervasive Computing vector clocks of two events b and c. Thus, happened-before relation in vector clock is given by Theorem 1. Theorem 1:

If V C(b) < V C(c), then b → c.

Vector clock is promising for event ordering, but it has several conspicuous issues. First, it requires that every process maintains an array to record the logical clock values of all processes. Second, it is designed under an assumption of a fixed set of participants (23). This assumption may not be held in asynchronous pervasive computing environments, where nodes are able to join or leave pervasive networks randomly. The same issue appears in Lamport’s logical clock. Consequently, these logical clock algorithms are inappropriate to be used in pervasive scenarios due to changing numbers of participants and churns.

4 Asynchronous Event Detection for Context Inconsistency in Pervasive Computing In this section, we propose a scheme for event detection for context inconsistency in pervasive computing environments. We introduce the system model, and then depict the system design in detail, followed by discussions.

4.1 System Model Pervasive computing environments are modeled as a loosely-coupled distributed system, where physical entities (e.g., objects and users) sense environments, and pervasive infrastructures handle sensor readings and deliver services to pervasive applications. A pervasive computing environment is composed of a set of n asynchronous processes P1 , P2 , . . ., Pn , which communicate with each other through messagepassing (24). The processes do not share a global memory and communicate solely by exchanging messages. The communication delay is finite but unbounded. An event e in the process Pj is modeled by intervals using boolean predicate Ej . The event e is occurring in the process Pj when Ej is true. Otherwise, the event does not exist. The events are modeled by means of intervals. The beginning and the end of an event are denoted as lo and hi, respectively.

Table 1

5

Notations in the design of SECA algorithm.

Notation n Pi lo hi I Ei SCi [1..n]

Explanation the number of processes the ith process involved in the context inconsistency detection the beginning of an interval the end of an interval the interval that denotes the time period between two successive events event on Pi snapshot clock on Pi

4.3 System Design This subsection presents snapshot timestamp and its update policy, and then introduces snapshot-based event detection. Snapshot Timestamp is an implementation of logical clocks, where all nodes maintain a logical clock. In the system of snapshot clocks, the time domain is denoted as a set of n−dimensional, non-negative integer clock. Each process Pi maintains a snapshot clock Si [1..n], where Si [k] is the k th local logical timestamp and describes the logical time process at the process Pi . The process Pi updates its snapshot clock by the following rules: 1. Before sending a message, the process Pi updates its local clock by Si [k] = Si [k − 1] + d (d > 0),

where the default value of d is 1. Then, Pi piggybacks a message m with its snapshot clock to the remaining nodes in the same environment. 2. When receiving a message (m, Sj [send]) from the process Pj , the process Pi gets the snapshot timestamp at the receiver point as: Si [receiver] = max(Si [k], Sj [send]), (1 ≤ k ≤ n)(3) Figure 4 illustrates the update policies of snapshot clock algorithm, where events are represented by the starting and the end of intervals, i.e., lo and hi. When the process P0 would like to send a message, it will automatically increment the value of its snapshot clock, and then forwards it to the processes P1 and P2 .

4

3

5

hi

lo

3

5 4

5 hi

Figure 4

6 6

4

4.2 Modeling Events by Intervals The event is detected by a boolean predicate Bi . The event is happening in the process Pi when Bi is true, and it does not occur when Bi is false. The event is represented by an interval, denoted by lo and hi, corresponding to the beginning and the end of the interval. The notations in the design of the proposed scheme are given in Table 1.

(2)

An example of snapshot-clock update mechanism.

6

6

D. Zhang et al.

4.3.1 Basic Properties Isomorphism. Evidently, by comparing timestamps (i.e., an array of n− elements), the snapshot clock keeps its property of isomorphism. The relations between timestamp intervals include two ordering relations represented as ’≤’ and ’} 1 begin 2 /* When an event e occurs at Pi */ occur 3 if Pi ←− e then 4 /* suppose it occurs at timestamp k with id eiid

8

Si [k]=Si [k-1]+1; EQ[i].push(eiid , Si [k]); IQ[i].push(eiid , lo=Si [k], hi=Si [k]+1); System Broadcast(Pi , Si );

9

/* Upon the process Pi receives a message

4.5 Discussions

5

Thus far, we have presented the design of SECA scheme in previous sections. Does SECA solve false negative caused in CEDA scheme? Does SECA detect context consistency accurately in pervasive computing environments? We investigate these issues with theoretical study in this section. We further evaluate SECA scheme by extensive experiments in the following Section 5.

7

6

from the process Pj 10 11 12 13

4.5.1 False Negative in Happened − Bef oreBased Context Consistency Detection

14

Given n intervals I1 , I2 , . . ., In , CEDA checks concurrent context consistency events by Equation 4, which is defined upon the happened − bef ore relation.

16

15

17 18 19

(Ij .lo → Ik .hi) ∧ (Ik .lo → Ij .hi), ∀1 ≤ j ̸= k < n. (4)

20 21

The case of interval overlaps, which is characterized by concurrent events, is illustrated by Figure 6.

22 23 24

Ij.hi

25 26

I .lo

Figure 6

7

*/

*/

msg

if Pi ←− Pj then (ejid , Sj [k]) = EQ[j].getTop(); Sj [k+1] = Sj [k]+1; EQ[j].push(ejid , Sj [k+1]); IQ[j].current = (ejid , lo, max(hi, Sj [k+1]+1); Si [receive] = max(Si , Sj [k+1]); if ejid is received by eiid then (eiid , lo, hi) = IQ[j].pop(); IQ[i].push(eiid , lo, max(hi, Sj [k+1]); EE.push(eiid , ejid ); /* Context inconsistency detection */ while (!EE.IsNullOrEmpty()) do < eiid , ejid > = EE.pop(); if (IsValid(eiid )) && (IsValid(ejid )) then C.push(eiid , ejid ); /* Output concurrent events Unique(C);

*/

Ik.hi

Overlapping intervals that can be detected based on Happened − bef ore relation in CEDA scheme.

In some cases, intervals are overlapped and events are concurrent, but CEDA cannot detect them. This is notorious for false negative phenomena, thus definitely brings down the detection accuracy of the CEDA

scheme. This is because Equation 4 cannot detect these overlapping intervals, although they are mutually across. Figure 7 illustrates three kinds of false negative scenarios, where CEDA scheme fails to check context consistency correctly. In Figures 7(a), 7(c) and 7(c), two events in two processes satisfy (Ij .lo → Ik .hi) ∧ (Ik .lo 9 Ij .hi), (Ij .lo 9 Ik .hi) ∧ (Ik .lo → Ij .hi), and (Ij .lo 9 Ik .hi) ∧ (Ik .lo 9 Ij .hi), respectively. These two event pairs occur concurrently, but Equation 4 fails to detect them. On the contrary, SECA scheme is capable of finding these concurrent context events successfully. As

8

D. Zhang et al. Ij.hi

Ij.hi

I .lo

Ik.hi

Ij.hi

I .lo

Ik.hi

I .lo

Ik.hi

(a) False negative scenario one between two(b) False negative scenario two between two (c) False negative scenario three between two concurrent events concurrent events concurrent events

Figure 7

Three kinds of false negative scenarios caused by happened − bef ore relation in CEDA scheme. Concurrent events in these scenarios can be accurately detected by SECA scheme.

for Figures 7(a) and 7(b), SECA compares the message timestamps of senders with the lo and hi of the receivers and then find the concurrency. Note that concurrency in Figure 7(c) is challenging to detect. This kind of concurrency is mainly caused by the message delay. As a matter of fact, there are 25 temporal interaction of intervals in a distributed system (25) (26) (27), as shown in Figure 8. We have checked these 25 temporal interaction of intervals, and find that 16 temporal interaction of intervals can satisfy the requirement shown in Equation 4. This implies that these 16 temporal interaction of intervals can be accurately recognized by the happened − bef ore relation. However, the rest of 9 temporal interaction of intervals, i.e., IA, IB, IC, ID, IE, IF, IJ, IH and IK labeled in Figure 8, may be overlapped in physical time, but the happened − bef ore relation falls short of checking them. For those 16 temporal interaction of intervals within concurrent events, SECA scheme can detect them using the snapshot timestamp, and hence may be regarded as a general solution. For the rest temporal interaction of intervals, it remains open to research community. X.lo

X

X.hi

Time

Table 2

Comparison of PCA, CEDA and SECA with respect to checking context consistency events

Items Synchronization An event occurs Concurrent event False negative

PCA √ × O(n) ×

CEDA

SECA

× O(n) O(n2 ) |overlap| < ε

× O(1) O(n) −ε < overlap < 0

All processes involved in a pervasive system are equal and check context consistency by snapshot clocks. Every process requires O(1) space complexity to maintain snapshot timestamps, and O(n) time complexity for every context consistency event detection. To further evaluate the time and space complexity of the proposed scheme, we have implemented the detection schemes by means of physical clocks, vector clocks and snapshot clocks, labeled as PCA, CEDA and SCA, respectively. Table 2 compares the PCA, CEDA and SECA in terms of their clock synchronization, handling the occurrence of an event, detecting overlapped intervals and concurrent events, and false negative. By comparison, SCA significantly reduces the time and space complexity concerning event processing and context consistency checking. Meanwhile, SECA cuts off a half of the possibility of false negative generated in CEDA scheme.

5 Experiments IA

IB ID

IE

We conduct extensive experiments in this section to further evaluate whether SECA is appropriate to context-aware applications in asynchronous pervasive computing environments. Particularly, this section will evaluate

IF IJ

IK IH

X.hi

X.lo

X.hi

• to what extent the detection accuracy is that SECA scheme can achieve, and Figure 8

Temporal interaction of intervals in a distributed system.

• whether SECA outperforms CEDA in terms of detection accuracy and computation.

5.1 Experiment Setup 4.5.2 Complexity Taking a panoramic view of the SECA scheme, it does not rely on central control to check context consistency.

A smart building scenario is simulated where users move around randomly. The duration of users’ staying in an office follows the exponential distribution. In

view of that user location is regarded as the most important type of context in asynchronous pervasive computing environments (2) (28) (29) (30), user location is our focus. The environment is equipped with RFID devices and every user carries a RFID tag such that the location context is collected timely and correctly. The RFID data concerning user location is generated with controlled error rates of 10%, 20%, 30%, 40% and 50% by using the mechanisms presented in the existing literature (11) (31). A constriction is implanted that a user cannot have two difference locations at the same time. Table 3 reports the experimental settings in detail. Note that some parameters are not listed in Table 3, e.g., lo and hi, since they are included in the design of SECA scheme, illustrated in Algorithm 1. Meanwhile, the detection accuracy is evaluated as the average value for all processes in all network nodes. Table 3

Accuracy

Asynchronous Event Detection for Context Inconsistency in Pervasive Computing

100% 96% 92% 88% 84% 80% 76% 72% 68%

Experimental settings

Items The number of processes The event duration The message delay Checking Devices

Experimental settings 2 – 15 5 – 120s 0.01 – 655.36s Windows 7 Ultimate Intel Core2 CPU, 1.67 GHz Memory: 2 GB Disk: 512 GB

SECA

9

CEDA

2 4 6 8 10 12 14 16 18 20 The number of nodes

Figure 9

Overall performance of SECA scheme by increasing node participants.

5.2 Overall Performance

5.3 Detection Performance with Varying Message Delays In this section, several experiments are conducted to investigate how the changes of the average message delay affect the concurrent event detection of the proposed scheme.

100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 SECA

Accuracy

A series of experiments are designed to check the detection accuracy of SECA and whether it performs better than CEDA. Given that the experiments shed light on detecting concurrent events of user locations, we limit the number of nodes attending for the same contexts from 2 to 20. Every node runs two detection process instances. Every event has a random life span from 20 to 120 seconds and every message suffers a random delay between 0.25 to 8 seconds. The following experiments employed the same setting without explicit declaration. Figure 9 illustrates the performance results with tuning the number of nodes from 2 to 20. Both CEDA and SECA schemes achieve high level of detection accuracy, showing a slightly downward trend. This indicates that vector clocks and happened − bef ore relations are efficient for detection of concurrent context inconsistency events. Meanwhile, SECA gets higher level of accuracy than CEDA scheme, which is attributed to the exclusion cases that CEDA scheme fails to detect are checked by snapshot clocks in SECA scheme.

CEDA

Logarithm of message delay

Figure 10 Detection accuracy with varying message delays.

10

D. Zhang et al.

As shown in Figure 10, both SECA and CEDA schemes reduce their detection accuracy with the increase of message delay (note that the x−axis is the logarithm of the message delay, counted by seconds). In all experiments, SECA achieves higher level of accuracy than CEDA, owing to its snapshot-based timestamp checking mechanism. As the logarithm of the message delay is between -2 to 3, SECA gets a better detection accuracy with less communication overheads. Meanwhile, in view of the pervasive network scale, we hereby set the value of the logarithm of message delay as 0.25 to 8 seconds.

5.4 Detection Performance with Varying Event Duration This section carries out a couple of experiments to evaluate to what extent the event duration influences the detection accuracy of SECA scheme. It also examines the appropriate values of the event duration in given scenarios.

100%

Accuracy

98%

SECA

CEDA

96% 94% 92% 90%

20 30 40 50 60 70 80 90 100 110 120 Event duration (seconds)

Figure 11 Detection accuracy with varying event duration.

Figure 11 illustrates the experimental results with varying the event duration from 20 to 120 seconds. Both SECA and CEDA schemes are capable of achieving high level of detection accuracy (the least accuracy is bigger than 85%.), which indicates that they are not heavily influenced by event duration. The longer the event duration is, the higher level of detection accuracy SECA and CEDA can achieve. Figure 11 also indicates that SECA is much more accurate than CEDA in handling events with various life span. Consider that SECA gets a high level of detection accuracy when the event duration is in a range between 20 and 50 seconds, we set the event duration as a random value in the same range.

5.5 Lessons Learned So far we have presented all evaluations. Experimental results show that SECA is appropriate for contextaware application in asynchronous pervasive computing

environments. Particularly, SECA outperforms CEDA regarding concurrent event detection of context inconsistency. It is capable of tolerating fairly long message delay with high level of detection accuracy. Finally, it is robust to the variations of event duration, making it desirable in asynchronous pervasive computing environments where message communication suffers various delays owing to the network limitation.

6 Conclusion In this paper, we have studied concurrent event detection of context consistency checking in asynchronous ubiquitous computing environments. We have proposed the snapshot timestamp and based on it we have put forward the SECA scheme. Extensive experimental results show that SECA is desirable in contextaware applications and outperforms CEDA in terms of concurrent event detection accuracy, and tolerating message delay and event duration. Currently, SECA scheme could be further improved in the following perspectives. Firstly, we plan to investigate how SECA performs in large-scale pervasive computing environments with thousands of participants. Secondly, we will study whether and how SECA copes with the dynamic changes of processes involved in the concurrent event detection. Finally, we are going to evaluate SECA performances in various scenarios with more types of contexts and consistency constraints.

Acknowledgement This work is supported by the National Natural Science Foundation of China (Grant Nos. 61103185, 61003247, 61100178, 61073118 and 50905063), the Startup Foundation of Nanjing Normal University (Grant No. 2011119XGQ0072), and Natural Science Foundation of the Higher Education Institutions of Jiangsu Province, China (Grant No. 11KJB520009). This work is also supported by Major Program of National Natural Science Foundation of Jiangsu Province (Grant No. BK211005). This research was also supported by the Korea-China Science and Technology Joint Research Center by the National Research Foundation (NRF) under Grant No. 2011-0019905 of Ministry of Education, Science and Technology (MEST), the Korean government.

References [1] M.-S. Jian, T.-Y. Chou, and S. H. Hsu, “Mobility corresponding location-aware information services based on embedded rfid platform,” International Journal of Ad Hoc and Ubiquitous Computing, vol. 9, no. 2, pp. 122– 131, 2012.

Asynchronous Event Detection for Context Inconsistency in Pervasive Computing [2] C. Xu, S. Cheung, W. Chan, and C. Ye, “Heuristicsbased strategies for resolving context inconsistencies in pervasive computing applications,” Int. Conf. Distri. Comput. Sys., pp. 713–721, 2008. [3] D. Zhang, M. Guo, J. Zhou, D. Kang, and J. Cao, “Context reasoning using extended evidence theory in pervasive computing environments,” Future Generation Comp. Syst., vol. 26, no. 2, pp. 207–216, 2010. [4] Y. Huang, X. Ma, J. Cao, X. Tao, and J. Lu, “Concurrent event detection for asynchronous consistency checking of pervasive context,” IEEE International Conference on Pervasive Computing and Communications, vol. 0, pp. 1–9, 2009. [5] D. Zhang, J. Zhou, M. Guo, J. Cao, and T. Li, “TASA: tag-free activity sensing using RFID tag arrays,” IEEE Trans. on Parallel and Distributed Systems, vol. 22, pp. 558–570, 2011. [6] D. Zhang, H. Huang, X. Liao, and M. Chen, “Empirical study on taxi gps traces for vehicular ad hoc networks,” in Proc. of IEEE International Conference on Communications, 2012. [7] X. Wang, D. Zhang, T. Gu, and H. Pung, “Ontology based context modeling and reasoning using OWL,” in Proceedings of the Second IEEE Annual Conference on Pervasive Computing and Communications Workshops. Orlando, FL, USA: IEEE, March 2004, pp. 18 – 22. [8] Y. Bu, T. Gu, X. Tao, J. Li, S. Chen, and J. Lu, “Managing quality of context in pervasive computing,” in Proc. of the 6th. Int. Conf. on Quality Softw., 2006, pp. 193–200. [9] Y. Bu, S. Chen, J. Li, X. Tao, and J. Lu, “Context consistency management using ontology based model,” in Current Trends in Database Technology — EDBT Workshops, 2006, pp. 741–755. [10] C. Xu, S. C. Cheung, and W. K. Chan, “Incremental consistency checking for pervasive context,” in Proc. of the 28th Int. Conf. Softw. Eng. ACM, 2006, pp. 292– 301. [11] C. Xu, S. C. Cheung, W. K. Chan, and C. Ye, “Partial constraint checking for context consistency in pervasive computing,” ACM Trans. Softw. Eng. Methodol., vol. 19, pp. 9:1–9:61, 2010. [12] D. Zhang, M. Chen, H. Huang, and M. Guo, “Decentralized checking context inconsistency in pervasive computing environments,” The J. Supercomput., 2011. [13] D. Zhang, Q. Zou, and Z. Sun, “Seca: Snapshotbased event detection for checking asynchronous context consistency in ubiquitous computing,” in Proc. of 2012 IEEE Wireless Communications and Networking Conference, 2012. [14] D. Zhang, H. Huang, C.-F. Lai, X. Liang, and M. Guo, “Survey on context-awareness in ubiquitous media,” Multimedia Tools and Applications, DOI: 10.1007/s11042-011-0940-9, pp. 1–33, 2011. [15] T. Gu, X. H. Wang, H. K. Pung, and D. Q. Zhang, “An ontology-based context model in intelligent environments,” in Proc. of Commu. Netw. Distri. Sys. Model. Simul. Conf., 2004, pp. 270–275.

11

[16] Y. Huang, Y. Yang, J. Cao, X. Ma, X. Tao, and J. Lu, “Runtime detection of the concurrency property in asynchronous pervasive computing environments,” IEEE Trans. Paral. Distri. Sys., pp. 1–17, May 2011. [17] R. M. Fujimoto, “Time management in the high level architecture,” Simulation, vol. 71, no. 6, pp. 388–400, 1998. [18] W. H. E. W. Group, “Ieee 1516 – standard for modeling and simulation high level architecture framework and rules,” IEEE Standard, July 2000. [19] L. Lamport, “Time, clocks, and the ordering of events in a distributed system,” Commun. ACM, vol. 21, pp. 558–565, 1978. [20] Z. Zhou, S. Bhiri, and M. Hauswirth, “Control and data dependencies in business processes based on semantic business activities,” in Proc. of the Tenth International Conference on Information Integration and Web-based Applications Services, 2008, pp. 257–263. [21] C. J. Fidge, “Timestamps in message-passing systems that preserve the partial ordering,” in Proc. of In 11th Austra. Comp. Sci. Conf. University of Queensland and Griffith University, 1988, pp. 55–66. [22] F. Mattern, “Virtual time and global states of distributed systems,” in Proc. Workshop Paral. Distri. Alg., C. M. et al., Ed., Elsevier, 1989, pp. 215–226, (Reprinted in: Z. Yang, T.A. Marsland (Eds.), ”Global States and Time in Distributed Systems”, IEEE, 1994, pp. 123-133.). [23] P. Almeida, C. Baquero, and V. Fonte, “Interval tree clocks: a logical clock for dynamic systems,” Princi. Distri. Sys., Lecture Notes in Comp. Sci., vol. 5401, pp. 259–274, 2008. [24] Z. Zhou, S. Bhiri, H. Zhuge, and W. Gaaloul, “Service protocol adaptability assessment based on novel walk computation,” IEEE Transactions on Systems Man and Cybernetics, Part A: Systems and Humans, DOI: 10.1109/TSMCA.2012.2183362, 2012. [25] A. D. Kshemkalyani, “Temporal interactions of intervals in distributed systems,” J. Comp. Sys. Sci., vol. 52, no. 2, pp. 287–298, 1996. [26] D. Zhang, J. Wan, Q. Liu, X. Guan, and X. Liang, “A taxonomy of agent technologies for ubiquitous computing environments,” KSII Transactions on Internet and Information Systems, vol. 6, no. 2, pp. 547–565, 2012. [27] Z. Chen, D. Zhang, R. Zhu, and P. Yin, “A review of automated formal verification of ad hoc routing protocols for wireless sensor networks,” Sensor Letters, 2012. [28] L. Ni, Y. Liu, Y. Lau, and A. Patil, “Landmarc: indoor location sensing using active rfid,” Wirel. Netw., vol. 10, no. 6, pp. 701–710, 2004. [29] R. Want, A. Hopper, V. Falcao, and J. Gibbons, “The active badge location system,” ACM Trans. Info. Sys., vol. 10, pp. 91–102, 1992. [30] Y. Ji, “Performance analysis for indoor location determination,” International Journal of Ad Hoc and Ubiquitous Computing, vol. 8, no. 1/2, pp. 3–15, 2011. [31] J. Rao, S. Doraiswamy, H. Thakkar, and L. S. Colby, “A deferred cleansing method for rfid data analytics,” in Pro. of 32nd Int. Conf. Very Large Data Bases, ser. VLDB ’06, 2006, pp. 175–186.

Suggest Documents