Toward Runtime Self-adaptation Method in Software-Intensive Systems Based on Hidden Markov Model∗

1 2

Hua Wang1,2 and Jing Ying1 College of Computer Science, Zhejiang University, Hangzhou, Zhejiang, China, 310027

Institute of Management Science and Information Engineering, Hangzhou Dianzi University, Hangzhou, Zhejiang, China, 310018 [email protected] Abstract

To reduce the overload of human management, recently runtime self-adaptation is emerging as an important characteristic required by most intelligent software-intensive systems. Most methods are built upon the analysis of concepts of architecture and exploit some “craft” from the perspective of qualitative analysis. However, these methods are often incapable of reasoning about the history of requested services, hence it is difficult to improve more efficiently software efficiency and predictability. Quantitative analysis based on the theory of stochastic processes would be a better option to depict the runtime environment more accurately. This paper presents a demonstration of the idea. In this paper, we employ the mathematic characteristic of Hidden Markov Model to achieve self-adaptation at runtime by means of modeling the behavior of users’ requests and the runtime context. After analyzing the history of requested services and reconstructing the request sequence, the model responds to requests in a more efficient and rapid fashion.

1. Introduction Challenges from software-intensive systems are their “fit for purpose”. A salient problem is how to realize dynamic adaptation and run-time evolution in software-intensive systems. There are a plethora of uncertain elements in the process of software evolution, including varying requirements, mutative runtime environments, diverse user preference, and different computing resources and so on. This trend ∗

enables the managed system to be promoted according to given business goals under certain contexts so as to take the system adaptive to dynamic factors underlying in software evolution. The most valuable resource will be the limited resource of human attention [1]. How to minimize the consumption of the special resource and respond to requests more efficiently is a challenge. In the complicated software architecture, it appears to approach the limit of human capability that we cope with the diversity of requested services; meanwhile, software systems become more and more various and the interaction among these systems become more frequent, which leads to the difficulty in predicting and designing the interaction between Components. However, these problems can only be solved at runtime. The characteristics of the large-scale software architecture have resulted in a recent drive to revisit the design of software architecture and challenges resulting from distributed computing. Autonomic computing [2] makes software-intensive systems monitor the activities of computing resource, then take an action to adjust themselves for the sake of meeting business goals with better performance at less cost. [3] summarizes the challenges introduced by autonomic systems. Particularly, most intelligent softwareintensive systems, for instance, embedded systems [4], treat runtime self-adaptation as an important attribute. Most existing methods are built upon the analysis of concepts of architecture and exploit some “craft” from the perspective of qualitative analysis. The challenge is how to reason about the runtime environment and running history of system more accurately. Quantitative analysis based on mathematic characteristic of the history of system behavior would be a better option. Hidden Markov Model (HMM) [5]

This work has been partially supported by the Fok Ying Tung Education Foundation (No.94030).

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

is one of statistical models which tries to characterize only the statistical properties of the signal. The underlying assumption of the statistical model is that the parameters of the stochastic process can be determined (estimated) in a precise, well-defined manner. HMM possess precise data structure and reliable computing performance. HMM has properties of self-learning, agile self-adaptation, acquiring enough knowledge by means of incessant training and identifying efficiently latter unknown states, furthermore, classifying them. Moreover, HMM is a stochastic process based on probability and the result of learning and diagnosis is more explicable than neutral networks. This paper addresses the situations of the evolution of software and focuses on dynamic selfadaptation at runtime using the idea of HMM. We classify the modes of requested services, analyze the statistical properties of requests, and then use an XML file describing the context at runtime. The model treats every Request Type as a state and the invocation number of Components as the observation sequence. Based on this analysis, we model this environment and schedule clients’ requests to respond to clients in a more efficient and rapid fashion. The remainder of this paper is organized as follows: Section 2 discusses contributions and shortcomings of other attempts on self-adaptation at runtime of software-intensive systems. We bring forward the modeling method of self-adaptation software implemented with HMM ideas in Section 3. In Section 4, we report on a case study of the self-adaptation ability of the model and Section 5 summarizes the ideas discussed throughout the paper.

2. Related Work To achieve runtime adaptation is not a simple issue, although some researches have been done recently. Temporal logic is introduced in order to specify the semantics of self-adaptation program [6], then prescribes three common used adaptive semantics. Meanwhile, it also introduces adaptation semantics graphs to visually represent the adaptation semantics. There are several researches’ attempts at reasoning about context: Poladian et al. [7] provide a shared architecture to automate configuration decision on the basis of task specification of users and abstract five basic concepts, i.e., utility space, capability space, resource space, user preference and application profiles. The utility is represented by preference function to maximize the matching between user requirements and the capability of environment. The reconfiguration is achieved by utilizing an algorithm. Gaia [8] allows applications and services to reason

about uncertainty using mechanisms respectively such as probabilistic logic, fuzzy logic, and Bayesian networks according to different situations. The context-sensitive middleware-MobiPADS is designed to support context-aware processing by providing an executing platform to enable active service deployment and reconfiguration of the service composition in response to environments of varying contexts [9]. Seceleanu et al. employ the state-based formalism, called action systems, to define and refine selfadaptation [10]. The action systems can deal with dynamic user requirements and possible fault situations. However, the technique does not permit user to model the dynamic behavior of a certain system, accordingly, the concrete parameters toward a certain application are fixed, that is, the method simulates dynamic interrelation between Components via a static architecture. A new adaptation language is put forward in [11], which builds its formalism on utility theory, and extracts three concepts as the basis of elementary ontology, which are operator, tactic and strategy. Combing the ontology with strategy selection, tactic matching, adaptation objectives, tactic metainformation and failure handling, the language is capable of disposing of dynamic runtime environments.

3. Self-adaptation Model In this section, we present a mathematical formulation of the model. Firstly, we define Component and Request Type. Secondly, we assign mathematical expressions to the corresponding basic elements of HMM to construct the self-adaptation model based on HMM.

3.1. Relevant Definitions To facilitate the formal description, we extend the definition of Component in [12], and define the notion of Request Type as follows: Definition 1. Component represents basic computing elements, data store and their composition, performing accurate function in clearly defined architecture environments. Besides the indispensable performing functions, Component is composed of a group of relevant context information, such as whether the Component is running. Definition 2. Request Type classifies clients’ requests according to different resource type consumed by these requests, such as Request Type based on Text, Audio or Video.

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

Conforming with ACME language [12], which is an ADL (Architecture Description Language) to describe software architecture, we fuse the two definitions into a comprehensive description framework.

3.2. Building Self-adaptation Model Based on HMM We denote the time instants associated with request changes as t = 1, 2," , and we denote the actual request at time t as rt , that is, r1 , r2 ," , rt . These requests will be responded in servers where Components serve as service providers executing corresponding services. We assume that the total number of requested services is N, and for each request, we observe the invocation number of every Componenti. We denote the observation sequence of the model as ObservationSeq. According to the law of stochastic process, we have the observation value probability distribution in state j , i.e., b j ( k ) . Request Type R1 , R2 , " , Rt constitutes the state space of the HMM, while every request may acquire associated service from Componenti. We are challenged by how to deploy reasonable schedule of the request sequence to respond to requests more quickly. We construct the HMM after summing up the invocation number of Componenti as follows: 1) R1 , R2 , " , Rt is considered as states, we calculate the transition probability using the table of state transition (illustrated in subsection 4.1). The transition probability from state i at time ti to state j at time

ti +1 can be computed following the formula (1). aij = where

ξ (i, j )

ξ (i , j ) γi

(1)

is the number of transitions from

state Si to state S j , and

γi

is the number of times in

state Si . The state space building transition matrix is determined by Request Type. Reconstructing HMM demands expense, consequently, we should construct a timer treated as the trigger of rebuilding the transition matrix. However, the selection of time span of reconstruction is a complicated issue beyond the scope of this paper. 2) The observation sequence results from the counter of Components. This is a counting process in which the interarrival time of successive arrivals of requested

service follows an exponential distribution with parameter λ . Therefore, the emission probability of the model follows a Poisson process with parameter λ , and can be described as formula (2).

1 − λ t (λ t ) n ⋅e , N n! n = 0,1, 2," ,1 ≤ j ≤ N ,1 ≤ k ≤ M

b j ( k ) = P[vk at t | qt = S j ] =

(2)

where n is the total invocation number of a Component (the same meaning as k ) , λ is the invocation frequency of the Component, i.e., the average invocation number in per unit time, N represents the total number of these requests, M is the number of request types, qt means the current state is

S j , and vk is the observation value at time t . 3) The Server may select arbitrarily a certain request ri to be served, i.e., prior probabilities is the same for each state, therefore, initial distribution is described as follows

1 1 1 π =  , ," ,  N N N   N

Given the above HMM, the problem of concern is how to arrange an optimal request sequence r1 , r2 ," , ri according to the respective invocation number of Componenti. According to [5], the problem in question is relevant to the problem 2 of three basic problems of concern, i.e., given the observation sequence O = O1 , O2 , " OT , and a model

λ = (π , A, B) (here A = {aij }

and B = {b j ( k )} ),

how do we choose a corresponding state sequence Q = q1 , q2 ," , qT which is optimal in some meaningful sense (that is, best “explains” the observations)? Unfortunately, there is a variety of meaning of the term “optimal” and the conclusion is distinct under diverse circumstances. The “optimal” of the current problem refers to schedule efficiently requested services so as to respond to users’ requests more rapidly.

4. Experiment Results In this section, we report on a case study of the selfadaptation ability of the model using taobao.com example system and evaluate our approach in terms of performance. The performance has been measured

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

based on our current implementation: the Component is programmed using Java, while the context information has been encoded using XML. Tests were performed on IBM Thinkpad laptop equipped with devices as shown in Table 1.

1  6 3  4  1  4

Table 1. Test bed for experiment CPU Memory Network OS Dev_Language Internet Browser

1

2

0 1

2

1  3 1  4 1  4

4.2. Experiment Results

Intel Pentium M processor rated at 1.0GHz 512 MB RAM LAN 10/100MB Microsoft Windows XP professional Java with JDK1.4 Internet Explorer 6.0

Considering the current request updated the “referenceCount” of Componentt, Componenta and Componentv respectively, we have the updated value of 215, 89 and 671 respectively. Suppose the arrival of requests is equiprobable, we have

1 − λt (λ t )n ⋅e , n = 0,1, 2," 15 n! where j ∈ {t , a, v} , t , a, v represents three b j (k ) =

We believe this configuration is appropriate to estimate the performance of the model, as it does not outperform the currently available devices. In the remainder of this section, we start with three simple Request Types, i.e., requests based on text, audio and video, respectively. In this simple scenario, we illustrate the overhead introduced by the model while varying the number of request types involved in a service request sequence. We then compare the performance cost of our approach with the one of the approach without the model.

Components: Componentt, Componenta and Componentv respectively. We find the most optimal request sequence applying the Viterbi algorithm. The overhead (in milliseconds) is 1359, and here, overhead is measured by response time. Response time refers to the time span from the point when request is sent until the result is returned and displayed. Similarly, we use 3, 5, 7, 9, 11, 13 requests to the server, respectively, then get the response time 613, 678, 802, 1028, 1034 and 1182 (in milliseconds), respectively. In this case, there is only one user to request services. To illustrate the improvement of the approach, we compare the response time in two situations where three Request Types are set, with the model and without the model, respectively, as shown in Figure 1. The response time (represented by Y axis) increases with total number of requests (represented by X axis). From the variation of the response time in the two cases, we can conclude that our approach improve the performance with increase of the total number of requested services, although there is more overhead the approach introduces at first. Especially, if there are more requested services, the approach is of higher

4.1. Three Request Types The case to be illustrated bases on the website named taobao.com affiliated to alibaba.com, which serves as an agent of auction or transaction. Taobao is visited more than a hundred million times everyday and ever experienced fifteen million visited times for a single hour, which reaches the peak of visit. For simplicity of discussion without losing generality, we have assumed that the Web application server of Taobao is only required to handle three different Request Types, i.e., text, audio and video, represented by Rt , Ra and Rv respectively. In the simple scenario, the request sequence is shown in Table 2.

Table 2. State transition table of request sequence Time

t1

t2

t3

t4

t5

t6

t7

t8

t9

t10

t11

t12

t13

t14

t15

Request type State

Rt

Rv

Ra

Rt

Ra

Rt

Rv

Rv

Rt

Rt

Ra

Rv

Ra

Rt

Ra

1

3

2

1

2

1

3

3

1

1

2

3

2

1

2

According to formula (1), we can obtain the following transition matrix

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

Performance Compare 2200

With the model Without the model

2000

Response Time(ms.)

1800

in Figure 2. With the increment of the request number, average transaction response time rises. However, the response time increases tinily from 45 to 65 and 105 users, which shows our approach scales to comparative large number of requests.

1600

5. Conclusions and Future Work

1400 1200 1000 800 600 400

2

4

6 8 10 12 Total Number of Requests

14

16

Figure 1. The improvement of performance using the approach

performance. To further verify the model performs well reliably, we conduct more experiments under different network environment. We utilize Mercury LoadRunner, which is the industry-standard load testing solution for predicting system behavior and performance, to validate the reliable performance of the model. In the following five experiments, there are 5, 15, 45, 65 and 105 users to request services to the server respectively. And the model serves 13 requests of each user. The results are illustrated in Figure 2. When time elapses (represented by X axis), the requests can be served and the average response time varies (represent by Y axis). Note that the response time without the model refers to the overhead of 15 users. From the results, we can conclude that the model performs quite well if there is small number of users, such as 5 or 15 users as shown

To accurately model the behavior of users’ requests, only qualitative analysis is not enough to improve the performance of software-intensive systems. By employing Hidden Markov Model, we have attempted to construct an original runtime self-adaptation model in software-intensive systems. Together with the concepts of Component and Request Type, the developed model has the potential adaptation to the varying contexts at runtime and the flexibility to adjust user request sequence. Using Viterbi algorithm to find the optimal request sequence based on a segment of information to be extracted from the runtime context, we can effectively choose a rational request to be served one after another. We believe that extracted context is somewhat simple and hence not enough to express the real runtime environment, so that more information should be considered in the future work. There may be more sophisticated mechanisms to acquire rich information for providing more detailed input elements for the adaptation model. We also have not looked at when the self-adaptation model rebuilds the transition matrix as described in subsection 3.2. Computing the optimal request sequence is a time-consuming task, hence, it is important to choose an appropriate instant time to rearrange the request order. Obviously, on the one hand, the adaptive model should not frequently invoke

Average Response Time (seconds)

Average Transaction Response Time 5_Users 15_Users 45_Users 65_Users 105_Users Without the model

50 45 40 35 30 25 20 15 10 5 00:30 00:45 01:00 01:15 01:30 01:45 02:00 02:15 02:30 02:45 Elapsed Scenario Time (mm:ss)

Figure 2. More users request to services in five different cases

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

the algorithm; on the other hand, the time span between both invocations should be not too long because the execution of the algorithm will be a timeconsuming process. The reason is that the algorithm requires more recurrences when more requests are to be served under this circumstance. It is the most important in our future work that we need to employ the significant nature of HMM to foster the potential of self-learning of the model to adapt to the unexpected future situation. Finally, we need to carry out more performance studies which need to ensure that the model does scale to large environments such as there are millions of Components in the system, and this remains a wide open research issue.

6. References [1] D. Garlan, D. P. Siewiorek, A. Smailagic, and P. Steenkiste, "Project Aura: toward distraction-free pervasive computing", IEEE Pervasive Computing, vol. 1 (2002),pp.22–31. [2] J. O. Kephart and D. M. Chess, "The vision of autonomic computing", IEEE Computer, vol. 36 (2003),pp.41–50. [3] J. O. Kephart, "Research challenges of autonomic computing", Proceedings of the 27th International Conference on Software Engineering, (2005),pp.15-22. [4] L. Chung and N. Subramanian, "Adaptable architecture generation for embedded systems", Journal of Systems and Software, vol. 71 (2004),pp.271-295.

[5] L. R. Rabiner, "Tutorial on hidden Markov models and selected applications in speech recognition", Proceedings of the IEEE, vol. 77 (1989),pp.257-286. [6] J. Zhang and B. H. C. Cheng, "Using temporal logic to specify adaptive program semantics", Journal of Systems and Software, vol. 79 (2006),pp.1361-1369. [7] V. Poladian, J. P. Sousa, D. Garlan, and M. Shaw, " Dynamic configuration of resource-a ware services", Proceedings 26th International Conference on Software Engineering, (2004),pp.604-613. [8] A. Ranganathan, J. Al-Muhtadi, and R. H. Campbell, " Reasoning about uncertain contexts in pervasive computing environments", IEEE Pervasive Computing, vol. 3 (2004),pp.62-70. [9] A. T. S. Chan and C. Siu-Nam: MobiPADS, "a reflective middleware for context-aware mobile computing", Software Engineering, IEEE Transactions on, vol. 29 (2003),pp.1072-1085. [10] T. Seceleanu and D. Garlan, "Developing adaptive systems with synchronized architectures", Journal of Systems and Software, vol. 79 (2006),pp.1514-1526. [11] C. Shang-Wen, D. Garlan, and B. Schmerl, "Architecture-based Self-Adaptation in the Presence of Multiple Objectives", Proceedings of the ICSE 2006 Workshop on Software Engineering for Adaptive and SelfManaging Systems (SEAMS) (2006).

[12] D. Garlan, R. Monroe, and D. Wile, "ACME:An Architecture Description Interchange Language", Proceedings of CASCON'97, (1997).

31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007

Toward Runtime Self-adaptation Method in Software ... - IEEE Xplore

exploit some “craft” from the perspective of qualitative analysis. However, these methods are often incapable of reasoning about the history of requested services ...

268KB Sizes 0 Downloads 166 Views

Recommend Documents

Toward “Pseudo-Haptic Avatars”: Modifying the Visual ... - IEEE Xplore
In our experimental setup, participants could watch their self-avatar in a virtual environment in mirror mode while performing a weight lifting task. Users could ...

Optimized Software Implementation of a Full-Rate IEEE ... - IEEE Xplore
Hardware implementations are often used to meet the high-data- rate requirements of 802.11a standard. Although software based solutions are more attractive ...

IEEE Photonics Technology - IEEE Xplore
Abstract—Due to the high beam divergence of standard laser diodes (LDs), these are not suitable for wavelength-selective feed- back without extra optical ...

wright layout - IEEE Xplore
tive specifications for voice over asynchronous transfer mode (VoATM) [2], voice over IP. (VoIP), and voice over frame relay (VoFR) [3]. Much has been written ...

Device Ensembles - IEEE Xplore
Dec 2, 2004 - time, the computer and consumer electronics indus- tries are defining ... tered on data synchronization between desktops and personal digital ...

wright layout - IEEE Xplore
ACCEPTED FROM OPEN CALL. INTRODUCTION. Two trends motivate this article: first, the growth of telecommunications industry interest in the implementation ...

A Computation Control Motion Estimation Method for ... - IEEE Xplore
Nov 5, 2010 - tion estimation (ME) adaptively under different computation or ... proposed method performs ME in a one-pass flow. Experimental.

A Tlreshold Selection Method from Gray-Level Histograms - IEEE Xplore
the difference histogram method [3], which selects the threshold at the gray level ... could be the right way of deriving an optimal thresholding method to establish an .... We shall call it the effective range of the gray-level histogram. From the .

Evolutionary Computation, IEEE Transactions on - IEEE Xplore
search strategy to a great number of habitats and prey distributions. We propose to synthesize a similar search strategy for the massively multimodal problems of ...

I iJl! - IEEE Xplore
Email: [email protected]. Abstract: A ... consumptions are 8.3mA and 1.lmA for WCDMA mode .... 8.3mA from a 1.5V supply under WCDMA mode and.

Gigabit DSL - IEEE Xplore
(DSL) technology based on MIMO transmission methods finds that symmetric data rates of more than 1 Gbps are achievable over four twisted pairs (category 3) ...

NEXT: In-Network Nonconvex Optimization - IEEE Xplore
Abstract—We study nonconvex distributed optimization in multiagent networks with time-varying (nonsymmetric) connec- tivity. We introduce the first algorithmic ...

IEEE CIS Social Media - IEEE Xplore
Feb 2, 2012 - interact (e.g., talk with microphones/ headsets, listen to presentations, ask questions, etc.) with other avatars virtu- ally located in the same ...

Grammatical evolution - Evolutionary Computation, IEEE ... - IEEE Xplore
definition are used in a genotype-to-phenotype mapping process to a program. ... evolutionary process on the actual programs, but rather on vari- able-length ...

SITAR - IEEE Xplore
SITAR: A Scalable Intrusion-Tolerant Architecture for Distributed Services. ∗. Feiyi Wang, Frank Jou. Advanced Network Research Group. MCNC. Research Triangle Park, NC. Email: {fwang2,jou}@mcnc.org. Fengmin Gong. Intrusion Detection Technology Divi

striegel layout - IEEE Xplore
tant events can occur: group dynamics, network dynamics ... network topology due to link/node failures/addi- ... article we examine various issues and solutions.

Digital Fabrication - IEEE Xplore
we use on a daily basis are created by professional design- ers, mass-produced at factories, and then transported, through a complex distribution network, to ...

DISTRIBUTED RESOURCE ALLOCATION IN ... - IEEE Xplore
a social forage swarming model, where the search for the most appropriate .... swarm under a general condition satisfied by almost any realistic profile. To this ...

Iv~~~~~~~~W - IEEE Xplore
P. Arena, L. Fortuna, G. Vagliasindi. DIEES - Dipartimento di Ingegneria Elettrica, Elettronica e dei Sistemi. Facolta di Ingegneria - Universita degli Studi di Catania. Viale A. Doria, 6. 95125 Catania, Italy [email protected]. ABSTRACT. The no

Device Ensembles - IEEE Xplore
Dec 2, 2004 - Device. Ensembles. Notebook computers, cell phones, PDAs, digital cameras, music players, handheld games, set-top boxes, camcorders, and.