Situation-Aware Application
Development with SCENE
Isaac S. A. Pereira
Agenda
 From Context to Situations
 From Drools to SCENE
 SCENE Features
 Development Environment
 Sample Application
From Context to Situations
Context Composition
Situation
Context
Sensor Data
A
B
S
T
R
A
C
T
I
O
N
From Context to Situations
É um tipo de evento complexo que representa a
ocorrência de um estado de interesse sobre entidades
de um dado domínio, composta de uma especificação
lógica que define as condições das entidades que
eventualmente participam da mesma.
From Context to Situations
From Drools to SCENE
Temporal
Reasoning
Pattern-Matching
(ReteOO)
Situations
SCENE
From Drools to SCENE
Application level
Domain Situation
Specification
SCENE Engine
Situation API
Drools Engine
Rule Engine
Event Model
From Drools to SCENE
SiNoS
uses
situation
model
uses for publishing
situation-api
SCENE
SCENE-core
From Drools to SCENE
Situation API
Situation Design
public MySituation extends SituationType {
@Role(label=“l1”)
private Entity role1;
...
@Role
private Entity’ roleN;
...
//GETTERS AND SETTERS
}
Situation Design
rule “MySituation”
@role(situation)
@type(MySituation)
when
l1: Entity(<constraint1>,...,<constraintN>)
...
roleN: Entity’(<constraint’1>,...,<constraint’N>)
then
SituationHelper.situationDetected(drools);
end
Participation
Temporal Relations
Temporal Relations
Situations over Sliding Windows
MySituation() over window:time(1h)
Actually...
$e: MySituation()
ActivateSituation(sit==$e) over window:time(1h)
Development
SCENE 0.9.1
Drools 5.5.0.Final
SiNoS 0.4.5
Development
mvn archetype:generate
-DarchetypeGroupId=br.ufes.inf.lprm
-DarchetypeArtifactId=scene-archetype
-DarchetypeVersion=0.9.1
-DarchetypeRepository=https://raw.github.
com/pereirazc/SCENE/mvn-repo
Development
New Project
GroupId=br.ufes.inf.lprm
ArtifactId=seminario
mvn eclipse:eclipse
Sample Application
Fever Situation
Download

Situation-Aware Application Development with SCENE