finalumlexpl

Embed Size (px)

Citation preview

  • 8/11/2019 finalumlexpl

    1/60

    CSE333

    DOC/UML.1

    Distributed Object Computingand UML

    Research and Work By:

    Hector N. Echegoyen

    Oliver Scheck

    Gowri Shankar

    [email protected]

    [email protected]@engr.uconn.edu

  • 8/11/2019 finalumlexpl

    2/60

    CSE333

    DOC/UML.2

    Objective

    Explore UML Modeling Techniques/Constructs

    and Identify Support to DOC

    Employ Rational ROSE to Model and Develop a

    Distributed Banking Application (using RMI)

    Identify Key Distribution Issues Relating to OOM

    Explore a Select Set of UML Modeling Tools to

    Identify DOC Support

  • 8/11/2019 finalumlexpl

    3/60

  • 8/11/2019 finalumlexpl

    4/60

    CSE333

    DOC/UML.4

    Behavioral ModelingSystem Use Case

    Process Transactions

    Distributed Communication

    Persistent Storage

    Report Generation

    Printing

    Auditing

    Clerk

    BANKING SYSTEM

    The Customer

    Manager

    THE CLERK

    THE

    CUSTOMER

    THE

    MANAGER

    TheServer

    THE SERVER

  • 8/11/2019 finalumlexpl

    5/60

    CSE333

    DOC/UML.5

    Deployment DiagramDescription

    To Get an Idea of How the System Would BeDistributed

    Concept of More Than One Type of Bank Server

    Questions:

    What Kind of Functionality is DistributedWhere?

    Where is Security, Servers or Clients, Both?

    Where Should We Deploy Objects, and WhichObject?

    Servers Handling Multiple Clients And/or ServerTransactions at the Same Time

    Attempt to Make Our System Generic So That WeCan Run All Possible Scenarios

  • 8/11/2019 finalumlexpl

    6/60

    CSE333

    DOC/UML.6

    Architectural ModelingDeployment Diagram

    BranchServer

    Terminal1

    Terminal2

    TerminalX

    BranchServer

    Terminal

    1

    Terminal2 Terminal

    X

    CentralBank

    ATM 1 ATM 2

    ATM X

    Hub

  • 8/11/2019 finalumlexpl

    7/60

    CSE333

    DOC/UML.7

    Structural ModelingLogical and Component Views

    ClientServerGui

    U

    TheServer

    U

    ClientServerGui

    U

    TheServer

    U

    CLASS

    DIAGRAM

    COMPONENT

    DIAGRAM

  • 8/11/2019 finalumlexpl

    8/60

    CSE333

    DOC/UML.8

    Initial Logical View of Client

    This is Where The Applet GUI Goes.

    To be Added To The Model Later.

    RMI Here

    CustomerProfileForm

    (from TheServer)

    Serializable

    (from io)

    CustomerAccountForm

    (from TheServer)

    Vector

    (from util)

    TransactionInterface

    TellerInterface

    BankConnection

    1

    +BankTransaction

    1

    1

    +TellerTransaction

    1

  • 8/11/2019 finalumlexpl

    9/60

    CSE333

    DOC/UML.9

    Initial Local Server Simulator and ClientComp Model

    Funny

    Money

    Serializable

    Serializable

    TransactionInterface

    TransactionInterface

    rmi

    BankConnection

    RemoteBankServer

    server

    util

    Session

    Interface

    Session

    Interface

    TransactionByRole

    AtmTrans

    TellerTrans

    MgrTrans

    TellerInterface

    Teller

    Interface

  • 8/11/2019 finalumlexpl

    10/60

    CSE333

    DOC/UML.10

    Initial Logical View of the ServerSimulator

    FunnyMoney

    amount : int

    Serializable

    (from io)

    Remote

    (from rmi)

    This is Where The Applet GUI Goes.

    To be Added To The Model Later.

    RMI Here

    TransactionInterface UnicastRemoteObject

    (from server)

    SessionInterface

    Hashtable

    (from util)

    Account

    Account()

    SessionHandler

    TransactionByRole

    $ GOOD_CONN : int = 0

    RemoteBankServeraccounts

    1

    +TheAccount

    1

    1

    +TheSessionHandler

    1

    +TheTransactionHandler

    AtmTrans

    TellerTrans

    MgrTrans

    TellerInterface

    CustomerProfileForm

    (from TheServer)

    CustomerAccountForm

    (from TheServer)

  • 8/11/2019 finalumlexpl

    11/60

    CSE333

    DOC/UML.11

    Behavioral ModelingSequence Diagram of Log In

    Client 1 Server

    Enter UName And Passwd

    Send UName And Passwd

    Verify UName And Passwd

    Send Connection Status

    Prompt User For Transaction Info

    Allocate Memory And Resources For Transactions

    Allocate Memory And Resources For Transactions

  • 8/11/2019 finalumlexpl

    12/60

    CSE333

    DOC/UML.12

    Behavioral ModelingSequence Diagram of Log Out

    Client Server

    User Execute Logout

    Send Logout Message

    Release Memory And Resources

    Successfully Logged Out Message

    Release Memory And Resources

  • 8/11/2019 finalumlexpl

    13/60

    CSE333

    DOC/UML.13

    Final Application Models and Deployment

    Each of Us to Explain his/her Own Piece in Detail

    Hector - Client GUI and App

    Oliver - Main Server Transaction and InterfaceHierarchy

    Gowri - Main Server Banking Application

    Only a Prototype - Not a Full-Fledged Application

    Demo is Limited to a Couple of Transactions

    Goal is to Prove Java RMI Concepts, Interfaces,

    UML Support of Them in a Real World App After This Phase, Ready to Jump to the Analysis

    Phase

  • 8/11/2019 finalumlexpl

    14/60

  • 8/11/2019 finalumlexpl

    15/60

    CSE333

    DOC/UML.15

    Final DevelopmentMain Client Application

    The Applet GUI IS To be Added To

    The Model Later.

    RMI ENTRY

    HERE

    CustomerProfileForm

    (from TheServer)

    Serializable

    (from io)

    CustomerAccountForm

    (from TheServer)

    BranchServerInterface

    (from TheServer)

    MgrTransactionInterface

    (from TheServer)

    ServerTransactionInterface

    (from TheServer)

    ATMTransactionInterface(from TheServer)

    SessionInterface

    VerifyUserNameAndPassword()

    PerformLogout()

    ServerInterface

    login()

    logout()

    (from TheServer)

    RoleTransactionInterface

    (from TheServer)

    BankConnection

    1+BankSession1

    +BankServerSession

    1+BankServerTransaction 1

    TellerTransactionInterface

    (from TheServer)

    Vector

    (from util)

    FORM CLASSES FOR

    DATA TRANSFER

    CONNECTION

    CLASS WITH

    THE GUI

  • 8/11/2019 finalumlexpl

    16/60

    CSE333

    DOC/UML.16

    RMI Structure

    Make Method Callable by Declaring Signature inInterface

    Compile Class and Interface and Generate Stub andSkeleton

    Stub

    Client Object

    Skeleton

    Server Object

  • 8/11/2019 finalumlexpl

    17/60

    CSE333

    DOC/UML.17

    RMI Flow of Events

  • 8/11/2019 finalumlexpl

    18/60

    CSE333

    DOC/UML.18

    Server - Goals

    Handle Multiple Virtual Connections

    Have Multiple User Types, With VaryingPrivileges

    Provide the Financial Services

    Use of Database

    Select Design Elements havent Been Coded

    Server-Server Connection to have Hierarchy ofServers

    Use of Distributed Database

    Persistency of DB (Object Serialization)

  • 8/11/2019 finalumlexpl

    19/60

  • 8/11/2019 finalumlexpl

    20/60

    CSE333

    DOC/UML.20

    Server - Transaction Interfaces

  • 8/11/2019 finalumlexpl

    21/60

    CSE333

    DOC/UML.21

    Server at Runtime - Login

  • 8/11/2019 finalumlexpl

    22/60

    CSE333

    DOC/UML.22

    Server - Login Method

    switch(db.validateUser(u, p)) {

    caseUser.ATM: {atmTransaction = newATMTransaction(this);

    addTransaction(atmTransaction);

    return(atmTransaction);

    }

    caseUser.MANAGER: {

    mgrTransaction = newMgrTransaction(this);

    addTransaction(mgrTransaction);return(mgrTransaction);}

    caseUser.TELLER: {

    tellerTransaction = newTellerTransaction(this);addTransaction(tellerTransaction);

    return(tellerTransaction);

    }

    caseUser.SERVER: {serverTransaction = newServerTransaction(this);

    addTransaction(serverTransaction);

    return(serverTransaction);

    }

    default: {

    System.out.println("unsupported user type");

    returnnull;

    }

  • 8/11/2019 finalumlexpl

    23/60

    CSE333

    DOC/UML.23

    Server - Database

    Designed to

    SupportPersistencyVia ObjectSerialization

    AssociationsAre Vectors;

    Not Intuitively

    Displayed inRose

  • 8/11/2019 finalumlexpl

    24/60

    CSE333

    DOC/UML.24

    Server - Hierarchy

  • 8/11/2019 finalumlexpl

    25/60

    CSE333

    DOC/UML.25

    Server - The Big Picture

  • 8/11/2019 finalumlexpl

    26/60

  • 8/11/2019 finalumlexpl

    27/60

    CSE333

    DOC/UML.27

    Server Application Hierarchy

    Customer

    User

    UnicastRemoteObject

    UnicastRemoteObject()

    readObject()

    clone()

    exportObject()

    (from server)

    Acct

    accno : int

    balance : float = (float)0.0

    CustomerProfileForm

    CustomerAccountForm

    Database

    Server

    -db

    Vector

    (from util)

    -customers-users

    #customers

    -transactions

    Customer

    #account

    SavingsAccount

    CheckingAccount

    TheCustomerAccount

    AccountNumber : int

    +TheSavingsAccount+TheCheckingAccount

    UTILITY CLASSES

    AND FORMS

    BANK ACCOUNT AND

    CUSTOMER

    INFORMATION

    REMOTESERVER

  • 8/11/2019 finalumlexpl

    28/60

    CSE333

    DOC/UML.28

    Sample Code

    Add a Customer to the Bank

    protected boolean addCustomer(Customer c) {System.out.println("Server.addCustomer()");Object obj = null;for (int i = 0; i < customers.size(); i++) {obj = (Customer)customers.elementAt(i);

    if (obj.equals(c)) {System.out.print("customer alreadyexists");

    return false;}

    }customers.addElement(c);

    return true;}

  • 8/11/2019 finalumlexpl

    29/60

    CSE333

    DOC/UML.29

    Sample Code

    Open an Account for Customer

    public int createAccount(AccProfileForm apf)throws RemoteException {

    Acct account = null;switch (apf.type) {case AccProfileForm.SAVINGS: {

    account = new SavingsAccount();

    break;}case AccProfileForm.CHECKING: {

    account = new CheckingAccount();break;}default:

    }account.balance = apf.initialDeposit;account.accno = server.accNoGen();account.type = apf.type;server.addAccount(customer, account);return account.accno;

    }

  • 8/11/2019 finalumlexpl

    30/60

    CSE333

    DOC/UML.30

    Sample Code

    protected boolean NewAddAccount(int customerNumber,TheCustomerAccount a) {

    // get a reference to current customer objectSystem.out.println("entering NewAddAccount()");

    Object obj = null;

    Object accObj = null;

    for (int i = 0; i < customers.size(); i++) {obj = (Customer)customers.elementAt(i);if ( ((Customer)obj).custNumber ==

    customerNumber ) {

    System.out.println("customer found");

  • 8/11/2019 finalumlexpl

    31/60

    CSE333

    DOC/UML.31

    Sample Code

    // Check for Duplicate account numbers

    for (int j=0;j

  • 8/11/2019 finalumlexpl

    32/60

    CSE333

    DOC/UML.32

    Sample Code

    System.out.println("Account Number: " +a.AccountNumber + " Successfully Added.");

    Add the account to the customer

    ((Customer)obj).accounts.addElement(a);return true;

    } // end if == cust number} // end for i

    System.out.println("Customer Not Found");

    return false;}

  • 8/11/2019 finalumlexpl

    33/60

    CSE333

    DOC/UML.33

    Distribution Issues Relating to OOM

    Problems Relating to Distribution. How to Distribute the Different Parts of the

    System

    How to Find the Distribution Objects

    How to Decide Clusters of Objects How to Distinguish High and Low Read/write

    Ratios Between Objects

    How to Find the Operations Which Changesthe Object States

  • 8/11/2019 finalumlexpl

    34/60

    CSE333

    DOC/UML.34

    UML Support For DOC

    Component Diagrams

    Shows the Structure of the Code

    Graph of Components Connected byDependency Relationships

    Shows Dependencies Among SoftwareComponents

    Deployment Diagrams

    Shows the Structure of the Run-time System

    Used to Depict Which Components May Runon Which Nodes

    Migration of Components From Node to NodeMay Also Be Shown.

    Softmodeler A Next Generation UML

  • 8/11/2019 finalumlexpl

    35/60

    CSE333

    DOC/UML.35

    Softmodeler - A Next Generation UMLModeling Tool

    Supports three Important Technological Trends Software Components

    Distributed Computing

    OO Technology

    Supports the Basic UML Constructs Use Case Diagrams

    Object Diagrams

    Class Diagrams

    Sequence Diagrams No Support for

    State Diagrams

    Activity Diagrams

  • 8/11/2019 finalumlexpl

    36/60

  • 8/11/2019 finalumlexpl

    37/60

    CSE333

    DOC/UML.37

    Component Design and Distribution

    Provides Special Notation for Defining

    Components

    Supports Component Distribution Modeling

    Allows Reuse of Existing Models of Components

    Automatic Generation of Enterprise Java Beansand Java Beans Code

    Creation of Visual Graphical Component Models

    From Existing EJB and JB Source Code.

    Produces Required Distribution Code in Either

    Corba or Java RMI

  • 8/11/2019 finalumlexpl

    38/60

    Component Diagram An Extension to the

  • 8/11/2019 finalumlexpl

    39/60

    CSE333

    DOC/UML.39

    Component Diagram - An Extension to theUML Notation

    Different From a Class Diagram in the Following Component Scope - Can Be a Components

    Class or a Set of Classes and Interfaces

    Components Interface - a Set of Methods and

    Properties Which Allow Remote Access. Component Framework- Java Beans ,

    Enterprise Java Beans , COM

    Components Distribution Method -

    CORBA,RMI

  • 8/11/2019 finalumlexpl

    40/60

    CSE333

    DOC/UML.40

    Class Diagram - An Enhancement to UML

    Field

    Property

    Method

    Softmodeler Differentiates Between Regular Fields

    and Properties of a ClassProperty is a Field With Access Rights

    Set/get Methods for the Property Fields Generated

    Automatically

  • 8/11/2019 finalumlexpl

    41/60

    CSE333

    DOC/UML.41

    SoftModeler vs. Rational Rose

    Component Diagrams

    Provide Facilities for Specifying Distinct

    Local & RemoteMethods

    Specifying Distribution

    Method Required Support for the Simulation

    of Models During Analysisand Design Phase.

    Allows Specification of

    Properties With AccessRights Within Classes.

    Does Not Support StateDiagrams and ActivityDiagrams.

    Extensive Support for

    Component Diagrams NotSupported

    Not Supported

    Not Supported

    Supports All ConstructsDefined in the UML

    Notation.

  • 8/11/2019 finalumlexpl

    42/60

  • 8/11/2019 finalumlexpl

    43/60

    bj i l

  • 8/11/2019 finalumlexpl

    44/60

    CSE333

    DOC/UML.44

    ObjecTime Developer - Features

    Different Levels of Views for Developers and

    Customers Executable Modeling Capability for

    Understanding Complex, Real-Time Systems

    Tracing Messages Visually and Debugging

    Using Graphics Supports Ability to

    Build Model From Design

    Load Model to Target Platform

    Control & Animate Model From the Development

    Platform

    Generates Entire Applications by Using FormalMethods That Allow Automatisation

    Obj Ti D l F

  • 8/11/2019 finalumlexpl

    45/60

    CSE333

    DOC/UML.45

    ObjecTime Developer - Features

    Integrates Smoothly with Other Developement

    Tools and Operating Systems Especially Real-time Operating Systems

    Stated on Their Web Page:

    ROOM Forms the Basis for UML-RT

    Contains a Set of Real-time Extensions toUML

    Will Soon to Be an OMG Standard for GeneralPurpose Software Development

    UML RT

  • 8/11/2019 finalumlexpl

    46/60

    CSE333

    DOC/UML.46

    UML-RT components

    CapsulesRepresentComplex,PotentiallyConcurrent and

    Also DistributedActive Components

    Port is Physical Part of Implementation of

    Capsule Mediates Interaction of Capsule With

    Outside World

    Includes Interface and Protocol

    [Signals]

    UML RT

  • 8/11/2019 finalumlexpl

    47/60

    CSE333

    DOC/UML.47

    UML-RT components

    Connectors Capture Key Communication

    Relationships Between Capsules Relationships Have Architectural Significance

    Relationships Identify Which Capsules CanAffect One Another Other Through DirectCommunication

    R h Of UML T l P di Pl

  • 8/11/2019 finalumlexpl

    48/60

    CSE333

    DOC/UML.48

    Research Of UML Tools -Paradigm Plus

    Enterprise Component Modeling (ECM: Share and

    Reuse of Components Across Projects) Models Business Processes

    Object Repository for Component Sharing andReuse and to Reverse Engineer Legacy Software

    Fully Integrated Business Process Modeling,Object Modeling, and Physical Database Modeling

    OOCL (Object Oriented Change and Learning)Business Managers Capture, Model, andCommunicate Corporate Strategies toDevelopment Teams by Mapping BusinessRequirements Directly Into Use-case, Object, andPhysical Database Models

    P di Pl B i P M d l

  • 8/11/2019 finalumlexpl

    49/60

    CSE333

    DOC/UML.49

    Paradigm Plus - Business Process Model

    Paradigm Plus - Physical Database

  • 8/11/2019 finalumlexpl

    50/60

    CSE333

    DOC/UML.50

    Paradigm Plus Physical DatabaseModeling

    Paradigm Plus - Component Based

  • 8/11/2019 finalumlexpl

    51/60

    CSE333

    DOC/UML.51

    Paradigm Plus Component BasedDevelopment

    P di Pl A d U l Cl Di

  • 8/11/2019 finalumlexpl

    52/60

    CSE333

    DOC/UML.52

    Paradigm Plus And Uml - Class Diagram

    Paradigm Plus And Uml -

  • 8/11/2019 finalumlexpl

    53/60

    CSE333

    DOC/UML.53

    Paradigm Plus And Uml Use Case, State, and Object Diagrams

  • 8/11/2019 finalumlexpl

    54/60

    Paradigm Plus And Uml -

  • 8/11/2019 finalumlexpl

    55/60

    CSE333

    DOC/UML.55

    Paradigm Plus And Uml Phys Database And Collaboration Diagram

    Paradigm Plus And Uml -

  • 8/11/2019 finalumlexpl

    56/60

    CSE333

    DOC/UML.56

    a ad g us d UProject And Deployment Diagrams

    Paradigm Plus

  • 8/11/2019 finalumlexpl

    57/60

    CSE333

    DOC/UML.57

    gEnhancements To UML for Doc

    Use Case Diagram

    Communication Types Sequence Diagram

    Timing Related Interactions

    Deployment Diagram

    Additions to Physical Components

    Project Diagram

    Not Directly Related To DOC

    Useful in Project Management Activities ForTeam Leaders and Middle Management

    ECM

    Not Directly Related To DOC. Could Be Usedin Software Systems Engineering.

    Together

  • 8/11/2019 finalumlexpl

    58/60

    CSE333

    DOC/UML.58

    Together

    Product of Object International, Inc.

    Http://www.Oi.Com/ Together/j & Together/c++

    Combined to Together Control Center

    President and Founder Peter Coad

    Coad Conducts Workshops and PerformsCorporate Consultations

    Publishes Books on Modeling

    Provides Extensions to UML

    Tries to Propagate His Own Model CalledCoad Object Model and Archetypes

    Together Features

  • 8/11/2019 finalumlexpl

    59/60

    CSE333

    DOC/UML.59

    Together- Features

    Supports C++ and Java

    Round-trip Engineering Works Directly With Source Files, Thus No

    Intermediate Repository Necessary

    UML Diagrams, Coad Object Models

    Generation of System Documentation

    Configurability of Reverse Engineering and CodeGeneration

    Rational Rose Import/Export

    Import Relational Schema (Oracle, Access, etc.)

    Open API for Extensibility

    Availability on Multiple OS Platforms

    Supports IDL for CORBA and COM

    Together Screenshot

  • 8/11/2019 finalumlexpl

    60/60

    CSE333

    Together - Screenshot