Download Full Enabling context aware web services methods architectures and technologies 1st Edition Quan Z. Sheng PDF All Chapters
Download Full Enabling context aware web services methods architectures and technologies 1st Edition Quan Z. Sheng PDF All Chapters
com
https://ebookfinal.com/download/enabling-context-aware-web-
services-methods-architectures-and-technologies-1st-edition-
quan-z-sheng/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookfinal.com/download/enabling-technologies-for-mobile-
services-the-mobilife-book-1st-edition-mika-klemettinen/
ebookfinal.com
https://ebookfinal.com/download/software-defined-radio-enabling-
technologies-1st-edition-tuttlebee/
ebookfinal.com
https://ebookfinal.com/download/handbook-of-research-on-social-
dimensions-of-semantic-technologies-and-web-services-1st-edition-m-
manuela-cunha/
ebookfinal.com
https://ebookfinal.com/download/adme-enabling-technologies-in-drug-
design-and-development-1st-edition-donglu-zhang/
ebookfinal.com
Voice Enabling Web Applications VoiceXML and Beyond 1st
Edition Ken Abbott (Auth.)
https://ebookfinal.com/download/voice-enabling-web-applications-
voicexml-and-beyond-1st-edition-ken-abbott-auth/
ebookfinal.com
https://ebookfinal.com/download/web-2-0-architectures-1st-ed-edition-
james-governor/
ebookfinal.com
https://ebookfinal.com/download/agent-technologies-and-web-
engineering-ghazi-alkhatib/
ebookfinal.com
https://ebookfinal.com/download/java-web-services-up-and-running-1st-
edition-martin-kalin/
ebookfinal.com
https://ebookfinal.com/download/web-services-on-rails-1st-edition-
kevin-marshall/
ebookfinal.com
Enabling
Context-Aware
Web Services
Methods, Architectures, and Technologies
Edited by
Quan Z. Sheng
Jian Yu
Schahram Dustdar
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
QA76.5915.E53 2010
006.7’8--dc22 2009048845
I Methodology 1
1 Context-Aware W e b Service Development: Methodologies
and Approaches 3
Georgia M. Kapitsaki, George N. Prezerakos, and Nikolaos D. Tselikas
1.1 Introduction 3
1.2 Exploiting Programming Languages Extensions 5
1.3 Model-Driven Development 11
1.4 Approaches Based on Semantic Technologies 17
1.5 Discussion 23
1.6 Summary 24
2 M o d e l - D r i v e n D e v e l o p m e n t of C o n t e x t - A w a r e W e b S e r v i c e s 31
Jian Yu, Quan Z. Sheng, Kewen Liao, and Hoi S. Wong
2.1 Introduction 31
2.2 Background 32
2.3 ContextUML 35
2.4 ContextServ Platform 39
2.5 Applications 45
2.6 Discussion and Conclusion 46
3 D y n a m i c Software P r o d u c t L i n e s for C o n t e x t - A w a r e W e b
Services 53
Carlos Parra, Xavier Blanc, Laurence Duchien, Nicolas Pessemier, Rafael
Leaño, Chantal Taconet, and Zakia Kazi-Aoul
3.1 Introduction 54
3.2 Motivating Scenario and Challenges 56
3.3 CAPucine: Context-Aware Service-Oriented P r o d u c t Line . 60
3.4 CAPucine Validation 66
3.5 Related Work 73
3.6 Conclusion 75
v
4.4 Constraint Integration 89
4.5 Fault Tolerance and Remedial Strategies 93
4.6 Architecture and Core Components 97
4.7 Instrumentation Template for Violation Handling 98
4.8 Evaluation 102
4.9 Discussion-Related Work, Trends, and Challenges 103
4.10 Conclusions 105
II Architecture 109
5 Enabling Context-Aware W e b Services: A Middleware Ap-
proach 111
Daniel Romero, Romain Rouvoy, Sophie Chabridon, Denis Conan, Nicolas
Pessemier, and Lionel Seinturier
5.1 Introduction 112
5.2 Motivating Scenario 113
5.3 Principles and Background 115
5.4 C A P P U C I N O : Enabling Context-Aware Adaptive Services . 119
5.5 Illustrating Dynamic Context-aware Web Services with a Mo
bile Commerce Scenario 126
5.6 Related Works 130
5.7 Conclusion 132
7 U s i n g S O C in D e v e l o p m e n t of C o n t e x t - A w a r e S y s t e m s 171
Katarzyna Wac, Pravin Pawar, Tom Broens, Bert-Jan van Beijnum, and
Aart van Halteren
7.1 Introduction 172
7.2 Context and Context-Awareness 173
7.3 Service-Oriented Computing 178
7.4 Layered Model of Context-Aware Systems 181
7.5 Domain Model for Context-Awareness 183
7.6 Application of Domain Model in the Amigo System 194
7.7 Conclusive Remarks 197
vi
8 A Pragmatic Approach to C A S Organization and Discovery 211
Jian Zhu and Hung Keng Pung
8.1 Introduction 211
8.2 Related Work 213
8.3 System Framework Design 215
8.4 A Process Matching Scheme for Web Services 226
8.5 Conclusion and Future Work 237
10 C o n t e x t - A w a r e M o b i l e G r i d s 273
Stefan Wesner, Antonio Sanchez-Esguevillas, Victor Villagra, and Babak
Farshchian
10.1 Introduction and Scenarios 273
10.2 W h a t Is in Context, and W h a t Is Out: The Need for Adapta
tion 277
10.3 Service Grids in Mobile Environments 281
10.4 Adaptation Approaches 292
10.5 Conclusions and Future Work 295
11 L e v e r a g i n g C o n t e x t - A w a r e n e s s for P e r s o n a l i z a t i o n 301
Laurent-Walter Goix, Luca Lamorte, Paolo Falcarin, Carlos Baladron,
Jian Yu, Isabel Ordas, Alvaro Martinez Reol, Ruben Trapero, Jose M. del
Alamo, Michele Stecca, and Massimo Maresca
11.1 Introduction 301
11.2 T h e O P U C E Project 303
11.3 Modeling Context Information 306
11.4 Context Management Architecture 311
11.5 Adapting User-Generated Services 318
11.6 Conclusion 330
vii
12.4 A Case Study: Context Coupling in the inContext Project . 352
12.5 Open Issues and Recommendations 356
12.6 Related Work and Further Reading 358
12.7 Conclusion 358
13 C o n t e x t - A w a r e S e m a n t i c W e b S e r v i c e D i s c o v e r y 365
Stefan Dietze, Michael Mrissa, John Domingue, and Alessio Gugliotta
13.1 Introduction 366
13.2 Background and Motivation 368
13.3 Conceptual Situation Spaces for Semantic Web Services . . . 373
13.4 A Conceptual Learning Situation Space 376
13.5 Fuzzy SWS Goal Discovery and Achievement at Runtime . . 377
13.6 Applying CSS to the E-Business Domain 380
13.7 Conclusions 386
14 P r i v a c y P r o t e c t i o n in C o n t e x t - A w a r e W e b S e r v i c e s 393
Georgia M. Kapitsaki, Georgios V. Lioudakis, Dimitra I. Kaklamani, and
Iakovos St. Venieris
14.1 Introduction 394
14.2 Privacy Regulations and Technical Requirements 395
14.3 Related Work 400
14.4 Privacy Context 402
14.5 Enforcement Framework 408
14.6 Combination with Context Adaptation Schemes 409
14.7 Conclusions 411
15 A K n o w l e d g e - B a s e d F r a m e w o r k 421
Carlos Pedrinaci, Pierre Grenon, Stefania Galizia, Alessio Gugliotta, and
John Domingue
15.1 Introduction 421
15.2 Web Services Adaptation to Context: Overall approach . . . 423
15.3 Context Modeling and Derivation 425
15.4 Context Recognition 431
15.5 Web Service Adaptation 435
15.6 Application 438
15.7 Conclusions 443
16 U b i q u i t o u s M o b i l e A w a r e n e s s f r o m S e n s o r N e t w o r k s 449
Theo Kanter, Stefan Forsstrom, Victor Kardeby, Jamie Walters, Pa-
trik Osterberg, and Stefan Pettersson
16.1 Introduction 449
16.2 Related Work 451
16.3 Enabling Ubiquitous Mobile Awareness 453
16.4 Distributed Context eXchange Protocol 455
16.5 Bluetooth Bridge to Wireless Sensor Networks 461
viii
16.6 Ubiquitous Mobile Awareness Service 462
16.7 Conclusions and Future Work 463
17 M o d e l i n g a n d S t o r a g e of C o n t e x t D a t a for S e r v i c e A d a p t a -
tion 469
Yazid Benazzouz, Philippe Beaune, Fano Ramaparany, and Olivier
Boissier
17.1 Introduction 470
17.2 Context Definition 471
17.3 Role of Context in Service Adaptation 472
17.4 Developing Context-Aware Services 474
17.5 Context D a t a Modeling 474
17.6 Context D a t a Storage 481
17.7 Context Recognition 484
17.8 Software Infrastructure for Service Adaptation 486
17.9 A Summary Example 488
17.10 Conclusion 490
18 R e s e a r c h C h a l l e n g e s i n M o b i l e W e b S e r v i c e s 495
Chii Chang, Sea Ling, and Shonali Krishnaswamy
18.1 Introduction 495
18.2 Enabling Mobile Web Services: State of the Art 497
18.3 Research Challenges 509
18.4 Summary 513
Index 521
ix
Preface
Over the years, the Web has gone through many transformations, from tradi
tional linking and sharing of computers and documents (i.e., "Web of Data"),
to current connecting of people (i.e., "Web of People"). With the recent ad
vances in radio-frequency identification (RFID) technology, sensor networks,
and Web services, the Web will continue the transformation and will be slowly
evolving into the so-called "Web of Things and Services". Indeed, this future
Web will provide an environment where everyday physical objects such as
buildings, sidewalks, and commodities are readable, recognizable, addressable,
and even controllable using services via the Web. The capability of integrat
ing the information from both the physical world and the virtual one not only
affects the way we live, but also creates tremendous new Web-based business
opportunities such as support of independent living of elderly persons, intelli
gent traffic management, efficient supply chains, and improved environmental
monitoring.
Context-aware Web services are emerging as an important technology to un
derpin the development of new applications (user centric, highly personalized)
on the future ubiquitous Web. This book compiles the newest developments
and advances in context awareness and Web services from world's leading re
searchers in this field. It offers a comprehensive and systematic presentation
of methodologies, architectures, and technologies that enable the development
of context-aware Web services. The whole book is organized into three major
parts: Methods, Architectures, and Technologies. The Methods part focuses
on the principle of context awareness in Web service and various ways to model
context-aware Web services at the specification level. The Architectures part
focuses on the infrastructures, frameworks and standards for building context-
aware Web services. The Technologies part focuses on the various techniques
adapted from general research areas e.g., semantic Web, database, artificial
intelligence, and formal methods in the development of context-aware Web
services.
This book is the first of its kinds to bridge the gap between two previously
separated research and development areas: context-awareness and Web ser
vices. It serves well as a valuable reference point for researchers, educators,
and engineers who are working in Internet computing, service-oriented com
puting, distributed computing, and e-Business, as well as graduate students
who wish to learn and spot the opportunities for their studies in this emerg
ing research and development area. It is also of general interest to anyone
using the service paradigms for software development, particularly on devel-
XI
xii
Yazid Benazzouz
Denis Conan
France Telecom R&D Meylan &
ENSM-SE Institut Telecom, Telecom & Man
Saint-Etienne, France agement SudParis
Paris, France
Xavier Blanc
University of Lille 1 Stefan Dietze
Lille, France The Open University
Milton Keynes, United Kingdom
Olivier B o i s s i e r
Ecole Nationale Superieure des Laurence Duchien
Mines University of Lille 1
Saint-Etienne, France Lille, France
xiii
xiv
D i m i t r a I. K a k l a m a n i Sea Ling
National Technical University of
Athens Monash University
Athens, Greece Melbourne, Australia
XV
Carlos Pedrinaci Q u a n Z. S h e n g
University of Adelaide
The Open University
Adelaide, Australia
Milton Keynes, United Kingdom
Michele Stecca
Nicolas Pessemier
University of Padova and M3S
University of Lille 1 Genova, Italy
Lille, France
Chantal Taconet
Stefan Pettersson Institut Telecom, Telecom & Man
Mid Sweden University agement SudParis
Sundsvall, Sweden Paris, France
XVI
Bert-Jan van H o i S. W o n g
Beijnum Telematica Instituut
University of Adelaide
The Netherlands
Adelaide, Australia
Iakovos S t . V e n i e r i s
Jian Yu
National Technical University of
University of Adelaide
Athens
Adelaide, Australia
Athens, Greece
Methodology
Chapter 1
Context-Aware Web Service
Development: Methodologies and
Approaches
1.1 Introduction 3
1.2 Exploiting Programming Languages Extensions 5
1.3 Model-Driven Development 10
1.4 Approaches Based on Semantic Technologies 17
1.5 Discussion 23
1.6 Summary 24
1.1 Introduction
Context-awareness plays a vital role in service provision nowadays as service
providers are focusing on providing personalized services to end-users. At the
same time Web services are constantly gaining ground for the construction of
context-aware applications. They can be found as part of desktop Web appli
cations and in mobile computing where various mobile devices offer Web ser
vice based applications. The development process of such context-aware Web
services is an important aspect prior to the service provision, since context-
awareness requirements need to be taken into account and be incorporated
3
4 Context-Aware Web Services: Methods, Architectures, and Technologies
during the service development. Developers can profit from techniques that
facilitate the introduction of context handling during the service development
phase.
In this book chapter we deal with development approaches that lead to the
construction of context-aware Web services. The term "methodology," how
ever, is not used in its traditional meaning. We do not focus on traditional
software development methodologies (like the waterfall model or agile devel
opment), which usually divide the development process into distinct steps
(requirements, design, coding, testing, deployment), but rather on general
approaches that can assist the development work in the framework of several
software lifecycle models. Moreover, these approaches are usually targeting
specific architectures or middleware platforms proposed for the provision of
context-aware Web services.
The inclusion of context handling issues in the development process may
be performed directly at the code level of the service or earlier during the
service design phase. This can be achieved either by popular programming
or development techniques (e.g., model-driven development, semantic Web,
aspects) and in this sense a significant number of research papers on context-
aware service development falls into the three categories described below.
Another approach to COP introduces the notion of "layer" into the pro
gram execution in order to express behavior variations based on contextual
properties (11). Layers correspond to sets of partial class and method defi
nitions that become activated depending on context information. They are
Context-Aware Web Service Development: Methodologies and Approaches 7
1
http://aspectwerkz.codehaus.org/
8 Context-Aware Web Services: Methods, Architectures, and Technologies
actions on the service elements (e.g., returned service list) activated when the
user position changes is shown in Figure 14.4.
current context values, but also by past ones. Context-aware aspects have
been implemented in an open extension of Java, the AOP framework Re
flex. Reflex allows first-class pointcuts for dynamic crosscutting. Hooksets of
Reflex can specify conditions of when to send a specific message to a meta
object, achieving this way AOP-compliant execution of code fragments and
also context-aware service behavior. In order to demonstrate the above a con
text definition example is illustrated in Figure 1.5 for the case of an electronic
shop applying specific discounts to client purchases. PromotionCtx is bound
to occurrences of MsgReceive operations and is parameterized by the discount
rate (attribute rate). The activation state of the context is depicted through
the getState method. Readers interested in more information on AOP frame
works that can be exploited for context-awareness purposes can refer to the
comparative study of (5).
tional objects participating in the sequence diagram are shown using the
stereotype «OptionalLine» in the corresponding lifelines.
2
http://www.eclipse.org/aspectj/
Context-Aware Web Service Development: Methodologies and Approaches 13
decoupled from the main application logic in all development stages. The
Eclipse Modeling Framework (EMF) (4) and dedicated tools are exploited
14 Context-Aware Web Services: Methods, Architectures, and Technologies
for the model parsing functions, whereas templates of the Apache Velocity
Context-Aware Web Service Development: Methodologies and Approaches 15
engine3 drive the transformation process. The proposed technique allows the
reuse of existing Web services through a reverse transformation between UML
models and WSDL descriptions (the direct process is described in (9)). Web
services are distinguished into business Web services that participate in the
main service logic and context Web services that expose the functionality of
context sources, whereas the application flow is modeled by a state transition
diagram. The steps of the methodology are illustrated in Figure 1.9.
3
http://velocity.apache.org/
16 Context-Aware Web Services: Methods, Architectures, and Technologies
element. Multiple business and context components are put together through
the Composite Component Manager at Adaptation View, whereas Service
View is denoted to the representation of Web service properties (operation.
messages, etc.). These different views are depicted in Figure 1.10.
• First layer - service specification level: the context-aware service and its
environment are modeled from an external perspective in terms of con
textual changes, information retrieval, and appropriate actions neglect
ing information about implementation platforms and context retrieval
mechanisms.
4
http://www.freeband.nl
5
http://isdl.ctit.utwente.nl/
18 Context-Aware Web Services: Methods, Architectures, and Technologies
like Jena (6). In (15), apart from input/output data structures, ontologies are
also used to represent the background knowledge, which is necessary to the
application in order to fulfill its task. These are two separate yet linked lay
ers, namely the Semantic Web Layer, which makes ontologies and interfaces
available to the public, and the Internal Layer, which consists of control and
reasoning mechanisms (Figure 1.11). On the one hand, core ontologies define
the basic knowledge structure through base classes, which can be extended or
instantiated arbitrarily by external ontology providers on the semantic Web
and must be hardwired into the executable system. On the other hand, the
knowledge encoded in the external ontologies can only be used by generic rea
soning engines like rule execution engines or description logic classifiers (3).
Protege with OWL Plugin (16) follows the above rationale in semantic Web
application development. Protege is an ontology-driven development tool pro
viding intelligent guidance to detect mistakes as a debugger in a programming
environment, serving also as a rapid prototyping environment.
In (29), Sun et al. apply software engineering methods and tools to visual
ize, simulate, and verify Semantic Markup for Web Service (OWL-S) process
models. They present the software engineering language Live Sequence Charts
(LSCs) and its tool Play-Engine (10) to visualize and simulate OWL-S process
model ontologies, which capture the essential information about how a service
is to be invoked and executed, as well as the expected outputs. LSCs are a
powerful visual formalism serving as an enriched requirements' specification
language. Two kinds of charts are distinguished in LSCs: existential charts
Context-Aware Web Service Development: Methodologies and Approaches 19
about the semantics of the content that these messages transfer and the need
for common semantics becomes intensified especially when Web services com
ing from different providers take part in the composition. Finally, the higher
level is related to the context, in which the Web service composition takes
place. Since Web services may belong to different providers, their context
definition can be different in terms of structure, name, number, and meaning
of arguments, etc. Subramanian et al. present a two-step process in order to
address the potential context heterogeneity of Web services. The first step
consists of specifying contexts using a dedicated language: OWL-C (Ontol
ogy Web Language for Context ontologies), which is detailed in (18). The
second step consists of fixing the heterogeneity of contexts using mediation
mechanisms. These mechanisms are supported by a prototype called ConWeS
(Context-based semantic Web Services).
In the second subcategory, ontologies and context are used to discover
reusable WSs for development purposes. Furthermore, the studies within
this subcategory describe the extraction of ontologies from WS descriptions
in order to identify the context conditions where the WS can be reused. In
(31), the term "context" is defined from two perspectives: one from service
requesters' and another one from Web services'. From the former perspective,
context is defined as the surrounding environment affecting requesters' service
discovery and access, such as requesters' preferences, activities and accessible
network and devices, while from the latter perspective, context is defined as
the surrounding environment affecting Web service delivery and execution,
such as networks and protocols for service binding, devices, and platforms for
service execution, and so on. In this study an ontology-based context model
towards a formal definition of contextual descriptions pertaining to both ser
vice requesters and Web services is presented. Yang et al. have implemented
the ontology-based context model into a rule-base system using Java Expert
System Shell (JESS) 6 for context elicitation by using an algorithm – called
Rete – to match rules. This procedure is much faster than a simple set of cas
cading "if-then" statements adopted in conventional programming languages.
Based on this context elicitation system, the authors present a Context-Aware
Services-Oriented Architecture (CA-SOA) for providing context-aware ser
vices requests, publication, and discovery. OWL-S is utilized as the vehicle
to carry contextual information, since OWL-S is a known tool from the se
mantic Web society tailored for Web services. Nevertheless, one of the main
advantages is that both context model and CA-SOA are open and not limited
to OWL-S. Other proprietary (e.g., Web Service Level Agreement from IBM)
or standard (e.g., Web Services Agreement Specification from Global Grid
Forum) solutions can be used to carry the knowledge.
An approach for the automatic retrieval of Web services is proposed in
(13). In contrast with other approaches, this approach uses a context on-
6
www.jessrules.com
Context-Aware Web Service Development: Methodologies and Approaches 23
tology as the basis of the capability descriptions of Web services and when
the capability descriptions of both Web services and the Web requests are
grounded onto the same ontology, a matchmaking method is given for judg
ing the equivalency between them. Jin and Liu argue that the real meaning
of Web services should be captured by the corresponding controllable entities
that Web services can interact with and can bring effects to. Thus, the Web
service context is actually related to the effects that the Web service and its
meaning can impose to its content and the way that the Web service im
poses the effects. Furthermore, these controllable entities are domain-relevant
and independent to any Web services. Consequently, the conceptualization of
the controllable resources becomes the shared domain knowledge for domain
Web services. Based on their previous work, they propose a two-level context
ontology for specifying both entities and effects. The ontology on the first
level declares the context entities of Web services, while the second level in
troduced (the domain ontology) is sharable and helps Web services find each
other automatically.
Another approach based on domain ontologies is proposed in (26). Sabou
et al. cite the problem of semi-automatically learning Web service domain
ontologies and target a better understanding of the ontology learning task in
the context of Web services and the identification of technologies that could
potentially be used. They have designed a framework for performing ontology
learning in the context of Web services addressing several issues that constrain
the development of an ontology learning solution in two ways. First, the
framework exploits the peculiarities of Web service documentations to extract
information used for ontology building. More specifically, the sublanguage
characteristics of these texts lead to the identification of a set of heuristics.
These heuristics are implemented as pattern-based extraction rules defined on
top of linguistic information. Second, the learned ontologies are suited for Web
service descriptions as they contain both static and procedural knowledge.
1.5 Discussion
The three approaches presented above enable developers to decouple, to
a significant extent, the service logic from the context management part of
a service. On the other hand, they have quite a few differences; therefore,
an important question from a developer's viewpoint is whether a specific ap
proach is more suitable than others for a specific type of service or even a
specific development methodology.
If a rigorous service development methodology is used, investing signifi
cantly in the design stage, then MDD approaches are probably more suitable
for context-aware Web service development. One can choose from several
24 Context-Aware Web Services: Methods, Architectures, and Technologies
Web service and context models already available and impose modification
to either model (Web service or context model) with minimal implications to
the other. There is also the possibility of source code generation either in a
popular programming language (usually Object-Oriented) or to an extended
version of such language as the ones described in Section 1.2. Programming
language extensions are obviously more suitable when an agile development
method is employed involving frequent Web service releases keeping model
ing efforts to a minimum. In the case where the ability to perform complex
reasoning using context is a priority then an approach involving semantics is
probably preferable. This of course comes at a certain cost in the sense that
the Web service development team must feel at ease with ontology specifica
tion languages such as OWL and the use of rule/reasoning engines such as
Jess. Of course nothing precludes the use of a hybrid approach combining two
or more of the approaches presented above or even other approaches available
for context-aware Web service development. This is the case with (33) and
(22) where model-driven transformations are guided by respective ontologies.
Also, as it has been mentioned above, Model-Driven Development blends well
with programming language extensions at the source code generation stage.
The multiplicity of options faced by a potential developer indicate that
we are still lacking a uniform approach regarding context-aware Web service
development methodology that can be applied in conjunction with a vari
ety of modeling techniques and programming language frameworks. In this
respect, one very obvious issue for future research is the process of gathering
and analyzing requirements for context-aware Web services. Another issue
is whether effort should be placed on the specification of high-level program
ming languages especially for services (such as (17)) or even especially for
context-aware Web services. Last but not least, handling of context-related
information and exchange of such information between service nodes always
raises issues concerning privacy and security. Indeed, context information re
lated to sensitive user data, such as personal information, current location,
ongoing and past transactions, etc., should not be revealed easily; significant
research effort should be placed in this direction as well.
1.6 Summary
This book chapter was dedicated to the presentation of techniques exploited
for the development of context-aware Web services. It has been concerned
with three such directions: programming language extensions, model-driven
development and semantic technologies, which have been proven quite popu
lar taking into account the existing literature. For each approach it is shown
how it facilitates context handling during the service design and development
Context-Aware Web Service Development: Methodologies and Approaches 25
[1] Almeida, J. P. A., Iacob, M.-E., Jonkers, H. and Quartel, D. 2006. Model-
Driven Development of Context-Aware Services. Proceedings of the 6th
IFIP International Conference Distributed Applications and Interop
erable Systems, 213-227.
[2] Ayed, D., Delanote, D. and Berbers, Y. 2007. MDD Approach for the
Development of Context-Aware Applications. Proceedings of the 6th
International and Interdisciplinary Conference on Modeling and Us
ing Context, 15-28.
[3] Baader, F., Calvanese, D., McGuineness, D., Nardi, D. and Patel-
Schneider, P. 2003. The Description Logic Handbook. Cambridge Uni
versity Press.
[4] Budinsky, F., Steinberg, D., Merks, E., Ellersick, R. and Grose, T. J.
2003. Eclipse Modeling Framework. Addison Wesley Professional.
[5] Dantas, F., Batista, T. and Cacho, N. 2007. Towards Aspect-Oriented
Programming for Context-Aware Systems: A Comparative Study.
Proceedings of the 1st International Workshop on Software Engineer
ing for Pervasive Computing Applications, Systems, and
Environments.
[6] Goldman, N. 2003. Ontology-Oriented Programming: Static Typing for
the Inconsistent Programmer. Proceedings of the 2nd International
Semantic Web Conference, 850-865, Springer-Verlag.
[7] Gomez-Perez, A., Gonzalez-Cabero, R. and Lama, M. 2004. ODE SWS:
A framework for designing and composing semantic Web services.
IEEE Intelligent Systems 19(4):24-31.
[8] Grassi, V. and Sindico, A. 2007. Towards Model Driven Design of Service-
Based Context-Aware Applications. Proceedings of the International
Workshop on Engineering of Software Services for Pervasive Environ
ments: in conjunction with the 6th ESEC/FSE joint meeting, 69-74.
[9] Gronmo, R., Skogan, D., Solheim, I., Oldevik and J. 2004. Model-driven
web services development. Proceedings of the IEEE International
Conference on e-Technology, e-Commerce and e-Service (EEE'04),
42-45.
[10] Harel, D. and Marelly, R. 2003. Come, Let's Play: Scenario-Based Pro
gramming Using LSCs and the Play-Engine. Springer-Verlag.
27
28 Context-Aware Web Services: Methods, Architectures, and Technologies
2.1 Introduction 31
2.2 Background 32
2.3 ContextUML 35
2.4 ContextServ Platform 39
2.5 Applications 44
2.6 Discussion and Conclusion 45
2.1 Introduction
Context awareness refers to the capability of an application or a service be
ing aware of its physical environment or situation (i.e., context) and respond
ing proactively and intelligently based on such awareness (1, 7, 11). With
recent developments in computer hardware, software, networking, and sensor
technologies, context awareness becomes one of the most exciting trends in
computing today that holds the potential to make our daily lives more pro
ductive, convenient, and enjoyable. For example, a tour-guide service gives
tourists suggestions on the attractions to visit by considering their current
locations, preferences, and even the prevailing weather conditions.
In the last decade, Web services have become a major technology to imple
ment loosely-coupled business processes and perform application integration.
Through the use of context, a new generation of smart Web services are cur
rently emerging as an important technology for building innovative context-
aware applications. We call such category of Web services context-aware Web
services, or CASs in short.
To date, CASs are still hard to build. One reason is that current Web ser
vices standards (e.g., UDDI, WSDL, SOAP) are not sufficient for describing
and handling context information (13, 15, 22, 24). CAS developers must im
plement everything related to context management—including the collection,
dissemination, and usage of context information—in an adhoc manner. An
other reason is that, to the best of our knowledge, there is a lack of generic
approaches for formalizing the development of CASs. As a consequence, de
veloping CASs is a very cumbersome and time-consuming activity, especially
when these CASs are complex.
31
32 Context-Aware Web Services: Methods, Architectures, and Technologies
2.2 Background
In this section, we first briefly overview some basic relevant concepts,
namely model-driven development, UML, context, and context-aware Web ser
vice (CAS).
http://www.omg.org/technology/documents/formal/uml.htm.
34 Context-Aware Web Services: Methods, Architectures, and Technologies
2.2.3 Context
Dey and Abowd have defined context—which is widely used in the literature
today—as "any information that can be used to characterize the situation of
an entity. An entity is a person, place, or object that is considered relevant
to the interaction between a user and an application, including the user and
applications themselves'' (6).
In a CAS environment, context contains any information that can be used
by a Web service to adjust its execution and output. Examples of contexts are:
i) contexts related to a service requester (mostly it is the client who invokes
a service), including the requester's identification information, personal pref
erences, current situation (e.g., location), and other information (e.g., friends
list, calendar); ii) contexts related to a Web service, such as service location,
service status (e.g., available, busy), and its QoS attributes (e.g., price, reli
ability); and iii) other contexts like time and weather information. It should
be noted that some contexts are application specific. Forecasted weather,
for instance, could be a context in a vacation planning service, but not in a
currency conversion service.
Some context information can be sensed directly (e.g., locations and tem
peratures using physical sensors), while others have to be derived from avail
able context information. Contexts are provided by context providers. It
is interesting to mention that more and more context providers advertise
their services—called context information services2—over the Web that can
be seamlessly integrated into CASs. Recently, quite a few research efforts on
modelling the context provisioning services are proposed (18, 4, 10).
2.2.4 C o n t e x t - A w a r e W e b Service
A Web service is context-aware if it uses context information to provide
relevant information and/or services to users, where relevancy depends on
the users' task (6, 16, 19). A CAS can present relevant information or can
be executed or adapted automatically, based on available context information.
For example, a service can display restaurants that are around a user's current
location, and if the weather is good, the service even suggests some restaurants
that customers can sit outside.
To develop CASs, two important issues need to be considered. The first
is the provisioning of context information. CAS developers have to identify
what kind of context information will be used and how to derive it. Due
to heterogeneity of context providers, sensor imperfection, quality of context
information, and dynamic context environments, context provisioning is not
trivial (18). In particular, various context providers may provide a same piece
of context information (usually with different quality and data formats) and
it is difficult to specify—at design stage—which context provider should be
2.2.5 A t t r a c t i o n S e a r c h i n g Service
Suppose that there is a context-aware attraction searching service that is
offered by a mobile network operator. Mobile users subscribed to the net
work operator can invoke this service using their mobile devices to get the
recommended attractions when they visit new cities. The service works like
the following:
• Users can subscribe their personal preferences to the service. For exam
ple, a user can specify what kinds of attractions (e.g., historical sites) she
likes, and which language (e.g., Chinese) the description of attractions
should be.
• The service recommends attractions according to a user's location (e.g.,
the city that the user is currently in).
• During the recommendation, the service also considers other contexts
like weather and user preferences. If the weather is harsh, the service
will only suggest indoor attractions (e.g., Adelaide Art Gallery). The
definition of weather to be harsh depends on a couple of contexts like the
temperature (e.g., above 30 degree Celsius) and the speed of wind (e.g.,
more than 50 km/h). The recommended attractions will also reflect the
user's preferences, e.g., translating the attraction descriptions to the
user's preferred language.
2.3 ContextUML
In this section, we introduce the ContextUML modelling language, a core
component that underpins the model-driven development of CASs. Con
textUML metamodel is shown in Figure 2.2, which can be roughly divided
into two parts: context modelling metamodel and context-awareness modelling
metamodel.
36 Context-Aware Web Services: Methods, Architectures, and Technologies
Context Source
The type ContextSource models the resources from which contexts are re
trieved. We abstract two categories of context sources, formalized by the
context source subtypes ContextService and ContextServiceCommunity, respec
tively. A context service is provided by an autonomous organization (i.e.,
context provider), collecting, refining, and disseminating context information.
To solve the challenges of heterogeneous and dynamic context information,
we abstract the concept of context service community, which enables the dy
namic provisioning of optimal contexts. The concept is evolved from service
community we developed in (3) and the details will be given in Section 2.3.1.
http://www.capescience.com/webservices/globalweather.
Model-Driven Development of Context-Aware Web Services 37
Context Triggering
The type Context Triggering models the situation of contextual adaptation
where services can be automatically executed or modified based on context
information. A context triggering mechanism contains two parts: a set of
context constraints and a set of actions, with the semantics that the actions
must be executed if and only if all the context constraints are evaluated as
true.
Model-Driven Development of Context-Aware Web Services 39
Den Graben, der um das Lager herumgezogen war, hatte das Wasser stark
verbreitert; die Boys schwammen darin um die Wette.
Auf alten Wegen, die ich aus der Trockenzeit kannte, ging ich
pirschen. Überall stand Wasser und das Gras war sehr hoch.
Wenn ein Stück Wild aufgejagt wurde, hörte man die Sprünge an
dem plätschernden Wasser.
Mit Mühe gelang es mir, einen Riedbock zu erlegen.
Ich kehrte zum Fluß zurück, fuhr zur Boma hinüber und saß
schon am Mittage mit meiner Truppe in einer kleinen Dhau um nach
Panganya zu fahren, wo Herr Wiebusch, ein Angestellter des
Kolonialwirtschaftlichen Komitees, eine Pflanzung anlegen wollte,
wozu er mich um Arbeiter bat.
Wir hatten unerhört gegen den Strom anzukämpfen.
An einer Stelle wurde der Bug des Schiffes so plötzlich von einer
stärkeren Strömung zur Seite gedrückt, daß er das Schilf der
Uferböschung unter sich schob. Wir wurden erst wieder flott, als alle
ins Wasser sprangen und auf schwimmenden Inseln, bis an die Brust
im Wasser stehend, den Bug an einer Leine freiholten. Zum Glück
waren unsere Kleiderkisten in demselben Boot und wir konnten uns
gleich wieder trockene Sachen anziehen.
Mein rechtes Bein war von den entzündeten Wunden so
angeschwollen, daß ich in Panganya mehrere Tage liegen mußte.
Glücklicherweise ging die Entzündung durch nasse Verbände bald
zurück.
Herr Wiebusch hatte mehrere hundert Hacken mitgebracht, um
Land für Baumwolle vorzubereiten. Es fehlte ihm an Arbeitern. Für
Geld hätte er in dieser Zeit auch keine bekommen; da er aber Korn
von der Küste heraufbrachte, hatte er in dieser Hungerzeit das beste
Zahlungsmittel. Jeden Jumben, der kam und über die Not klagte,
schickte ich mit seinen Negern nach der Baumwollpflanzung.
Nach einigen Tagen war dort ein reges Leben. Mehrere hundert
Neger schwangen die langstieligen Hacken und rodeten das kräftige
Schilfgras. Gegen abend kamen sie zur Poschoausgabe.
Ich blieb eine ganze Woche bei Herrn Wiebusch. Tagsüber sah
ich der Arbeit zu, las und schrieb; abends versammelten wir die
„Baumwollschüler“, junge Neger aus allen Teilen der Kolonie, um
uns, und ließen Theater spielen, tanzen und singen.
Die Verschiedenheit der Tänze und Gesänge war recht auffallend;
jeder Stamm fand seine Gesänge ernst und schön und die des
Nachbarstammes schon komisch.
Ein Leopard tötete einen Mann und wurde bei der Leiche erlegt.
⇒
GRÖSSERES BILD
Unser letzter Esel ging ein. Es ist schrecklich, wenn man nicht
helfen kann. Tsetsekrankheit natürlich, denn wir sind ja mehrmals in
Gegenden gekommen, wo die Fliege gesehen wurde, die die kleinen
tierischen Parasiten überträgt.
Die Tsetsekrankheit und das Texasfieber sind die großen
Hindernisse, die der Viehzucht und dem Transportwesen
entgegenstehen.
Welch verlockende Kulturaufgaben, diese Feinde zu bekämpfen!
Wunderbar ist es, daß bei all den großen Krankheiten ein Insekt
die abscheuliche Aufgabe übernommen hat, die kleinen Parasiten
dem Blut der Säugetiere einzuimpfen. Und immer nur ein ganz
bestimmtes Insekt!
Mit einer gewissen Ehrfurcht muß man sie ansehen: die
Anopheles, die kleine Mücke, deren Weibchen als Überträger des
Malariaparasiten bisher das tropische Afrika gesperrt hat; die
Glossina morsitans, die die Haustiere des Menschen haßt, und deren
Schwester — durch die Schlafkrankheit — Zentralafrika entvölkert, in
der Zeit, wo die Kulturmenschheit die Hände nach dem volkreichen
Uganda ausstreckt, um Arbeiter zu suchen; und endlich die träge,
dickleibige Zecke, den Boophilus, der auf den Weideplätzen auf die
Rinder wartet, um ihnen Blut zu nehmen und das Texasfieber zu
geben.
Briefe! Der Ombascha Chuma gibt mit ein ‚Barua‘, das ein Bote
aus Mohorro mitgebracht hat. Ich soll es ihm vorlesen.
Von Askari Kisusa, der verwundet im Hospital liegt. Inhalt:
„Grüße an Abdallah, der noch eine Rupie von mir bekommt; und ich
will von Sefu zwei Rupie; und die Bibi des Mzee schuldet mir noch 18
Pesa für Reis.“ Dann folgen Grüße an alle, die dem Kranken
einfielen.
Deshalb läßt der Ombascha die Askari antreten, nimmt den Zettel
und sagt: „Es ist ein Brief von Kisusa gekommen, er schreibt: Grüße
an...“ Jetzt nennt er, vom rechten Flügel anfangend, die Namen
einzeln und sieht zwischendurch immer wieder auf den Zettel, als ob
er lesen könne. Dann sagt er: „Weg-treti.“
Ich diktierte Briefe an Jumben, die nur arabische Schrift lesen
konnten, und ließ mir das Diktierte nachher vorlesen. Dabei kam
heraus, daß diese Schreiben einen ganz besonderen Stil hatten. Das
Hauptmerkmal war, daß alles mehrmals wiederholt wurde. Aber auch
Ausdrücke kamen vor, die besonders auffielen. „Du sollst gut
aufpassen,“ hieß: „sieh mit beiden Augen.“
Als Hohlmaß für Getreide haben die Neger den Pischi (zu vier
Kibaba). Sie stellen das Maß hin und füllen soviel hinein und darauf,
als nicht über die Ränder hinunterläuft. Als ich fragte, weshalb sie
nicht glatt abstrichen, sagten sie, der Bezirksamtmann hätte das so
erlaubt; früher habe man noch ganz anders gemessen: da habe man
beide Arme um den Rand gehalten.
So sind sie: sie wollen mit dem Bewußtsein vom Markte gehen,
für ihr Geld etwas mehr bekommen zu haben, als ihnen zustände;
ja, sie hassen, glaube ich, instinktiv das eherne Gesetz, das sich
brüstet, gerecht zu sein, wenn es gleichmäßig ist.
Mit ihrer Arbeit ist es ähnlich. Sie arbeiten gut, wenn ich
anerkenne, was meinem ganzen Wesen noch fremd ist: daß es nicht
nur eine Pflicht gibt zu arbeiten, sondern auch eine zu faulenzen.
„Sechs Tage sollst du arbeiten und jeden Morgen auf die Minute
anfangen.“
Wo?
Vielleicht in einem härteren Klima, wo der Boden nicht so willig
hergibt, was Menschenhand ihm abringt; hier gibt es andere
Gesetze!