2. WoT application timeout: if a WoT agent crashes
during the executing of its operation, the WoT ap-
plication manager eventually gives timeout, check
which WoT agents are not alive, and performs
retry, replacement, or executes the disaster mode.
For further details about application timeout de-
tection see (Angarita Arocha, 2015).
3 CASE STUDY
Figure 5 shows a fictional e-Health application we
adapted from (Angarita Arocha, 2015). This ap-
plication is built from 9 components, and it is in-
stalled in the mobile phone of a patient called Jenny;
that is, the phone has a WoT agent which also
plays the role of the WoT application manager, rep-
resented by phone
♦
and phone
. The WoT ap-
plication triggering event specifies that it runs ev-
ery 30 minutes. Jenny wears the SugarImplant and
VitalSignsImplant smarts devices that gather infor-
mation about her health. When the WoT application
starts, phone
♦
tells both devices to send their data
to SugarAnalysisandVitalSignsAnalysis,which send
their conclusions to Diagnoser. Diagnoser sends its
results to the appropriate components depending on
the necessary actions.
Table 1 shows the manager and location of each
of the components according to the deployment
protocol described in Section 2. SugarImplant and
VitalSignsImplant are powerful objects hosting
WoT agents. SugarAnalysis, VitalSignsAnalysis,
and Diagnoser are not physical objects; however,
they are provided as WoT agents hosted in a cloud
infrastructure. CallEmergency, NotifyContact,
NotifyDoctor, and DisplayMessage are RESTful
services which do not have WoT agents. Their
corresponding WoT agents are created in Jenny’s
mobile phone (Phone).
Table 1: WoT agents managers and hosts.
Component Manager Host
SugarImplant Itsel f Itsel f
VitalSignsImplant Itsel f Itsel f
SugarAnalysis Itsel f Cloud
VitalSignsAnalysis Itsel f Cloud
Diagnoser Itsel f Cloud
CallEmergency Phone Phone
NotifyContact Phone Phone
NotifyDoctor Phone Phone
DisplayMessage Phone Phone
To understand context-awareness, sup-
pose that the application started its execution,
SugarImplant, VitalSignsImplant, SugarAnalysis,
and VitalSignsAnalysis analysis were successfully
invoked. SugarAnalysis and VitalSignsAnalysis
send their messages to Diagnoser (Listings 1 and 2).
Note that both messages indicate the id of the WoT
application they belong to. In this case, the id
corresponds to Jenny’s application. Diagnoser may
receive data from other applications or processing
context-free requests.
{ " id " : " e427b92 cfb 07e68215110b6e8 f 7b" ,
" send er " : " SugarAnalys is " ,
" data " : [ {"name " : " sugar R e s u l t 1" , "
value " : " someValue1"} ,
{"name " : " sugarRes u l t 2" , " value " : "
someValue2"} ]
} \ vspace {−1 . 6mm}
Listing 1: SugarAnalysis Message.
{ " id " : " e427b92 cfb 07e68215110b6e8 f 7b" ,
" send er " : " V i t al S i gnsAnal y s i s " ,
" data " : [ {"name " : " v i t a l S i gn s R e s u l t 1 "
, " value " : " vi t a l S i g n s V a lue "} ]
}
Listing 2: VitalSignsAnalysis Message.
When Diagnoser receives Jenny’s data from
SugarAnalysis and VitalSignsAnalysis, it performs
its corresponding operation which may produce
the following output: NORMAL, WARNING, or
EMERGENCY. Diagnoser also contains the moni-
toring rules associated to Jenny’s application showed
in Listing 3. These rules are stored in the knowledge
base of Diagnoser and verified by its autonomic com-
ponent (see Figure 1). The rules showed in Listing 3
are all post-condition rules, but other kind may exist
such as QoS monitoring rules.
id : " e427b92 cfb 07e68215110b6e8 f 7b"
i f output = NORMAL, send Jenny ’ s
inf or m a t ion to DisplayMessage ;
i f output = WARNING, send Jenny ’ s
inf or m a t ion to DisplayMessage , and
NotifyDoctor ;
i f output = EMERGENCY, send Jenny ’ s
inf or m a t ion to DisplayMessage ,
NotifyDoctor , Notif yContac t , and
CallEmergency ;
i f FAILURE, execut e DISASTER_MODE;
Listing 3: Jenny’s Rules.