COTS Software Reuse in Distributed Environments

Document Sample
COTS Software Reuse in Distributed Environments Powered By Docstoc
					現有軟體之重用技術與應用
 Techniques and Applications of
     COTS Software Reuse

          林志敏
     臺中健康暨管理學院
        資訊管理學系
     jimmy@thmu.edu.tw
Outlines
 Introduction
 COTS-Based Systems
 Distributed Software Integration System (DSIS)
 DSIS Examples
 MultiAgent Distributed Scripting System
  (MADSS)
 Conclusions
 MADSS Demo

                                                   2
INTRODUCTION
Motivation
 Building a house
  – 鋼筋+水泥+模版
  – 預鑄組合式




                     4
Motivation (Cont.)
 Find a parking space in a large parking lot
=> How to build a Graphic Parking Lot ?
 Management System?
  – design from scratch (higher cost, longer
    development time, suitable for popular software)
  – design by reusing existing software (lower cost,
    shorter development time, suitable for
    customizing software)
                                                  5
       CAR RECORD

Name             Jim-Min Lin
Car_ID           RD-9681
Parking space    105
Check-in-date    04/12/2002
Check-in-time    13:06:57 PM
Check-out-date   04/12/2002
Check-out-time   15:51:03 PM
Parking fee      NT$ 90.00




                               6
Software Reuse
 Why software reuse?
  – Time and money saving
  – Diverse tools/functions support
  – Revaluing existing software
  – Ensuring software reliability
  – Evolving software easily
 Software reuse approaches
   – software reuse with source codes
   – software reuse without source codes
                                           7
Software Reuse
 Levels of software reuse:
  – Functions
  – Modules or objects
  – Subsystems
  – Application systems




                              8
Software Reuse (con’t)
 Problems with reuse
   – Increased maintenance costs
   – Lack of tool support
   – Maintaining a component library
   – Finding and adapting reusable components
   => Component-based Software Engineering is a
     currently feasible and more and more important
     solution to software reuse
                                                  9
Component Based Software
Development (CBSD or CBSE)?
 CBSD focuses on building large software
 systems by integrating previously-existing
 software components.
  => Buy, don’t build

 Component-based systems encompass both
 COTS products and components through
 other means

                                              10
Software components
 Components with a specific interface protocol
  – CORBA objects
  – COM/DCOM objects
  – JavaBeans
  – EJB …..
 Components without specific interface protocol
  off-the-shelf applications with source codes
  Commercial-Off-The-Shelf (COTS) products without
    source codes <= Focus of our works

                                                      11
COTS component
 COTS component
  – A component that is
     • Sold, leased, or licensed to the general public
     • Offered by a vendor trying to profit from it
     • Supported and evolved by the vendor, who retains
       the intellectual property rights
     • Available in multiple, identical copies; used without
       modification of the internals


                                                           12
CBS: COTS BASED SYSTEMS
Software development changes in
COTS Based Systems (CBS)
           Traditional
           Approach                                    Required ITSEP Approach

             Requirements                                            Stakeholder needs/
                                                                      Business Process

                                                                        Simultaneous
            Architecture &                             Marketplace       Definition       Architecture/
               Design                                                   and Tradeoffs     Design

                                                                       Programmatics/
                                                                            Risk
            Implementation



ITSEP:Information Technology Solutions Evolution, 2002, CMU SEI
Adapted from COTS-Based Systems for Program Managers
                                                                                                     14
Activities of CBS development




                                15
Physical View of COTS-Based System

 A set of reusable COTS components
 Software architecture
 Glueware




                                      16
Architecture

Software Architecture
  – A high level design that provides decisions made
    about the problem(s) that the component will
    solve, component descriptions, relationships
    between components, and dynamic operation
    description.
  – A sub-system design made up of a collection of
    components
                                                  17
Architecture (con’t)

 Class of architecture
  – System infrastructure
      • Support the development of system infrastructure
   – Middleware integration
      • Support component communication and information
        exchange
      • Example: CORBA, COM, DCOM
   – Enterprise application
      • Support the development of end-user application
                                                           18
Glueware

 Glueware supports a physical methodology
  to integrate components
 Types of Glueware
  – Custom codes
  – System tools, ex: Unix pipe filter
  – Scripting language
     • Unix shell
     • Visual Basic
     • TCL/TK(Tool Command Language/Tool Kit)   19
COTS product reuse
 Benefits with COTS system integration
  – Diverse functionality
  – To reduce costs and delivery times
  – Reduce risks
  – Adaptable alone with system evolution




                                            20
 COTS product reuse(con’t)

 Problems with COTS system integration
   – Lack of source codes and the control over
     functionality and performance
   – Problems with COTS system interoperability
   – Lack of support from COTS vendors




                                                  21
COTS product reuse(con’t)
 Issues of COTS-based System development
  – Which technologies and COTS products are most
    appropriate?
  – How can COTS product mismatches be rectified in our
    system?
  – How can we engineer system attributes such as
    reliability, security, and performance in spite of
    decreasing control over individual system components?
  – How do we integrate COTS products with the custom
    code that continues to provide the core of many
    systems?
  – How do we take advantage of COTS while delivering a
    system that can evolve over a long lifetime?        22
Reuse of COTS Products
 Our works focused on the CBS integration
 techniques and applications




                                             23
COTS product Integration
 Integration technique of COTS products
   – Adaptation through Wrapper technique
   – Wrapper
     • A piece of codes that encapsulate the underlying
       components and bridge the components with their
       clients
     • Wrapping COTS as another component with
       specific interface


                                                          24
COTS product Integration(con’t)
         Wrapped Component

              Wrapper
                                 Added Interface



    COTS
   Software
                        Custom
                         Code


                                               25
Wrapper technique
 Purposes and usage of a wrapper
   – enhancing the functionality or performance of
     the wrapped software
   – gluing a software with other (independent)
     software so that they can work together




                                                     26
Distributed Software Integration
         System (DSIS)
Conceptual View of DSIS
                      network
現有應用
       UI   Wrapper
 程式


                                Coordinator
                                              Interface

現有應用
       UI   Wrapper
 程式


                                                          使用者

                                                                28
  CORBA-based DSIS
 Objectives
=> Migrating DOS, Windows, and UNIX
 applications to CORBA server objects




                                        29
Overall structure of CORBA-
based DSIS
S erver N                                   S erver B                          S erver A                               Coordinator

 Ob ject Serv er                            Ob ject Serv er                    Ob ject Serv er




                                  ...
                                                                                                                        Coordinator




                                                                                              Wrapper
                       CORBA                                        CORBA         UN IX                     CORBA
  Other                                         PC
                       Serv ice                                     Serv ice    Ap pl icat io n             Serv ice     Program
Application                                 Application
                         N                                            B                                 IPC   A
  Wrapper       IPC                          Wrapper         IPC


                                                                                                                              WWW
                                                                                                                              Se rv er

                                                Object Request Broker (ORB)

            Other OS                                      Win NT                            UNIX                           Win NT




                                                                   Network
                            Client 1                                              Client N


                                   WWW                                                     WWW



                                                                   ...
                                  Browser                                                 Browser


                                   UNIX                                                     Win NT


                                                                                                                                         30
 Wrapper for CORBA DSIS
 a program that consists of a CORBA
 interface module and an I/O redirector
 module
  => the former part is responsible for accepting
   requests from CORBA clients and then
   rescheduling the transactions to PC applications
   if necessary
  => the latter part is to intercept I/O data of PC
   applications and support multithreading (or
   multi-instance) for increasing system
   throughput
                                                      31
32
Wrapper Operation Scenario




                             33
Implementation of Wrappers
 DOS Wrapper
 Windows Wrapper
 UNIX Wrapper




                             34
DOS Wrapper
 Using DOS VM to intercept and redirect
 DOS I/O channels




                                           35
WINDOWS Wrapper
 Hooking system message queue and clip
 board




                                          36
Windows Input Redirection

                                                keyboard and mouse
                 the input of computer
                                                                                moedm
Printer                  Input of
                          system
                                                        the input of redirect
                               input queue of
                               system

                                                                     Wrapper
                                                                      Wrapper




                                           set the focuse to the wrapped thread

                         get the input
                           Focus

input queue of   input queue of the             input queue of       input queue of
the thread       thread that be                 the thread           the thread
                 wrapped




                                                                                        37
    Windows Output Redirection
                                 Wrapper Output

input queue of application


    Input of the application
                                                                  interface with
                                                    Wrapper
                                                                     CORBA
                                                                      clients

          Windows
         Application
                                                  Wrapper Input


                                              clipboard

                  Application output data                                      38
UNIX Wrapper
 A sandwich-structure wrapper




                                 39
40
DSIS Examples
DSIS Example 1:
 Graphical Parking Lot Management System
 (GPLMS)




                                        42
Integration Web Server首頁




                           43
GPLMS在瀏覽器上的執行結果




              44
DSIS Example 2:
 A MultiAgent-based Distributed Scripting
 System (MADSS)
  – Agent-based DSIS + scripting mechanism




                                             45
       MADSS Overview

USER




                        46
MADSS System Structure
              Communication Support
                    Center

                        Fac ilitator




                     Internet

    Servic e Agent                 Slave         Client
                                   Agent         Agent
            M ethod Invocation             agent
                                       communication
 Software Com ponent
   (Server Object)                           Use_site

    Server_site                                           47
MADSS
 The benefits
  – More intelligent abilities to deal with tasks
  – Component integration with speech acts
    communication
  – Load balance
  – Adopting existing technologies:
      • Java
      • KQML (Agent Communication Language, ACL)

                                                    48
MADSS(con’t)
 Roles of MADSS
  – Users
  – Client Agent
  – Slave Agent
  – Facilitator
  – Service Agent



                    49
MADSS(con’t)
 MADSS Users
  – Responsible for writing MADSS scripts




                                            50
MADSS(con’t)
 Client Agent
  – A stationary agent
  – Interpret an MADSS script program as the
    corresponding agent’s commands and KQML
    messages
  – Delegate tasks to slave agents for users
  – Delegate sub-tasks to mobile slave agents


                                                51
MADSS(con’t)
 Slave Agent
   – A mobile agent
   – Get delegated tasks from a client agent
   – Directed/driven by an MADSS script program
   – Bring the requests to a service agent through
     KQML and take the results back to another
     service agent respectively


                                                     52
MADSS(con’t)
 Service Agent
   – Advertising services on facilitator
   – Forward messages and method calls to
     corresponding COTS components
     (COTS+wrapper) for slave agents
   – Service management



                                            53
MADSS(con’t)
 Facilitator
   – Record agent information for newly created
     agents
   – Assist an agent to look for an appropriate
     service agent.
   – Assist an agent to deliver messages to the
     corresponding agents.


                                                  54
MADSS(con’t)
 Distributed Scripting Language
  – Instruction types
     • Agent execution
        – Identify target agent
     • Task delegation
        – Delegate tasks to target agent
  – Scripting scenarios
     • Circular trip
     • Parallel execution
     • Forth and back                      55
Instruction types
 Agent execution
  – astart [agent_name] { task1, task2…}
     • Start an agent and specify the associated tasks
  – dispose
     • Terminate an agent
  – execute [agent_name]
     • Execute an agent
  – pexecute [agent1, agent2, …]
     • Parallel execute several agents
                                                         56
Instruction types(con’t)

 Task delegation
  – delegate [–[parameter] value]…
     • d (destination)
        – Destination’s address [default:local site]
     • s (service)
        – Target service [default:null]
     • n (name)
        – Service Agent’s name
     • t (expire time)
        – Expire time to dispose an agent              57
Instruction types(con’t)
 Task delegation
  – delegate [–[parameter] value]…
     • -c (message content)
        – Message contents for communicating with remote service
          agents.
     • -fn (n’th file name)
        – The n’th file containing data carried by a mobile slave
          agent to a destination site
     • -r (file name)
        – the file containing the service results back to origin
                                                                    58
Scripting scenarios
 Circular trip
           PlaceX                       Place Y

  140.134.26.56                            140.134.26.65
                    AgentA


                        Home

                        140.134.26.58



                          path of AgentY
                                                           59
            Scripting scenarios (con’t)
 Example of circular trip
  astart AgentA //140.134.26.58, default        agent transfer protocol (atp) port: 4434

  {
      delegate -d atp://140.134.26.56 -n Calculator_agent1 -s Math -c (1+3) -r $result1 -f null
   delegate -d atp://140.134.26.65 -n Calculator_agent2 -s Math -c ($result1$*4) -r $result2 -f null
   delegate -d atp://140.134.26.58 -n client_agent -s Home -c $result1,$result2 -r null -f null
   dispose

  }
  execute AgentA
Scripting scenarios (con’t)
 Parallel execution

              PlaceX                         Place Y


      140.134.26.56                              140.134.26.65
                       AgentB      AgentC


                           Home


                                path of AgentB
                                                                 61
                                path of AgentC
         Scripting scenarios (con’t)
 Example of parallel execution
  astart AgentB //140.134.26.58
  {
  delegate -d atp://140.134.26.56 -n KqmlMedia -s Media -c c:\abc.mpg -r null -f file_B
  }
  astart AgentC //140.134.26.58
  {
  delegate -d atp://140.134.26.65 -n KqmlMedia -s Media –c C:\song.mp3 -r null -f file_c
  }
  pexecute AgentB,AgentC
Scripting scenarios (con’t)
 Forth and back

                   Place Y




                    PlaceX


               AgentD

                    Home


                        path of AgentD   63
          Scripting scenarios (con’t)

 Example of forth and back
astart AgentD // 140.134.26.58 Aglet 2.0.2 port 4434
{
delegate -d atp://140.134.26.65 -n Calculator_1 -s Math -c (1+3) -r $result1 –f null
delegate -d atp://140.134.26.56 -n Calculator_2 -s Math -c (3+2) -r $result2 -f null
delegate -d atp://140.134.26.65 -n Calculator_1 -s Math -c ($result1$*$result2) -r $result3 -f null
delegate -d atp://140.134.26.58 -n agent_jimmy -s print_result -c $result1,$result2,$result3 -r null -f
    null
dispose
}
execute AgentA
    系統展示:MADSS
Environment:
    3 PCs
    Windows 2000/98
    Java 2 Standard Version
    IBM Aglet
CONCLUSIONS
Summary
 The Internet is a repository of countless COTS
  products.
 CBS is highly possibly an economic and fast way
  to building a software system
 DSIS provides a feasible solution to constructing a
  CBS. MADSS is for integrating heterogeneous
  software through a scripting programming.
 We have successfully implemented an
  experimental MADSS based on IBM Aglet
  package
                                                    67
Future Works
 Interface specification mechanism for
  COTS based software components
 Software architecture for COTS based
  systems
 Agent-based CBS component searching
  system
 KQML -> XML
 MADSS Programmatic interface

                                          68
Important Source of references
 International Conference on COTS Based
  System (ICCBS) --- initiated by CMU SEI
 Web Site: www.sei.cmu.edu




                                            69
Q&A
THANK YOU VERY MUCH!

           林志敏
 1.臺中健康暨管理學院 資訊管理學系,臺中霧峰
 2.逢甲大學 資訊工程學系,臺中市
         Jimmy@thmu.edu.tw

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:5/4/2012
language:
pages:71