3 AN ARCHITECTURE FOR
MONITORING WEB SERVICES
BEHAVIOR
Run-time software monitoring can be used for various
purposes, e.g., profiling, performance analysis, fault-
detection, etc. (Delgado et al., 2004). In this paper,
we propose a run-time monitor for behavior detection
that can also be used for software-fault detection.
Figure 2: Overall architecture of our BPEL run-time moni-
toring system.
Figure 2 shows the overall architecture of our
BPEL run-time monitoring system, expressed in a
style similar to the one used by Delgado et al. Our
architecture allows for the monitoring of various pro-
tocols expressed as interface expressions. The moni-
tor notifies, dynamically, when a specific behavior has
been detected—or when it cannot be detected.
The architecture we propose is independent of the
specific BPEL engine used for running the BPEL pro-
cesses. This architecture is also customizable and ex-
tensible with respect to how the monitor reacts when
a behavior is detected.
We allow the monitoring of a process against var-
ious interface expressions, possibly all independently
and simultaneously. Thus, given a process and a
specific interface expression, there will be a specific
monitor instance whose role will be to monitor the
expected behavior.
4 MONITORING WS-BPEL
PROCESSES USING BPEL.RPM
Figure 3 shows the overall structure of BPEL.RPM
(BPEL Run-time Process Monitoring), a concrete im-
plementation of the run-time monitoring architecture
described earlier.
BPEL.RPM is composed of three key compo-
nents:
• An Event Observer, which is specific to a particu-
lar execution engine.
• An Analyzer, which analyzes the various events
as they occur and match them with respect to a
specified interface expression.
• An Action Handler, which reacts according to
some user-defined policy when a specific behav-
ior is detected.
4.1 Interface Expression Specification
We showed earlier (Figure 1) an abstract notation for
interface expressions, used to specify behavior proto-
cols. In BPEL.RPM, we use a mixed regular expres-
sions and XML representation, where a Protocol is
characterized by two key elements:
• MonitoredActivities: The set of activities from
the BPEL process which are monitored. Thus, an
event associated with a BPEL activity not in this
set is ignored.
• InterfaceExpr: The interface expression repre-
senting the behavior to be monitored. The out-
come (verdict) of monitoring depends on the
value of the Excludes attribute:
1
– Excludes="no": Monitoring succeeds when
an instance of the behavior specified by the
InterfaceExpr is detected, and fails when it
definitively cannot satisfy it. This case is typi-
cally associated with an explicit contract spec-
ification, but can also be used for identifying
interesting sub-sequence of events, e.g., as re-
quired for intrusion detection.
– Excludes="yes": Monitoring succeeds when
the observed behavior does not match the in-
terface expression, and fails when it matches.
Monitoring using interface expression is simi-
lar, although not identical, to searching a stream
using grep. The key difference is that whereas
grep processes a stream of independent lines, the
monitor behaves as though it processes a stream of
incrementally-built sequences of events; that is, each
new event is added to the trace, which is then matched
against the pattern. Also, when the pattern does not
contain an explicit “end of process” marker (“$”), an
occurrence of the match will be signaled as soon as an
appropriate sequence of events is encountered. Thus,
an interface expression such as “a;b;c” is not exactly
the same as “ˆ.*;a; b;c;.*$”—in the latter case, a
success (as well as a failure) would be signaled only
when the monitored process terminates—, whereas
they would be equivalent in the grep case.
1
Both are instances of safety properties (Schneider,
2000), as the interface expression and the trace are finite.
WEBIST 2011 - 7th International Conference on Web Information Systems and Technologies
132