ContextServ: A Platform for Rapid and

fizzlargeΑσφάλεια

3 Νοε 2013 (πριν από 3 χρόνια και 10 μήνες)

91 εμφανίσεις


1
/24


21/05/2009


ContextServ at ICSE 2009

ContextServ: A Platform for Rapid and
Flexible Development of Context
-
Aware Web Services

Quan Z. Sheng
, Sam Pohlenz, Jian Yu,
Hoi S. Wong, Anne H.H. Ngu, and
Zakaria Maamar

School of Computer Science

The University of Adelaide


2
/24


21/05/2009


ContextServ at ICSE 2009

Agenda


Context
-
Aware Web Services (CASs)


Challenges in Developing CASs


ContextServ Platform


Architecture


Context Provisioning


CAS Modeling


Model Transformation


Example CASs


3
/24


21/05/2009


ContextServ at ICSE 2009

Context
-
Aware Web Services


Context awareness
: the capability of
being aware of its physical environment
or situation (context) and responding
proactively and intelligently based on
such awareness


One of the most important trends in
computing that holds the potential to
make our daily lives more productive,
convenient, and enjoyable


Web services
: a major
technology to implement loosely
-
coupled business processes and
perform application integration


A flourishing research and
development area in the last
decade


Context
-
aware Web service (CAS)
:
make Web services more
personalized
, adaptive, and
intelligent


Vision of “
The Future Internet
”: an Internet of services where services are
ubiquitous (http://www.future
-
internet.eu/)


4
/24


21/05/2009


ContextServ at ICSE 2009

Attraction Search Service:

An Example CAS

Attractions Search

Service (ASS)

Recommend attractions according to
user’s location, weather, language:

1) If weather is bad (harsh weather):
indoor attractions

2) If description is not in preferred
lang.:
translate to the preferred lang.

Subscribe personal preferences
(e.g., preferred attractions,
language)

Harsh weather

is defined as:

(temperature>40
°
C or temperature<5
°
C)
or rainlikelihood>80%


5
/24


21/05/2009


ContextServ at ICSE 2009

To Date, CASs Are Still Hard to Build…


Current Web service standards (e.g., SOAP, UDDI, WSDL)
are not sufficient for describing and handling context
information


Context provisioning is not trivial


Heterogeneity of context providers


Quality of context


Dynamic context environments (e.g., unavailability, quality change)


Context aggregation


Lack of generic approach for formalizing the CAS
development


Contexts management is implemented in an ad
-
hoc manner


Evolution of Web service platforms

Developing CASs is cumbersome, error
-
prone, and time
-
consuming, especially when these CASs are complex.


6
/24


21/05/2009


ContextServ at ICSE 2009

ContextServ Project


ContextServ is a research project aiming at rapid and
flexible development of context
-
aware Web services
(CASs)


Sponsored by Australian Research Council (ARC)


ContextServ provides a platform for
model
-
driven
development

of CASs


Offers design flexibility by separating the modeling of
context and context
-
awareness from service components


Uses high
-
level, visual modeling language (ContextUML)


Offers a set of automated tools for generating and
deploying executable implementations of CASs


Eases development and maintenance of CASs; reduces
development costs



7
/24


21/05/2009


ContextServ at ICSE 2009

Model
-
Driven Development

Platform

Independent Models

Model
Transformation

Target

Executable Platforms

Transformation
knowledge

Transformer

Implementation
of platform 1

Implementation
of platform 2

Implementation
of platform 3

Models

Software systems are specified
in platform independent models
(PIMs) by adopting high
-
level
abstractions (languages)

PIMs are then (semi)automatically transformed
into platform specific models (PSMs) using
transformation tools); A PIM can be transformed
into different executable platforms (i.e., PSMs)

Improves the productivity and quality; eases the system maintenance and
evolution; enhances the portability.


8
/24


21/05/2009


ContextServ at ICSE 2009

ContextUML

Service

Operation

Message

Part

CAObject

CAMechanism

Context

ContextBinding

ContextTriggering

ContextConstraint

Action

ContextService

Context

Community

AtomicContext

CompositeContext

input

output

0..1

0..1

1

1..*

part

0..*

*

*

*

member

*

*

1..*

*

1..*

*

1..*

*

*

1..*

1..*

MechanismAssignment

SourceAssignment

Context Modeling

Context
-
Awareness Modeling

ContextSource

Service Modeling

ContextUML: A UML
-
Based Modeling Language for Model
-
Driven Context
-
Aware Web Service Development. Q.Z.Sheng and B. Benatallah. I
CMB05


9
/24


21/05/2009


ContextServ at ICSE 2009

ContextServ Architecture

ContextUML model

CAS interface

Service
Developer

WSDL specification of
service

Web service
registry (UDDI)

Execution engine (e.g.,
BPWS4J)

Web server

Transform to WSDL

Publish service to registry

Service
consumer

Deploy service

Transform
service model
to executable
specification

Configure and run service

at the engine

Invoke
service

Search
service

Bind to service
implementation

Specify
service
interface

Specify context
provisioning

Specify
context
-
aware
Web service in
ContextUML

Context

Context Manager

community

composition

ContextUML Modeler

Executable specification of
service (e.g., BPEL)

RubyMDA Transformer

1

2

3


10
/24


21/05/2009


ContextServ at ICSE 2009

1. Context Management


ContextServ distinguishes
between
atomic

contexts and
composite

contexts


Atomic contexts
: low
-
level
contexts, directly provided by
context sources


e.g., temperature, rainlikelihood


Composite contexts
: high
-
level
contexts, no direct providers,
aggregate multiple atomic or
composite contexts



e.g., harshWeather


Improve the modeling power of
context information to CAS
designers

Context

ContextSource

ContextService

Context

Community

AtomicContext

CompositeContext

*

*

*

member

*

*

1..*

SourceAssignment




ContextServ exploits
context community

to address the heterogeneous
and dynamic context information


Dynamic provisioning of optimal context information (QoC based selection)


11
/24


21/05/2009


ContextServ at ICSE 2009

Interface


12
/24


21/05/2009


ContextServ at ICSE 2009

Specify Atomic Context

Specify details of the
context provider


13
/24


21/05/2009


ContextServ at ICSE 2009

Specify Composite Context

Composite contexts are specified using statechart, which are then translated to
SCXML, a markup language for statechart, and executed in a SCXML
execution engine such as
Commons SCXML


14
/24


21/05/2009


ContextServ at ICSE 2009

Specify Context Community

Context providers register
to a context community
(next slide)


Dynamic and optimal
context provider selection:


We identify a set of QoC
(Quality of Context)
attributes such as
precision, refresh
-
rate,
trustworthiness etc


The selection is based on
a utility function




calculate
the value

scale the value
(for positive
context)

calculate
the value

scale the value
(for negative
context)

rr(provider)


15
/24


21/05/2009


ContextServ at ICSE 2009

Context Provider Registration

specify
member details

specify supported
contexts


16
/24


21/05/2009


ContextServ at ICSE 2009

2. ContextUML Modeler


ContextServ relies on ContextUML, a
UML
-
based modeling language that
provides high
-
level, visual constructs
for specifying CASs


ContextUML abstracts two context
awareness mechanisms,
context
binding

and
context triggering


Context binding
:
automatic

binding of
contexts to context
-
aware objects


Mapping between a context and
context
-
aware object (e.g., input
parameter of the service)


Context triggering
: contextual
adaptation

where services can be
automatically
executed

or
modified

based on context information


If weather is harsh, only recommend
indoor attractions

CAObject

CAMechanism

ContextBinding

ContextTriggering

ContextConstraint

Action

*

1..*

*

*

1..*

1..*

MechanismAssignment

*

1..*


17
/24


21/05/2009


ContextServ at ICSE 2009

The ContextUML modeler offers a visual interface for specifying CASs using ContextUML.
We extended ArgoUML (
argouml.tigris.org
) by developing a new ContextUML diagram,
which implements all the abstract syntax of ContextUML. Services represented in
ContextUML diagrams are exported as XMI files for later processing.

ContextUML diagram

ContextUML abstracts


18
/24


21/05/2009


ContextServ at ICSE 2009

3. Transformation and Deployment


ContextServ automatically transforms CASs specified in ContextUML
to executable Web service codes in BPEL, which is realized by a
transformer


The transformer was developed in Ruby programming language
(RubyGems 1.0.1, http://rubygems.org/), thus the name of RubyMDA
transformer


A WSDL is also automatically generated


CASs are then deployed to the JBoss Application Server, which
includes a BPEL execution engine, jBPM
-
BPEL1.1

XML2UML

UML2CAS

CAS:BPEL

CAS:JBoss

XMI

Service.bpel

Service.wsdl

build.xml

serviceImpl.java

bpel
-
definition.xml

bpel
-
application.xml

wscompile.xml

web.xml

webservices.xml

Input

Transformer

Generator

Output


19
/24


21/05/2009


ContextServ at ICSE 2009

Transformation Rules


RubyMDA transformer exploits the
model transformation
rules
, which are mappings between ContextUML
stereotypes and BPEL elements, for the transformation

ContextUML

BPEL

<<
conuml.service
>>

<process>

<<
conuml.operation
>>

<invoke>

<<
conuml.message
>>

<variable>

<<
conuml.atomicContext
>>

<invoke>

<<
conuml.compositeContext
>>

<invoke>

<<
conuml.contextBinding
>>

<assign>

<<
conuml.part
>>

part attribute in <to>

<<
conuml.contextTriggering
>>

<switch> <invoke>


20
/24


21/05/2009


ContextServ at ICSE 2009

Transformation Rules in XML Builder

For BPEL generation

For WSDL generation


21
/24


21/05/2009


ContextServ at ICSE 2009


22
/24


21/05/2009


ContextServ at ICSE 2009

Generated BPEL code

Generated WSDL code


23
/24


21/05/2009


ContextServ at ICSE 2009

CASs Developed from ContextServ

CAS applications are available online:
http://www.cs.adelaide.edu.au/~contextserv/

software.html

A movie is available which
captures the whole process in
developing this CAS using
ContextServ platform


24
/24


21/05/2009


ContextServ at ICSE 2009

Thank you for your interest to
ContextServ Project


More information on ContextServ can be found from
http://www.cs.adelaide.edu.au/~contextserv


Other related research information can be found from
http://www.cs.adelaide.edu.au/~qsheng


School of Computer Science

The University of Adelaide