software engineering lab. 석사 1 기 허 석 “ runtime software architecture based software...

26
Software Engineering Software Engineering Lab. Lab. 석석 석석 1 석 석 석 석 석 석 Runtime Software Architecture Based Software Online EvolutionQianxiang Wang, Gang Huang, Junrong Shen, Hong Mei, Fuqing Yang Proceedings of the 27 th Annual International Computer Software and Applications Conferenc e(COMPSAC’03) & Self-adaptive Software : Cybernetic Perspective and an Applicat ion Server Supported FrameworkJunrong SHEN, Qianxiang WANG, Hong MEI Proceedings of the 28 th Annual International Computer Software and Application Conference (COMPSAC’04) 11 11 18 18

Upload: jayson-horn

Post on 05-Jan-2016

229 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

Software Engineering Lab.Software Engineering Lab.

석사 석사 11 기 허 석기 허 석

“Runtime Software Architecture Based Software Online Evolution”

Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei, Fuqing YangProceedings of the 27th Annual International Computer Software and Applications Conference(COMPSAC’03)

&

“Self-adaptive Software : Cybernetic Perspective and an Application Server Supported Framework”

Junrong SHEN, Qianxiang WANG, Hong MEIProceedings of the 28th Annual International Computer Software and Application Conference (COMPSAC’04)

1111 월 월 1818일일

Page 2: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 2 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Content

Introduction Types of Changes Cybernetic Perspective Approach Overview

What is RSA What’s inside RSA Operations on RSA

Detailed Approach The Structure of AS Retrieval of RSA Manipulation of RSA

Experiment and Visual Tool Conclusion and Future Work

Page 3: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 3 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Introduction

Problems ? Internet, wireless network, web services, pervasive computing, grid

computing, and so on and so forth, all of these concepts and technologies have made runtime environment of software systems much more open and changeful

Software systems are becoming larger, more complex, and more rigid

-> more difficult to control, maintain, and evolve than ever before

Solution ? Effective approaches should be developed to help to cope with

changeability of software environment

Page 4: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 4 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Introduction

SA (Software Architecture) ? SA is defined as the organizational structure of a software system including

components, connections, constraints, and rationale

SA not only guides the development of software as a blueprint, but also plays an important role in at least six aspects of software development: understanding, reuse, construction, evolution, analysis, and management

SA can exist in different phases of the whole software lifecycle RSA (Runtime Software Architecture) can help capture the system’s

runtime status and feed back to make the running system more adaptive and controllable through certain mechanism

DSA (Design Software Architecture)

Page 5: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 5 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Types of Changes

Environment changes that have impact to software ? Changes on space dimension

This focuses on variants between different software products, which are developed for different clients

Changes on time dimension This focuses on variants that same software must adapt with the time go

ahead

Page 6: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 6 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Types of Changes

Classifies of Software Environment Changes

Ref. Runtime Software Architecture Based Software Online Evolution

Customer Requirement Changing Process change, i.e. adjusting of process flow, process unit deployment Function changing, i.e. function adding, removing, altering, correcting Constraints changing, i.e. security, reliability, UI, consistency,

performance, adaptive data

Page 7: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 7 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Types of Changes

Runtime Platform Changing Changing of operating system, which may includes hardware changing Changing of DBMS Change of middleware Changing of resource, such as hardware increase, failure

Interactive Context Changing Service-specific context, i.e. service related data,

communication bandwidth, physical location, number of connected clients, communication cost

Client-specific context, i.e. communication protocol, role, transaction, reply time

Page 8: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 8 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Cybernetic Perspective

The similarity between software self-adaptation technologies and control theory ? It implies that the self-adaptive software should have a “sensor-evaluate-adjust” executi

ng loop, just like the feedback control The adaptation model could have some adjustable parameters and a mechanism to adj

ust them, which has adaptive controller as its counterpart in adaptive control [2].

Control system ? A control system comprises at least two components: controlled object and controller.

The controller changes the controlled object’s behaviors by delivering control signals (called control inputs) which force the controlled object to achieve a desired goal (called set point).

[2] Karl Johan Astrom, Bjorn Wittenmark, Adaptive Control (2nd edition), Addison-Wesley publishing company, 1995.

Page 9: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 9 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Cybernetic Perspective

Three kinds of control ? Open-loop control generates control inputs offline without feedback from

the controlled object. Feedback control has a fixed control strategy and generates control

inputs from both environment and controlled object’s feedback. Adaptive control is an advanced form of feedback control, which not only

adjusts the controlled object, but also updates the controller by changing its adjustable parameters.

Terms of control theory & self-adaptation technologiesRef. Cybernetic Perspective and an Application Server Supported Framework

Page 10: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 10 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Approach Overview – What is RSA

Three fundamental issues on RSA ?1. The information encapsulated in RSA is retrieved from some part of the

states of the runtime system

2. RSA is not only detected from the running system but also derived from the design and implementation information of the application, especially the SA in design phase (DSA)

3. The introduction of RSA is not only employed to model the running application system, we should use RSA to help manage and evolve the running system as well

Ref. Runtime Software Architecture Based Software Online Evolution

Page 11: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 11 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Approach Overview – What is RSA

On the basis of such analysis on RSA, our approach of software online evolution should cope with 3 problems ? Incarnation of RSA

We encapsulate architectural information in a set of objects and investigate operations on this information

Evolution implementation Based on RSA, our evolution process contains following step : RSA retrieval,

RSA modification and reconfiguration, etc

Supporting Infrastructure Most RSA-based evolution and adaptation approaches should only be

applied into proprietary systems

Page 12: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 12 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Approach Overview – What’s inside RSA

The incarnation of RSA includes the following entities Component

The Player aspect defines interfaces that incorporate the type of the player (provide or request) and several method specifications, i.e., Method

The Attribute aspect designates the attributes the component will use in the interaction with others

The semantic aspects use formal methods to model, or, at least, use natural languages to describe the behaviors and features of the elements

Connections A connection describes the relationship of two components, such as the

communication style (by Local? By Procedure Call? Or by message Transfer?), the communication protocol (IIOP? JRMP? SOAP?), and other attributes of connections (using SSL)?

Constraints The constraints describe additional information of the component, such

as variety scope of : component attributes, security and transaction attributes of component interface’s operation, throughout limit, client connection number, etc

Page 13: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 13 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Approach Overview – Operations on RSA

According to the characteristics of the encapsulated data, the operations provided by RSA ? Access to data

All of the data encapsulated in RSA can be accessed through the operations named as “get<Data>”, e.g.

Modification of the data without changing the state of the runtime system Some information in RSA is derived from DSA to keep consistency and

cannot be retrieved from the runtime system

Modification of the data that leads to changes of the state of the runtime system Most of the data encapsulated in RSA is causally connected with the state

and behavior of the runtime systems

Page 14: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 14 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach

Background of PKUAS ? It is usually not difficult to identify the causality and to establish mathematical

model between control inputs and controlled variables from the structure of the system and physical principles.

But software systems running in the changing environment are much more complicated and dynamic.

So the causality and adaptation model cannot be easily recognized. Therefore, we believe that a well-formed representation of the overall system

is needed for system comprehension and adaptation strategy generation. Lastly, We should also consider the implementation alternatives of the

adaptation infrastructure: as an independent subsystem or a common service provided by the underlying platform

The RSA consists of components, connections and constraints of software, so the retrieval and manipulation of RSA also have 3 correspondent part

And both of them are implemented based on the reflective ability of PKUAS

Page 15: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 15 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – The Structure of AS

The structure of PKUAS ? (Runtime Software Architecture Based Software Online Evolution)

Application One application usually composes of multiple modules, such as

procedures, classes, or components Modules interact with each other, by way of method invocation or message

interchanging A component is an independent module that undertakes some specific

functions in software systems Component implementation is the code that implements the functions of

a component Component specification describes how to assemble, use, and manage

the component The application that runs on an application server can contain multiple

components

Page 16: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 16 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – The Structure of AS

Component Container Component container is the main mechanism in an application server that

supports component technology Container gives component independent running environment, which makes

development and management of components more feasible and convenient As one middle layer located between component and component’s client,

container is responsible for the connection between component and client, life cycle management of components, coordination of transaction for components, maintenance of component persistency, and identification authentication of clients, etc., while client is unaware of the existence of containers.

Common service Belonging to the system level, common services are used to support common

features of different applications For example, communication service is responsible for locating the server,

transaction service is responsible for assuring system’s consistence, and security service is responsible for authenticating the client and controlling the access to server, etc

Page 17: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 17 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – The Structure of AS

The structure of PKUAS ? (Cybernetic Perspective and an Application Server Supported Framework)

A container is the runtime space for components (i.e. Enterprise JavaBean, EJB), managing their lifecycle and runtime contexts. The container forms the environment and executes adaptation operations for EJBs.

Common Services include J2EE standard common services (e.g. naming, communication, security and transaction) and PKUAS-specific customized services including adaptation service and other domain-specific services. They are implemented with interceptor mechanism.

Micro kernel provides a registry and invocation framework for containers, common services and other management functions. More information of the structure of PKUAS is discussed in [7, 8]

[7]Qianxiang Wang, Gang Huang,Junrong Shen,Hong Mei,Fuqing Yang: Runtime software architecture based software online evolution, COMPSAC 2003 , Nov. 3-6,2003, pp230-235.

[8] Qiangxiang Wang, Feng Chen, Hong Mei, Fuqing Yang. Using Application Server To Support Online Evolution. ICSM2002, 3-6 October 2002, Montreal, Canada.

Page 18: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 18 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – The Structure of AS

The Structure of PKUAS

Ref. Cybernetic Perspective and an Application Server Supported Framework

The Role of PKUAS ? PKUAS provides some common adaptation operations such as selecting

from different component implementations, updating a component online, evaluating current system’s status, adjusting some variables and etc

Page 19: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 19 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Retrieval of RSA

The retrieval of RSA is performed during following activities : application deployment, application undeployment and application re-deployment, and the reconfiguration of services

Such strategy can minimize the effect of representation of RSA on the system performance

Page 20: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 20 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Retrieval of RSA

Retrieving Components A J2EE application is packaged and deployed as an archive with suffix of “.war”, “.ear” o

r “.jar” Such archives typically contain interfaces and implementations of EJBs, deployment de

scriptors of EJBs and the application The data encapsulated in Components can be retrieved from the deployment package,

which are held and operated by the EJB containers

Ref. Runtime Software Architecture Based Software Online Evolution

Page 21: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 21 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Retrieval of RSA

Retrieving Connections Most connection information can be retrieved from deployment descriptors of the applic

ation, which declared components and resources that are required by component There are three typical communication protocols for EJBs, including RMI-IIOP (Remote

Method Invocation – Internet Inter-ORB Protocol), RMI-JRMP (Jave Remote Method Protocol) and EJBLocal

Retrieving Constraints Most constraint information can be retrieved from deployment descriptors of EJB, by se

ction of “assembly-descriptor”, which usually includes information of “method permission”, or “container-transaction”

Page 22: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 22 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Manipulation of RSA

Manipulating Components Component manipulation includes following actions: add or remove component, change

component implementation, change constraints of components, etc

In PKUAS, The instance manager is responsible for the lifecycle management of EJBs, such as cre

ating, releasing, passivating and activating the instances The context manager holds all of the data related to EJBs, including the states derived fr

om the deployment package and runtime context

Page 23: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 23 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Manipulation of RSA

Manipulating Connections PKUAS interoperability framework separates the interoperability aspect from the contain

er in order to enable EJBs to interoperate with other components through multiple protocols, such as IIOP, JRMP and SOAP

The stub and skeleton are responsible for the transformation between the invocations of RMI and the messages of the underlying interoperability protocol

PKUAS naming service can publish and retrieve different interoperability addresses with the integration of the naming services specific to the interoperability protocols

Ref. Cybernetic Perspective and an Application Server Supported Framework

Page 24: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 24 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Detailed Approach – Manipulation of RSA

Manipulating Constraints In order to add or remove functions other than the standard functions defined in [4] of t

he EJB container, we employ the design pattern of interceptor to dynamically insert extra functions before and after the invocation of the implementation of EJB

Typically, the services used by the container should have corresponding interceptors, such as the security interceptor, the log interceptor and the transaction interceptor

Thus, to modify the value of the elements in component that relate to the usage of the services will enable PKUAS to add, remove or update the corresponding interceptors

[4] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, “Design Patterns Elements of Reusable Object-Oriented Software”, Addison Wesley, 1995.

Page 25: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 25 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Experiment and Visual Tool

eShop RSA shown in RSAToolRef. Runtime Software Architecture Based Software Online Evolution

Page 26: Software Engineering Lab. 석사 1 기 허 석 “ Runtime Software Architecture Based Software Online Evolution ” Qianxiang Wang, Gang Huang, Junrong Shen, Hong Mei,

< 26 / 26>

Runtime Software Architecture Based Software Online Evolution & Cybernetic Perspective and an Application Server Supported

Framework – – 석사 석사 11 기 허 석기 허 석

SungKyunKwan University

Software Engineering Lab.

Conclusion and Future Work

This paper addresses the RSA-based approach for software online adaptation and evolution, especially on three fundamental issues on our approach Incarnating RSA as a runtime entity Retrieving RSA from the runtime system Enforcing the manipulation of RSA that may change the state of the runtime system

We have already established a J2EE application server (PKUAS) and made it support RSA retrieval and reflection

Furthermore, to make our approach more convenient to use, we have developed some visual tools, such as application deployment & management tool, RSATool and etc