62
CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Distributed Component Based Systems Systems A. Paul Heely Jr. A. Paul Heely Jr. Kun Lu Kun Lu Ting Zhou Ting Zhou

CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Page 1: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.1

Distributed Component Based SystemsDistributed Component Based Systems

A. Paul Heely Jr.A. Paul Heely Jr.Kun LuKun Lu

Ting ZhouTing Zhou

Page 2: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.2

What are components?What are components?

Units of self-contained code (Java beans, widgets, Units of self-contained code (Java beans, widgets, agents)agents)

Provide a published interface.Provide a published interface. Public methods Return types

Provide “guaranteed” behavior.Provide “guaranteed” behavior. Component provides a certain service

Page 3: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.3

Why are components becoming popular?Why are components becoming popular?

Reduce development time.Reduce development time. Developers buy pre-built components Domain specific components built by domain

experts. No need to learn a new domain for a single

component. Application builders glue together individual Application builders glue together individual

componentscomponents

Page 4: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.4

Current Component Based DesignsCurrent Component Based Designs

Component FrameworksComponent Frameworks Aglets

COTS ComponentsCOTS Components Development Issues Pros and Cons

Testing & Validation of Mobile AgentsTesting & Validation of Mobile Agents Ensuring agent based systems operate correctly

Page 5: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.5

What is an Agent?What is an Agent?

Entity acting autonomouslyEntity acting autonomously Operates under it’s own controlOperates under it’s own control Usually designed to solve a particular problemUsually designed to solve a particular problem Interacts with rest of the world by sending and Interacts with rest of the world by sending and

receiving messagesreceiving messages

Page 6: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.6

Testing & Validation IssuesTesting & Validation Issues

Agents do not fit into existing testing & validation Agents do not fit into existing testing & validation methodsmethods

Identification of undesired behavior between Identification of undesired behavior between agentsagents

MobilityMobility Agent must be validated on all target platforms,

even if agent is written in Java Messages sent between agents could be lost Agents being transmitted across the network

could be lost

Page 7: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.7

Testing & Validation MethodsTesting & Validation Methods

StaticStatic Analyze the design specification or source code

itself Trace flow of control trough an agent Trace flow of control between agents

DynamicDynamic Operates on a running piece of code Pre-determined test cases Run-time verification

Page 8: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.8

GoalsGoals

ProblemProblem The fact that an individual agent of component

works correctly in it’s own isolated test environment leads to no guarantee that a group of entities interacting together is going to operate properly.

SolutionsSolutions Extend existing testing and validation methods

to work with agents Method/Message Path Runtime Validation

Page 9: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.9

Method/Message Path (MM-Path)Method/Message Path (MM-Path)

Path starts with a method callPath starts with a method call Ends when a method is called that does issue any Ends when a method is called that does issue any

method calls of its ownmethod calls of its own Paths consist of linked method-message pairs Paths consist of linked method-message pairs

inside an object or across a network of objectsinside an object or across a network of objects Paths can interleave and branch off creating new Paths can interleave and branch off creating new

pathspaths

Page 10: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.10

Example MM-PathExample MM-Path

meth1

meth3

meth2

meth2

meth1

meth2

meth3

meth1

Ainput event

Aoutput event

1

Binput event

Boutput event2

MM-PathMessage

Page 11: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.11

Usefulness of MM-PathsUsefulness of MM-Paths

Identify undesired behaviorIdentify undesired behavior Chain reactions where an input event generates

the expected output event and generates and unexpected output event

Page 12: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.12

MM-Path Identifying Undesired BehaviorMM-Path Identifying Undesired Behavior

meth1

meth3

meth2

meth2

meth1

meth2

meth3

meth1

Ainput event

Aoutput event

1

Binput event

Boutput event2

MM-PathMessage

Undesiredoutput event

Page 13: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.13

Problems With MM-PathsProblems With MM-Paths

How to model agent systems so MM-Path analysis How to model agent systems so MM-Path analysis can be done?can be done? MM-Paths and UML collaboration diagrams

similar OMG Agent Working Group currently looking

at ways to model agent systems Specifically interactions between agents

Page 14: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.14

Runtime ValidationRuntime Validation

What does runtime validation do?What does runtime validation do? Checks behavior of entity at runtime Catches implementation errors that static

testing miss Catches faults as a result of the failure of

another component. Why is this necessary?Why is this necessary?

Autonomous agents are responsible for their own behavior

Wide range of sources No guarantee that other agents work correctly

Page 15: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.15

Specifying BehaviorSpecifying Behavior

Specification language designed for non-Specification language designed for non-programmersprogrammers

Runtime behavior specified at design timeRuntime behavior specified at design time Valid state transitions Timing between transitions

Example of this is TSpecExample of this is TSpec

Page 16: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.16

Stop Light State DiagramStop Light State Diagram

red

yellow

green

duration(15,60) duration(2,6)

duration(10,70)

Page 17: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.17

Stop Light SpecificationStop Light Specification

statemachine StopLight (color) {states {red, yellow, green}

transitions {

red -> green;

green -> yellow;

yellow -> red; }

limits {

duration (red, 15, 60);

duration (yellow, 2, 6);

duration (green, 10, 70); }

}

Page 18: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.18

Stop Light SpecificationStop Light Specification

TSpec compiled into target system codeTSpec compiled into target system code Becomes an integral part of the runtime systemBecomes an integral part of the runtime system Specification can be easily changed without Specification can be easily changed without

effecting rest of systemeffecting rest of system Currently being used by NASA Ames Research Currently being used by NASA Ames Research

Center to validate autonomous flight control Center to validate autonomous flight control systemssystems Implemented in C++ using an observer pattern

Page 19: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.19

Problems With Runtime ValidationProblems With Runtime Validation

Many agent systems written in JavaMany agent systems written in Java What are the performance implications of

runtime validation Will the validation system have access to all

the agents data? C++ hacks allow access to any part of an object

Embedded validation increases an agents sizeEmbedded validation increases an agents size Will increased size adversely affect

transmission time?

Page 20: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.20

Developing Sophisticated Applications Developing Sophisticated Applications with Component-Based Frameworkwith Component-Based Framework

Kun Lu

For presentation in CSE300Instructor: Steve A. Demurjian

[email protected]://www.engr.uconn.edu/

~lukun(860) 486 - 2717

Page 21: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.21

MotivationMotivation

Force Reusing - build application-specific software Force Reusing - build application-specific software product by customizing frameworkproduct by customizing framework Forced to consider reuse

Framework is a good carrier of design patternFramework is a good carrier of design pattern Help to build robust software

Separate the development of software into two Separate the development of software into two relative independent cycles and reduce the maintain relative independent cycles and reduce the maintain efforteffort Possible to be developed by two group of

software engineer

Page 22: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.22

ComponentsComponents

Three classes of components Three classes of components Domain-independent

Libraries, utilities, etc. Most likely to be reused

Domain-specific Dedicated components Reused in software of the same domain

Application-Specific Uniqueness in some final product Unlikely to Be Reused

Page 23: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.23

Reuse through FrameworkReuse through Framework

Software products in a specific domain must have Software products in a specific domain must have commonnesscommonness

Build commonness into a platform - frameworkBuild commonness into a platform - framework The final software product is built by customizing The final software product is built by customizing

the frameworkthe framework Framework consists of domain-independent and Framework consists of domain-independent and

domain-specific componentsdomain-specific components

Page 24: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.24

Requirement of FrameworkRequirement of Framework

GenericGeneric Adopted in various situation

FlexibleFlexible Easy to customize

Page 25: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.25

Design PatternsDesign Patterns

An especially clever and insightful way of solving An especially clever and insightful way of solving a particular class of problemsa particular class of problems

Design patterns can be incorporated into the Design patterns can be incorporated into the frameworkframework

Reuse pattern through frameworkReuse pattern through framework

Page 26: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.26

Framework Development and Framework Development and MaintenanceMaintenance

Two way to start building framework:Two way to start building framework: Find commonness among various software

products and ‘frame’ those commonness - a passive way The commonness could be general class or design

pattern Anticipate reuse in advance and build

framework from beginning - an active way Some cost at beginning, but save in the long term

Page 27: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.27

Framework Development and Framework Development and Maintenance(Cont.)Maintenance(Cont.)

Two independent development and maintenance Two independent development and maintenance cyclescycles Framework development and maintenance Application development and maintenance

Two independent corresponding groups of software Two independent corresponding groups of software engineersengineers Framework software engineers

Only concern about the general component and patterns

Application software engineers Deal with the customizing, and adopt changes of

requirement of the user Those two groups many be of the sameThose two groups many be of the same

Page 28: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.28

Framework Development and Framework Development and Maintenance(Cont.)Maintenance(Cont.)

What does the independence mean?What does the independence mean? Framework software engineers provide application

software engineers with only the compiled components as well as interface and necessary document. No source code. Application software engineers can not modify the

framework source code directly(encapsulation) If framework is robust and there is bug in the final

product, it must be in the customizing work(isolation) Framework can be sold as an independent commercial

software without publishing its source code.(commercializable)

Application software engineers only write their own code to customize framework into final product

Page 29: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.29

Framework Development and Framework Development and Maintenance(Cont.)Maintenance(Cont.)

What is the benefit?What is the benefit? Isolate concerns

The application software engineers only has to concern about the changes of requirement by the user.

Isolate changes The changes usually be adopted within the

customizing work, no need to modify framework. break the job

Framework software engineers and application software engineers may be of different companies. Since customizing work cost less effort, user company may hire a small group of application software engineer. Easy to react to the change.

Page 30: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.30

Framework Development and Framework Development and Maintenance(Cont.)Maintenance(Cont.)

Signs of deficiency in frameoworkSigns of deficiency in frameowork Application software engineers feel awkward to

customize Unnecessary dependence between some

components Too specific interface

Application software engineers have to repeat something over and over Something general should be augmented into the

framework

Page 31: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.31

Framework Behind the Aglet SystemFramework Behind the Aglet System

Aglet system is a framework for mobile agentAglet system is a framework for mobile agent Include general class like aglet, message,

context, etc Generate our own mobile by customizing the Generate our own mobile by customizing the

default aglet,etcdefault aglet,etc Aglet system encapsulate the complex of mobile Aglet system encapsulate the complex of mobile

agentagent Serialize and deserialize when dispatch Multithread Message sending

Much easier to customizing than building from Much easier to customizing than building from scratchscratch

Page 32: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.32

Aglet - a Design PatternAglet - a Design Pattern

It is possible to write distributed computation from It is possible to write distributed computation from scratch with JAVA, but it is too complex, and easy scratch with JAVA, but it is too complex, and easy to go madto go mad

Aglet provides a rigorous basic element to Aglet provides a rigorous basic element to implement distributed computation softwareimplement distributed computation software

How comes the aglet?How comes the aglet? Try different way to implement distributed

computation software Find a rigorous pattern or component. Introduce new concept - aglet and implement it

with JAVA in aglet framework

Page 33: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.33

Problem with agletProblem with aglet

It is still a quite basic element or patternIt is still a quite basic element or pattern It is still easy to get out of control if used in a non-It is still easy to get out of control if used in a non-

regulated wayregulated way Violate the security rule Lost in the net

We have to find higher level of pattern to control We have to find higher level of pattern to control the aglet and implement it in the higher level of the aglet and implement it in the higher level of frameworkframework The aglet book mentions some design pattern

to control the aglet Higher level of pattern is quite domain-

oriented

Page 34: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.34

OO implementation StrategyOO implementation Strategy

OO provide us with enough ability to build generic OO provide us with enough ability to build generic and flexible frame workand flexible frame work

Customizing is a kind of change and we must Customizing is a kind of change and we must make it easy to adopt changemake it easy to adopt change

Two rules:Two rules: Separate the things that change from the thing

that stay the same Put the same things together to avoid

duplication PurposePurpose

easy to find where to change change will not propagate to far or repeat

Page 35: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.35

CompositoryCompository

Most encountered reuseMost encountered reuse Create object of existing Create object of existing AA class into a new class class into a new class BB AA Could be data member or in the method of Could be data member or in the method of BB We can build a compository hierarchy We can build a compository hierarchy Higher level of class reuse the lower level classHigher level of class reuse the lower level class ExampleExample

IRA is a data member of UA

Page 36: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.36

InheritanceInheritance

Cornerstones of OO methodCornerstones of OO method Superclass is reused in all its subclassSuperclass is reused in all its subclass Superclass is the common part of its subclassSuperclass is the common part of its subclass Do not have to be repeated in each subclassDo not have to be repeated in each subclass Example Example

Build our own aglet by subclass the default class

Page 37: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.37

PolymorphismPolymorphism

Based on inheritanceBased on inheritance Help to isolate changeHelp to isolate change

Subclass can be treated as its superclass(Upcast)

A subclass object hold by a superclass reference can be downcast to its real class

Dynamic bindingDynamic binding Subclass override superclass’s method At runtime, it is the method of the object’s real

class call

Page 38: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.38

Dynamic BindingDynamic Binding

AA

CourDBPerson person

person.getType( )

CourDBPerson person

person.getType( )Person

getType( )

PersongetType( )

Compile Compile CourseDBCourseDB

Page 39: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.39

Dynamic Binding(Cont.)Dynamic Binding(Cont.)

AA

CourDBPerson person

person.getType( )

CourDBPerson person

person.getType( )Person

getType( )

PersongetType( )

StudentgetType( )

StudentgetType( )

FacultygetType( )

FacultygetType( )

Compile Compile CourseDBCourseDB

RuntimeRuntime

Not CourseDB need not be recompileNot CourseDB need not be recompile

Page 40: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.40

Dynamic Binding(Cont.)Dynamic Binding(Cont.)

What does that mean?What does that mean? We can build framework with general classes and have them compiled We can build framework with general classes and have them compiled We customize the framework by subclass those general class and overriding method We customize the framework by subclass those general class and overriding method By polymorphism, at runtime, it is the overriding method of the subclass that are runBy polymorphism, at runtime, it is the overriding method of the subclass that are run We do not have to recompile those general class in the framework and we do not We do not have to recompile those general class in the framework and we do not

need the source code!need the source code! Framework software engineer can use something like final to avoid override method Framework software engineer can use something like final to avoid override method

which they do not expect application software engineers to overridewhich they do not expect application software engineers to override

Page 41: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.41

Dynamic Binding(Cont.)Dynamic Binding(Cont.)

In aglet, polymorphism is heavily exploitedIn aglet, polymorphism is heavily exploited Why you must use the prescribed interface?Why you must use the prescribed interface? Why at run time it is the your subclass with those Why at run time it is the your subclass with those

override methods are run even though you never override methods are run even though you never explicitly call them?explicitly call them?

The Aglet system build can not direct call your The Aglet system build can not direct call your customized methods because they do not know customized methods because they do not know themthem

Page 42: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.42

GenericGeneric

Note that application software engineers must use Note that application software engineers must use the prescribed interface.(Like a socket)the prescribed interface.(Like a socket)

The interface must be general enough to satisfy The interface must be general enough to satisfy various polymorphismvarious polymorphism

The key for generic interface is its argument type, The key for generic interface is its argument type, argument number and return typeargument number and return type

A ‘stone face’A ‘stone face’ real methodname(int)

Page 43: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.43

Generic(Cont.)Generic(Cont.)

The most general interface in JAVAThe most general interface in JAVA Object methodName(Object). Example:

Object handleMessage(Message) void onCreation(Object)

In Java, everything is subclass of Object class. In Java, everything is subclass of Object class. However, it is not true for C++. What could C++ However, it is not true for C++. What could C++ do?do?

Though C++ has template, it does not mean the Though C++ has template, it does not mean the generic ability of C++ is stronger than JAVAgeneric ability of C++ is stronger than JAVA

In fact, there is no need to have template in JavaIn fact, there is no need to have template in Java Template for C++ is only are remedy for genericTemplate for C++ is only are remedy for generic

Page 44: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.44

Maintaining COTS-Based SystemsMaintaining COTS-Based Systems

Ting Zhou†

Computer Science & Engineering DepartmentThe University of Connecticut

191 Auditorium Road, Box U-155Storrs, CT 06269-3155

[email protected]://www.engr.uconn.edu/

~zting(860) 486 - 0130

Page 45: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.45

COTS ComponentsCOTS Components

COTS Components COTS Components Commercial-Off-The-Shelf Components Contain Fixed Functionality New Trend in Software Commerce

Role of COTS ComponentsRole of COTS Components Make Development of New Software Systems

More Quickly and Cheaply With COTS Components, the Desired With COTS Components, the Desired

Functionality Can beFunctionality Can be Accessed Immediately Obtained at a Significantly Lower Price Developed by Someone Expert in That

Functionality

Page 46: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.46

Fundamental ChangesFundamental Changes

Fundamental Changes Occur in COTS-Based Fundamental Changes Occur in COTS-Based SystemSystem Source Code of COTS Components is Either

Partially or Completely Invisible System is Composed of Building Blocks that

May or May not Work Cooperatively Directly

Page 47: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.47

Fundamental Changes (Cont.)Fundamental Changes (Cont.)

This Shift from development to Composition This Shift from development to Composition CausesCauses Numerous Technical and Business Changes Profound Impact on All Lifecycle Activities

Specified Requirements Must be Sufficiently Flexible

What Level of Testing are Possible or Needed Must be Determined

Maintenance Changes in Fundamental Ways(in details later)

Page 48: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.48

Traditional MaintenanceTraditional Maintenance

Common Maintenance Processes Common Maintenance Processes Originated When Most Systems were

Comprised of Subroutines and Procedures Rely on Source Code Visibility

Typical Maintenance IncludesTypical Maintenance Includes Impact Analysis

Determines If and How Different System Parts Interact

Regression Testing Uses Test Code Inputs from Earlier Versions to

Ensure System Integrity after Maintenance

Page 49: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.49

New Issues in Maintaining COTS-Based New Issues in Maintaining COTS-Based SystemsSystems

Development of COTS-Based System Forces Us Development of COTS-Based System Forces Us to Rethink Maintenance Technologiesto Rethink Maintenance Technologies

Issues and Complications Arise in Maintenance Issues and Complications Arise in Maintenance COTS-Based Systems COTS-Based Systems COTS Vendors Need to

Not Only Just Maintain a Block of Source Code in a Specific Application

But Also Maintain Code That is Reused in Numerous Customer Applications

COTS Integrators Need to Maintain Systems Filled with Black Boxes

Page 50: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.50

Why So Hard to Maintain COTS-Based Why So Hard to Maintain COTS-Based SystemsSystems

Frozen FunctionalityFrozen Functionality Occurs When a Vendor Either Goes Out of

Business or Stops Supporting the Component Can Make Application Which Needs Periodic

Updates Unmaintainable Example: System with a Parser Component that

Requires Modifications Each Time the Language Changes

Incompatible UpgradesIncompatible Upgrades Occur when Software Vendors Upgrade and

Maintain Components That Do not Align with Your Demand

Can Make a Component One Day Become Incompatible with Rest of the System

Page 51: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.51

Why So Hard to Maintain COTS-Based Why So Hard to Maintain COTS-Based Systems (Cont.)Systems (Cont.)

Trojan HorsesTrojan Horses A Trojan Horse is a Component that has Been

Covertly and Intentionally Programmed for Malicious Behavior Example: A Trojan horse Component That is

Supposed to Delete Only Files in A fixed Directory Might Switch to a Privileged Directory and Delete All Files

Difficulties in Detecting a Trojan Horse A Trojan Horse May be Dynamically Context

Sensitive Without Source Code Access

Page 52: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.52

Why So Hard to Maintain COTS-Based Why So Hard to Maintain COTS-Based Systems (Cont.)Systems (Cont.)

Defective or Unreliable COTS SoftwareDefective or Unreliable COTS Software No Uniform Standards Exist by Which

Software Components are Tested and Certified for Reliability

Even Good Processes (ISO etc.) Do not Guarantee Good Software

Proposed Software Reliability Models May not be Used Under Different Environments

Page 53: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.53

Why So Hard to Maintain COTS-Based Why So Hard to Maintain COTS-Based Systems (Cont.)Systems (Cont.)

Complex or Defective MiddlewareComplex or Defective Middleware Middleware is a General Term for Software

That Joins Together, Mediates Between, or Enhances Two Separate Software Packages

A Wrapper is A Type of Middleware That Limits A Component’s Functionality Problem: How to Know Which Behaviors To

Protect Against? If the Behavior of A Component is Unknown, it’s Difficult to

Protect the Whole System Against its Behavior.

Page 54: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.54

Alternatives and SolutionsAlternatives and Solutions

Frozen FunctionalityFrozen Functionality No Easy Solution However You Can

Try to Implement That Functionality Yourself– Work Only If You Have the Required Domain Expertise

Acquire the Functionality Elsewhere– Work Only If Competing Components Have the

Functionality You Need

Acquire the Source Code From the Current Vendor and Maintain It Yourself – You Should Negotiate for Source Code Rights in the

Licensing Agreement

Page 55: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.55

Alternatives and Solutions (Cont.)Alternatives and Solutions (Cont.)

Incompatible Upgrades: Incompatible Upgrades: Options are Similar to Frozen Functionality Building Your Own Replacement Acquiring the Functionality Elsewhere Modifying Your Software Building A Wrapper Around A Component to

Keep It From Exhibiting Incompatible Behaviors Glue That Connects these Components to the Rest of

the System May Also Need to Rewrite Downgrading or Uninstalling

Can be Difficult This Need Would Disappear If An Upgrade’s

Compatibility Can be Pre-determined

Page 56: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.56

Alternatives and Solutions (Cont.) Alternatives and Solutions (Cont.)

Detecting Trojan HorsesDetecting Trojan Horses Requirements :

All Requests from the Component to the Operating System are Monitored

Each Request’s Context is Checked Wrapper May be Used , But Without Total

Confidence Defective or Unreliable COTS SoftwareDefective or Unreliable COTS Software

A Universal Standard to Assess Component Dependability is Needed

Knowing How A Component Affects System Behavior Before Using It

Page 57: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.57

Alternatives and Solutions (Cont.)Alternatives and Solutions (Cont.)

WrappersWrappers Solutions to Knowing the Behaviors of

Component Querying the Vendor Extensively Testing the Component in the System

Environment Combining Above Two, More Thorough Wrappers

Can be Created

Page 58: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.58

Conclusions and Future WorkConclusions and Future Work

FrameworkFramework Find the OO method to build generic and

flexible framework. Understanding that aglet is a design pattern for

distributed computation Aglet is still a low-level of framework and it is

still at large Find higher level of pattern and framework Application-oriented

Page 59: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.59

Conclusions and Future Work(Cont.)Conclusions and Future Work(Cont.)

Test and ValidationTest and Validation Still unsolved on Present two method to help to test and

validation Major difficult is how to model an agent based

system OMG created Agent Working Group to address

this problem Research needs to be conducted to identify any

performance or design implications that runtime verification will have on Java based system

Page 60: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.60

Conclusions and Future Work(Cont.)Conclusions and Future Work(Cont.)

COTS-Based Software Development is Founded COTS-Based Software Development is Founded on the Divide-and-Conquer Principleon the Divide-and-Conquer Principle Larger System Needs Broken Down and

Satisfied by Individual Subsystems COTS Solution Appears Straightforward and COTS Solution Appears Straightforward and

CompellingCompelling Using COTS-Based Software Engineering, Using COTS-Based Software Engineering,

Information Systems Might be Rapidly Produced Information Systems Might be Rapidly Produced SomedaySomeday

However , New Trade-offs and Issues Require Us However , New Trade-offs and Issues Require Us to Rethink and Upgrade Traditional Software to Rethink and Upgrade Traditional Software Maintenance SolutionsMaintenance Solutions

Page 61: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.61

Conclusions and Future Work(Cont.)Conclusions and Future Work(Cont.)

Advice On Maintenance COTS-Component Advice On Maintenance COTS-Component Systems :Systems : Avoid Building Mini-Systems from COTS

Components Keep Detailed Requirements Documentation

on Each Component, and Avoid the Temptation to Deep Endlessly Adding “Bells and Whistles”

Use An Information Class Repository Structure and Promotion

If Competing Applications Share A Component But Can Not Tolerate Changes the Other Might Need, Keep Two Similar Components In the Repository

Page 62: CSE298 CSE300 CSE.RU-1.1 Distributed Component Based Systems A. Paul Heely Jr. Kun Lu Ting Zhou

CSE298

CSE300

CSE.RU-1.62

Conclusions and Future Work(Cont.)Conclusions and Future Work(Cont.)

Future Issues: Certify and Validate COTS-Based Future Issues: Certify and Validate COTS-Based SystemsSystems