SMART
Supporting the Design and Execution of
User-centric Service-based Applications
Piergiorgio Bertoli, Raman Kazhamiakin, Michele Nori, Marco Pistore
SAYservice s.r.l., Trento, Italy
SMART Elements
•
Service Wrapping
–
Goal: allow for integration and mashup of heterogeneous services and sources (e.g., Web pages)
–
Contributions:
• XS* language for information extraction from non-structured sources
• DFlow language for data aggregation, filtering, and transformation
• Service execution, validation, and monitoring container
•
User-centric service modeling
–
Goal: model services and application concepts in user-centric way using intuitive and unambiguous
concepts – user assets (time, location, social relations).
–
Contributions:
• Domain Object specification language to represent the services, their relations, and evolution in a user-centric way
• Predefined asset-specific service models for simple and intuitive user interaction
•
Metaphor-based user interaction
–
Goal: make the services available to the user through the asset-based interaction mechanisms –
interaction metaphors
–
Contributions:
• Client-server APIs for service representation, search, navigation in predefined metaphors (e.g., calendar or map)
• Implementation for Android OS and HTML/Javascript
•
Context awareness
–
Goal: make the services available when it is suitable for the user – in the user context
–
Contributions:
• Infrastructure supporting context extraction, monitoring, and processing rules
Demo application
Personal assistant application (Smartphone, Android OS)
–
Various types of user activities
•
Cultural events (e.g., concerts, shows) and services in the Trentino region of Italy
•
User-defined activities and tasks (ToDos and appointments)
–
Metaphor-based information representation
• Map, Calendar
• Distribution and representation of social dimension (on top of Facebook social network)
–
Integration of relevant associated services
•
Transportation means
•
Booking
–
Continuous service and context monitoring
•
To detect important service changes (e.g., transportation problem, concert cancelation)
•
To proactively offer suitable services (points of user interest nearby, recommendations from
social network)
•
Examples of involved external services
–
Cultural events: PrimiAllaPrima – web page with Trentino events (Web page,
www.primiallaprima.it)
–
Points of interests: categorized Foursquare venues (Web service, foursquare,com), drugstores
(Web page, www.farmacieaperte.it)
SMART Platform
Time Location Social Calendar Map Agenda WalletService wrapper Service Wrapper Container
Standard services Databases Web pages EDO Legacy systems
- Heterogeneous - Fragmented - Closed - Passive - Unreliable/uncontrolled SMART Services - Uniform - Aggregated - Open - Active
- Reliable and robust
Service data mashups DFlow Data extraction XS* Connectors/ plugins CACHING CHANGE DETECTION VALIDATION EVENT MANAGEMENT Service calls notifications - Life-cycle management - Re-configuration - QA policies
Service Wrapping
Service Wrapping:
Information extraction with XS*
Goal:
extract information from non-/semi-structured sources (e.g., HTML)
Challenge:
overcome limits of existing XML validation/transformation technologies
• XSD: limited syntactic validation• XSLT: loose data transformation
• Relax NG and others: expressive validation but inefficient
•
XS*:
–
Markup Language for
• Syntactic validation: hierarchical “regular expressions” • Semantic validation: data constraints
• Information extraction: markup, XPath, data processing
Service Wrapping:
Information extraction with XS*
<xss:template name="dettagliotreno">
<html xss:anyAttrs="true">
<head xss:anyContent="true" />
<body>
<h1 xss:anyContent="true" />
<div class="bloccorisultato“ xss:label="element">
<strong>
<xss:structured-text><xss:text pattern="Partenza: " />
<xss:text pattern="(\D)*" label="partenza"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraPartenza" />
</xss:structured-text><br /> </strong>
<xss:anyText label="numero" /><br /> <xss:repeat min="0" max="unbounded">
<xss:anyText />
<xss:repeat min="0" max="unbounded"><br /></xss:repeat> </xss:repeat>
<strong>
<xss:structured-text>
<xss:text pattern="Arrivo: " />
<xss:text pattern="(\D)*" label="arrivo"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraArrivo" />
</xss:structured-text> <br /> </strong> </div> </body> </html> </xss:template>
Service Wrapping:
Information extraction with XS*
<xss:template name="dettagliotreno">
<html xss:anyAttrs="true">
<head xss:anyContent="true" />
<body>
<h1 xss:anyContent="true" />
<div class="bloccorisultato“ xss:label="element">
<strong>
<xss:structured-text><xss:text pattern="Partenza: " />
<xss:text pattern="(\D)*" label="partenza"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraPartenza" />
</xss:structured-text><br /> </strong>
<xss:anyText label="numero" /><br /> <xss:repeat min="0" max="unbounded">
<xss:anyText />
<xss:repeat min="0" max="unbounded"><br /></xss:repeat> </xss:repeat>
<strong>
<xss:structured-text>
<xss:text pattern="Arrivo: " />
<xss:text pattern="(\D)*" label="arrivo"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraArrivo" />
</xss:structured-text> <br /> </strong> </div> </body> </html> </xss:template>
Structured pattern
Service Wrapping:
Information extraction with XS*
<xss:template name="dettagliotreno">
<html xss:anyAttrs="true">
<head xss:anyContent="true" />
<body>
<h1 xss:anyContent="true" />
<div class="bloccorisultato“ xss:label="element">
<strong>
<xss:structured-text><xss:text pattern="Partenza: " />
<xss:text pattern="(\D)*" label="partenza"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraPartenza" />
</xss:structured-text><br /> </strong>
<xss:anyText label="numero" /><br /> <xss:repeat min="0" max="unbounded">
<xss:anyText />
<xss:repeat min="0" max="unbounded"><br /></xss:repeat> </xss:repeat>
<strong>
<xss:structured-text>
<xss:text pattern="Arrivo: " />
<xss:text pattern="(\D)*" label="arrivo"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraArrivo" />
</xss:structured-text> <br /> </strong> </div> </body> </html> </xss:template>
Complex text
pattern with
extraction
Service Wrapping:
Information extraction with XS*
<xss:template name="dettagliotreno">
<html xss:anyAttrs="true">
<head xss:anyContent="true" />
<body>
<h1 xss:anyContent="true" />
<div class="bloccorisultato“ xss:label="element">
<strong>
<xss:structured-text><xss:text pattern="Partenza: " />
<xss:text pattern="(\D)*" label="partenza"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraPartenza" />
</xss:structured-text><br /> </strong>
<xss:anyText label="numero" /><br /> <xss:repeat min="0" max="unbounded">
<xss:anyText />
<xss:repeat min="0" max="unbounded"><br /></xss:repeat> </xss:repeat>
<strong>
<xss:structured-text>
<xss:text pattern="Arrivo: " />
<xss:text pattern="(\D)*" label="arrivo"/>
<xss:text pattern="(\d){2}:(\d){2}" label="oraArrivo" />
</xss:structured-text> <br /> </strong> </div> </body> </html> </xss:template>
Hierarchical data
extraction
{
element: {
partenza:…,
oraPartenza: …,
arrivo:…,
oraArrivo:…}
}
User-centric service modeling
Capture asset properties:
•
•
Capture asset properties:
•
For metaphor-based
representation
•
For contextualized
service offer
Modeling services with
•
•
•
Modeling services with
Domain Object specification:
•
Service relations
•
Service state
•
Service evolution
Hierarchical model: from
generic services to user
centric, personalized
services
Hierarchical model: from
generic services to
user-centric, personalized
services
Interface:
- Business operations
- Event ports
- Inheritance
Relations:
- Relevant services and objects
- Access to related information
- Event subscriptions
Information:
- Business data
- Evolution
invocations
events
invocations
events
Domain Objects
Implemented as:
•
•
•
Implemented as:
•
Service operation
•
Composed process
•
Object modification
Scripting language with:
•
•
•
•
Scripting language with:
•
Operation calls
•
Event publishing
•
State /relations update
Domain Object: specification
DomainType Event implements TimeObj, LocationObj{ var data : EventDataStruct;
inferred var startTime = data.from; inferred var endTime = data.to; ...
@Process(recommend-on-facebook.bpmn)
operation recommend(user: User); operation personalize(user: User); }
DomainType TimeObj {
var startTime : DateTime; var endTime : DateTime; ...
}
DomainType LocationObj { var where : Location; ... }
Asset
corresponding properties
-Asset-specific interface and
corresponding properties
-
Location
-
time interval
Asset
mapped onto the service
data
Asset-specific properties
mapped onto the service
data
Domain Object: specification
DomainType PersonalEvent implements TimeObj, LocationObj{
var user : User;
rel event : Event;
inferred var startTime = event.startTime; inferred var endTime = event.endTime;
...
port ticketsRunOut(remaining: int);
... @Process(transport-booking.bpmn) operation findTrain(); operation cancel(); operation book(); ... subscribe event!UPDATE() { if (event.data.tickets < 10) { publish ticketsRunOut(event.data.tickets); } } }
DomainType Event implements TimeObj, LocationObj{ var data : EventDataStruct;
inferred var startTime = data.from; inferred var endTime = data.to; ...
@Process(recommend-on-facebook.bpmn)
operation recommend(user: User); operation personalize(user: User); }
DomainType TimeObj {
var startTime : DateTime; var endTime : DateTime; ...
}
DomainType LocationObj { var where : Location; ...
}
dependency
Object dependency: personal
event relates to “generic”
event
Object dependency: personal
event relates to “generic”
event
Asset-specific properties
correspond to the “generic”
event properties
Asset-specific properties
correspond to the “generic”
Domain Object: specification
DomainType PersonalEvent implements TimeObj, LocationObj{
var user : User;
rel event : Event;
inferred var startTime = event.startTime; inferred var endTime = event.endTime;
...
port ticketsRunOut(remaining: int);
... @Process(transport-booking.bpmn) operation findTrain(); operation cancel(); operation book(); ... subscribe event!UPDATE() { if (event.data.tickets < 10) { publish ticketsRunOut(event.data.tickets); } } }
DomainType Event implements TimeObj, LocationObj{ var data : EventDataStruct;
inferred var startTime = data.from; inferred var endTime = data.to; ...
@Process(recommend-on-facebook.bpmn)
operation recommend(user: User); operation personalize(user: User); }