A Framework for Context-Aware Services Using
Mehran Najafi, Kamran Sartipi
Department of Computing and Software, McMaster University, Hamilton, Ontario, L8S 4K1, Canada
Abstract— In order to call a context-aware service, a service
requester has to reveal his contextual information to a service
provider or a context manager, which may jeopardize his privacy
and security. Moreover, if the client's context changes over time, a
context-aware web service must be called frequently with the
updated context values. In this paper, we propose a service
customizer agent at the client's side and a service provider that
generates general service responses and service customization
knowledge. The customizer agent uses the knowledge to
personalize the general service response based on the client's
context. In addition to offering innovative context-aware services,
the proposed approach improves the privacy and security features of
Keywords: Service-Oriented Architecture (SOA); Context-
Aware Services; Software Agent; Knowledge Management;
Service-Oriented Architecture (SOA)  is a high-level
architectural blueprints for enterprise systems. SOA based
architectures focus on dividing the enterprise application
layer, where its components (as services) have a direct
relationship with the business functionality of the enterprise.
Web service, which is based on message-exchange, is the
most widely adopted SOA technology.
In service provisioning, context  refers to any
information that can be used to characterize the situation of a
service requester or provider such as client’s identity,
location, and resources, as well as service time. Context-
aware services  are services that can adapt the provided
results to changing context information. Since mobile
devices (such as PDA and cell phones) have become more
powerful, it is extremely important to include user’s context
in the service provisioning. Moreover, clients would like
having personalized services such as adviser services that
take client information and give proper advice.
Traditional context-aware frameworks include a context
manager component that acquires contextual information
from the service requesters and provides them to the service
providers. Then, in order to receive personalized services, a
service client has to reveal his context. Traditional
concept that provides
approaches have several limitations to develop context-aware
services such as follows.
When a client’s context is modified, a context-aware
service must be called with the updated contextual
information. Then, if the context is changing
continuously (such as location), the service must be
called several times that increases the network traffic as
well as the cost of using the service.
If a client’s context is sensitive or confidential (e.g.,
client’s personal information), sending them to a
context manager (or a service provider) may violate
user’s privacy and security.
When the requested contextual information is large,
sending them to a context manager requires large
Therefore, if a client does not want to (or can not) send his
contextual information, the traditional approaches fail. To deal
with this limitation, we propose a framework that allows clients
to keep their context local and still receive personalized
services. In this framework, there is a customizer agent at the
client’s side that has access to the client’s contexts and
customizes service responses based on them. In order to
employ the service customizer, a service provider needs to
generate general service responses as well as customization
The organization of this paper is as follows. Previous work
is discussed in Section 2. The proposed framework and its
details are discussed in Section 3. A case study in the business
domain is explained in Section 4. Finally, conclusions and
future work are discussed in Section 5.
II. PREVIOUS WORK
A generic architecture for context-aware services is
introduced in  (Figure 1). The specified architecture has four
layers as follows. Physical entities layer includes a set of
sensors and input devices to capture the context from the
environment. Then, it classifies this information to allow the
services to request context information. Finally, the context
management layer stores the classified context in a database.
The service-provisioning layer is responsible for the service
D. Krafzig, K.Banke, and D.Slama. “Enterprise SOA: service
oriented architecture best practices,” Prentice-Hall, 2005.
A. Dey and G. Abowd, “Toward a better understanding of context
and context- awareness,” Technical Report, Georgia Institute of
G. Kapitsaki, G. Prezerakos, N. Tselikas, and I. Venieris, “Context-
aware service engineering: A survey”, Journal of Systems and
Software, vol 82, Issue 8, pp. 1285-1297, 2009.
S. Mostafaoui, and B. Hirsbrunner, “Context-aware service
provisioning,” IEEE/ACS International Conference on Pervasive
Services, pp. 71-80, 2004.
F. Solsvik. “D4.2.3: Final integrated services design and
implementation report Akogrimo”, .http://www.akogrimo.org,
I. Chen, S. Yang, and J. Zhang, “Ubiquitous provision of context
aware web services”. Proceedings of the IEEE international
Conference on Services Computing, pp. 60-68, 2006.
M. Keidl, and A. Kemper, “A framework for context-aware
adaptable web services”. Advances in Database Technology -
EDBT 2004, pp. 826-829, 2004.
S. Dustdar, and H. Truong, “A survey on context-aware web
service systems”, International Journal of Web Information
Systems. Vol. 5, no. 1, pp. 5-31. 2009.
H. Truong, L. Juszczyk, A. Manzoor, and S. Dustdar, “ESCAPE -
an adaptive framework for managing and providing context
information in emergency situations,”
Conference on Smart Sensing and Context, pp. 207-222, 2007.
 D. Athanasopoulos, A. Zarras, V. Issarny, E. Pitoura, and P.
Vassiliadis, “CoWSAMI: Interface-aware context gathering in
ambient intelligence environments,” Pervasive Mobile Computing,
Vol 4, no 3, pp. 360-389, 2008.
 J. Wohltorf, R. Cissee, A. Rieger, and H. Scheunemann,
“BerlinTainment - an agent-based serviceware framework for
context-aware services,” 1st International Symposium on Wireless
Communication Systems, pp. 245-249, 2004.
 T. Lech, and L. Wienhofen, “AmbieAgents: a scalable
infrastructure for mobile and context-aware information services,”
In Proceedings of the Fourth international Joint Conference on
Autonomous Agents and Multiagent Systems, Netherlands, pp.
 H. Nwana. “Software agents: an overview”, Knowledge
Engineering Review, Vol 11, no 3, pp. 205-244,1996.
 M. Khedr, and A. Karmouch, “ACAI: agent-based context-aware
infrastructure for spontaneous applications,” Journal of Network
and Computer Applications, Vol. 28, no 1, pp. 19-44, 2005.