jiannong cao @ imc lab - department of computing, hong kong polytechnic univ. slide 1 architecture...

30
Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ. Slide 1 Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003 Architecture Description of Distributed Systems using UML and XML Chang-ai Sun 1,2 , Jiannong Cao 1 Maozhong Jin 2 , Chao Liu 2 , Michael R. Lyu 3 1 Internet and Mobile Computing Lab Department of Computing Hong Kong Polytechnic University 2 School of Computer Science and Engineering Beijin Univ. of Aeronautics and Astronautics 3 Dept. Of Computer Science and Engineering The Chinese University of Hong Kong

Post on 19-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 1

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Architecture Description of Distributed Systems

using UML and XML Chang-ai Sun1,2, Jiannong Cao1

Maozhong Jin2, Chao Liu2, Michael R. Lyu3

1Internet and Mobile Computing Lab

Department of ComputingHong Kong Polytechnic University

2School of Computer Science and Engineering Beijin Univ. of Aeronautics and Astronautics

3Dept. Of Computer Science and EngineeringThe Chinese University of Hong Kong

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 2

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Outline

The GOP distributed programming model

Need for interchangeable and extensible representation of GOP architecture

A framework of describing GOP-based distributed software architecture using UML and XML

Conclusions

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 3

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

The GOP distributed programming model

Many distributed software can be modeled as a group of components coordinating with one another over a logical graph

Software configuration

Inter-component communication

When come to implementation, we encounter some problems:

Traceability - a gap between specification and implementation

Dynamism – hard to reconfigure

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 4

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

The GOP model

A distributed program consists of a set of cooperating local programs (LP)

LPs are configured into a logical graph

Naming and code of LPs for configuration, communication, synchronization are expressed in terms of the graph and its operations

Step 1: Specify the logical graph for Step 1: Specify the logical graph for configurationconfigurationStep 2: Prepare the local programs(LPs)Step 2: Prepare the local programs(LPs)Step 3: Map LPs to nodes in the graph, Step 3: Map LPs to nodes in the graph, and nodes to processorsand nodes to processorsStep 4: Compile, distribute, and run the Step 4: Compile, distribute, and run the applicationapplication

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 5

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

The GOP model

Provide graph as an abstraction construct which supports both software design and implementation:

The graph metaphor is made explicit in programming – GOP directly supports the graph construct at the programming level

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 6

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Specification and instantiation of language-level graph construct

Node,

Edge,

Graph,

LP-to-Node mapping

Node-to-Processor mapping

The GOP model (cont’d)

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 7

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Graph-Oriented Programming PrimitivesCommunication and Synchronization

defined in terms of the logical graph – referring to nodes / edges (pre-defined or derived)behavior changes as the graph changes

Subgraph Generation e.g., deriving the shortest paths and spanning trees

Graph Query check the graph structure

Graph Update change the graph structure

The GOP model (cont’d)

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 8

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

The GOP model

Program the dynamic system reconfiguration directly

B C

A

Reification

B C

AD

Intercession

Reflective Evolution

Reify software configuration as an explicit and tangible run-time entity that is a part of the system.

Evolve the system reflectively with operations on this entity.

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 9

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

GOP is language and platform independent

GOP can be implemented as library incorporated in familiar languages and integrated with programming platforms:

ClusterGOP in C over MPIWebGOP in Java over SoapOrbGOP in Java over CORBAGridGOP?

Extending GOP to different environmentsGOP library is mapped to the underlying middleware and OS

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 10

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

LogicalGraph

LogicalProgram

Mapping+Execution

Monitor &Visualization

User Interface

GOP API

GOPLibrary

GraphRepresentation

Middleware

GOP Runtime

Configuration Manager &Consistency Maintenance

NetworkO SO S

Visual GOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 11

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Visual GOP

Support the visual, intelligent support for the design, coding, and deployment of GOP-based distributed programs to be executed on different platforms.

ProcessorPanel

MappingPanel

VisualDesignEditors

Remote ExecutionManager

Top Level (VisualGOP's GUI)

Node data structure

LP data structure

Processor data structure

Edge data structure

Internal VisualGOPStructure

File representation:VisualGOP Format

or XML Format

Non-Visual Level

Underlying Level (OS platform)Middleware, component systems, MPI or other distributed

platform

Clusters, CORBA or Web

VisualGOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 12

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Visual GOP

Graph Editing Panel - provide an area for graph construction

Graph Construction Tool - provide methods such as adding node, adding edge and moving objects

Mapping Panel - provide LP-Node mapping and Node-Processor mapping

Processor Panel - display all available processor for node mapping

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 13

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

An issue was raised …

Traditionally, tools for software development usually store the software design in a platform-specific format.VisualGOP, however, need to support program construction for different kinds of programming platforms.

We do not want to build a different version of VisualGOP for each platform

Furthermore, even within the same platform, heterogeneous computers need to share the software design but may require different representation formats

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 14

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Solution …

To have a standard notation of describing the GOP distributed software architecture, which is

Mutually understandable and inter-changeable for being shared

Extensible for accommodating dynamic changes.

We decided to utilize the built-in extension mechanism of UML to describe the software architecture, with the underlying architecture metadata represented in XML

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 15

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Software architecture A set of components with independent functions and explicit interfaces,

Interactions (connectors) between the components

ADLs

component interaction/connector

Topology

Constraints

Describing the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 16

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Describing the GOP Architecture using UML

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 17

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Four layer Meta-Model Linguistics Architecture of UML

Extension Mechanism(Meta-model layer): 1) Stereotype, 2) Constraints, 3) Tagged Value

XMI: XML Metadata Interchange (XMI)

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 18

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Extension Strategy 1) Principle Meta-model closest to target architecture model in semantics is selected!

2) Criteria for choosing meta-model to extend A) semantics-match [A~C by D.Garlan]

B) legibility,

C) completeness

D) extensibility and well-defined structure

E) efficiency and effectiveness

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 19

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

3) Extension ProcedureAbstract Syntax: specifies what representation is valid.

Described in a subset of UML, consisting of a UML class diagram and a supporting natural language description.

Well-formed rules: specify what must be satisfiedProvided using a formal language (E.g. OCL) and natural language.

Semantics: specify what meanings they represent in the new domain.

Specification description: Textual description of the above specifications with detailed information such as name and a set of attributes of model elements in textual mode.

Written in XML

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 20

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Extending UML for LG in GOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 21

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Step2 : well formed rules

For Interface:

For LGComponent:

Extending UML for LG in GOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 22

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Step3 : Semantics To interpret the meanings of element in our architecture model.

Setp4: specification description (partly)

Extending UML for LG in GOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 23

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Parallel Extension of UML for Behavior of GOP

Extending UML for LG in GOP

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 24

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

An example

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 25

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 26

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Extending UML to Describe the GOP Architecture

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 27

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Implementation in VisualGOP

User Interface (VisualGOP)

Graph EditorLocal Program

EditorMapping and

Execution Control

Cluster WebCORBA

GOP-XML files

VisualGOP to GOP-XML Conversion Engine

Request and transfer the LPsRequest and transfer the

graph

Remote compilation or execution

Program Deployment

VisualGOP

GOP-XML file

GOP runtime

Underlying Platform

Platform dependent XML Parser

Logical Graph Resources

Configurations

Program Deployment

Running processes, middleware and other applications

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 28

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Visual modeling and description of GOP software architecture by using standard UML and XML

Resulting SA specification can be shared by different platforms and interchanged between tools.

Another benefit of the standard representation is that it can be transformed into any other representation schemes automatically.

Conclusions

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 29

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

E.g. Version Management View can be obtained by further description of version information.

Our future work is to further integrate our approach with GOP.

Conclusions

Jiannong Cao @ IMC Lab - Department of Computing, Hong Kong Polytechnic Univ.

Slide 30

Architecture Description of Distributed Systems using UML and XML APPT’03, Xiamen – Sept 18, 2003

Example: Calculating a global sum on a hypercube.

• Two types of LPs: Coordinator - receives and distributes the global sum, and Participant - calculates and submits partial sums; collect s global sum from Coordinator.

• An efficient implementation is to use a spanning tree as the number of messages sent between the processes is minimum.

• Using GOP, the spanning tree is derived automatically by simply invoking such an operation on the hypercube; We can then base the calculation on the resulting tree, using primitives such as Receive, SendToChildren, ReceiveFromChildren, and SendToParent.

55222288

1515

1111 22

33 44

55 66

77 88

Derived Spanning TreeDerived Spanning Tree