A Framework for Detecting Anomalous Services in OSGi-based Applications
Tao Wang
Institute of Software, Chinese Academy of Sciences
Beijing 100190, P.R. China
Graduate University, Chinese Academy of Sciences
Beijing 100049, P.R. China
wangtao08@otcaix.iscas.ac.cn
Jun Wei, Wenbo Zhang, Hua Zhong
Institute of Software, Chinese Academy of Sciences
Beijing 100190, P.R. China
{wj, zhangwenbo, zhongh}@otcaix.iscas.ac.cn
Abstract—The service-centric applications are composed of
third-party services. These services delivered by different
vendors are usually black-box components which lack source
code and design documents. It is difficult to evaluate their
quality by static code analysis. Detecting anomalous services
online is important to improve the reliability of these
applications. This paper presents a framework for detecting
anomalous services in the OSGi-based applications, followed
by a method of monitoring services. We propose a method to
monitor the resource utilization and interaction of services
through tracing thread transfer. In addition, we detect
anomalous services with XmR control charts. A prototype tool
was implemented and applied in an application server. The
experimental results show that our method 1) is of high
accuracy for monitoring the resource utilization of the OSGi-
based services; 2) does not introduce significant overhead; 3)
can detect anomalous services effectively.
Keywords- Anomaly Detection; Service Monitoring; OSGi;
Resource Utilization; XmR
I. I
NTRODUCTION
The Service-Oriented Computing (SOC), which provides
higher-level abstractions for organizing applications in open
environments, improves the productivity and quality of
applications [1]. Services reflect a SOC approach to
programming that is based on the idea of composing
applications by discovering and invoking services to
accomplish tasks. In recent year, OSGi (Open Service
Gateway initiative) has become one of the most promising
frameworks for managing service-oriented applications. The
OSGi framework, which provides a service model and a
service registry, is an execution environment for dynamically
loadable services [2]. OSGi technology is attracting growing
interests, and a large number of large-scale projects have
released new versions with OSGi, such as JEE application
server Websphere, IDE eclipse and the BMW automobile
control system. The services based on OSGi are always
implemented as components that are service-oriented
components [3]. The COTS (Commercial Off-The Shelf)
market around OSGi is emerging [3], where the number of
third-party services is increasing. However, a defective
service may affect all the related services and lead to the
failure of the whole system eventually. Thus it is a critical
issue for COTS to ensure the quality of services [4].
However, since the COTS services are usually black-box
program units which lack source code and design documents,
it is difficult to understand the characteristics of these
services, and evaluate their quality by static code analysis.
Furthermore, some runtime factors, e.g., access sequences,
concurrency number and resource usage, may cause
contextual anomalies [21], which are difficult to be
eliminated through testing. Therefore, detecting anomalous
services online is essential for improving the reliability of
OSGi-based applications.
This paper presents a framework for detecting anomalous
services in OSGi-based applications, followed by a method
of monitoring services. The main contributions of this paper
are as following:
z We present a thread-tracing method of monitoring
resource utilization and interactions from the service
perspective. This method neither modifies software nor
introduces significant overhead, so it is suitable for
monitoring online.
z We introduce the control charts for resource utilization
to detect anomalous services. They can detect the
anomalous trend of resource utilization without prior
knowledge.
z We present an anomaly detection framework for
OSGi-based applications. A prototype tool was
implemented and applied in an application server.
z We evaluate the framework by a series of experiments.
The experimental results demonstrate that our method
can monitor resource utilization in a high accuracy
without significant overhead, and detect the anomalous
services effectively.
The rest of this paper is organized as follows. Section II
presents a thread-tracing method of monitoring services.
Section III introduces control charts to detect anomalous
services. Section IV demonstrates a framework for detecting
anomalous services. Section V provides experimental results
to validate the method in accuracy, overhead and
effectiveness. Section VI reviews the related works. Section
VII concludes this paper.
II. M
ONITORING
S
ERVICES IN
OSG
I
-
BASED
A
PPLICATIONS
An OSGi service platform is composed of service
providers, service requesters and a service registry. A service
provider registers services to publish, and a service requester
discovers services from the service registry to invoke. The
service described as a Java interface is always packaged as a
standard JAR file – bundle, in which service implementation,
related resource files and manifest files are included. Bundles
interact with each other as service invocation. Since bundles
2012 IEEE Ninth International Conference on Services Computing
978-0-7695-4753-4/12 $26.00 © 2012 IEEE
DOI 10.1109/SCC.2012.59
242
2012 IEEE Ninth International Conference on Services Computing
978-0-7695-4753-4/12 $26.00 © 2012 IEEE
DOI 10.1109/SCC.2012.59
250