Object-Oriented Analysis and Design
Lecture 10: Describe Distribution
Objectives: Describe Distribution
Explain the purpose of the Describe
Distribution activity and when in the lifecycle
it is performed
Describe how the functionality of the system
can be distributed across physical nodes
Model the distribution decisions of the
system in the Deployment Model
Articulate the rationale and considerations
that support the architectural decisions
Object Oriented Analysis and Design 2
Describe Distribution in Context
[Early
Elaboration [Inception
Iteration] Iteration (Optional)]
Define a Candidate Perform
Architecture Architectural
Synthesis
Analyze Behavior
(Optional)
Describe Refine the
Distribution Architect Architecture
Define Design the
Components Database
Object Oriented Analysis and Design 3
Describe Distribution Overview
Software
Architecture
Document
Describe
Distribution
Deployment Model
Implementation Model
Object Oriented Analysis and Design 4
Key Concepts: The Deployment View
Logical View Implementation View
End-user
Analysts/Designers Programmers
Functionality
Structure Software management
Use-Case View
Process View Deployment View
System integrators System engineering
Performance System topology
Scalability Delivery, installation
Throughput communication
The Deployment View is an “architecturally significant” slice of the Deployment Model.
Object Oriented Analysis and Design 5
Why Distribute?
Reduce processor load
Special processing
requirements
Scaling concerns
Economic concerns
Distributed access to the
system
Object Oriented Analysis and Design 6
Distribution Patterns
Client/Server
3-tier
Fat Client
Fat Server
Distributed
Client/Server
Peer-to-peer
Object Oriented Analysis and Design 7
Client/Server Architectures
Thinner client, thicker server
Client A Client B Client C
Application Application
WWW Browser
Business Object DCOM
CORBA Beans
Services ADO/R
Business Object
Engine Web
HTML
Business COM Beans Server ASP Java
CGI
Object Server MTS ETS
Business Object Business Object
Services Services
Business Object Business Object
Engine Engine
Database Server(s)
Object Oriented Analysis and Design 8
Client/Server: Three-Tier Architecture
Client B
Application
Application Services
DCOM
CORBA Beans
ADO/R
Business COM Beans
Object Server MTS ETS
Business Object
Business Services Services
Business Object
Engine
Data Services Database Server(s)
Object Oriented Analysis and Design 9
Client/Server: “Fat Client” Architecture
Client A
Application
Application Services
Business Object
Services
Business Services Business Object
Engine
Database Server(s)
Data Services
Object Oriented Analysis and Design 10
Client/Server: Web Application Architecture
Client C
WWW Browser
Web
HTML
Server ASP Java
Application Services CGI
Business Object
Business Services Services
Business Object
Engine
Database Server(s)
Data Services
Object Oriented Analysis and Design 11
Peer-to-Peer Architecture
Application
Application
Services DCOM
CORBA Beans
ADO/R
COM Beans
Business MTS ETS
Application
Services Business Object
Services DCOM
CORBA Beans
ADO/R
Business Object
Engine COM Beans
Data Services MTS ETS
Business Object
Services
Business Object
Engine
Object Oriented Analysis and Design 12
Describe Distribution Steps
Define the network configuration
Allocate processes to nodes
Define the distribution mechanism
Object Oriented Analysis and Design 13
Describe Distribution Steps
Define the network configuration
Allocate processes to nodes
Define the distribution mechanism
Object Oriented Analysis and Design 14
The Network Configuration
End-user workstation nodes
”Headless" processing
server nodes
Special configurations
Development
Test
Specialized processors
Object Oriented Analysis and Design 15
Deployment Model Modeling Elements
Node <<Node>>
Physical run-time computational resource Node #1
Processor node
• Executes system software
Device node <<Processor>>
• Support device Processor #1
• Typically controlled by a processor
Connection Connection
Communication mechanism
<<Device>>
Physical medium Device #1
Software protocol
Object Oriented Analysis and Design 16
Example: Network Configuration
Desktop PC Desktop PC
<<Campus LAN>> <<Campus LAN>>
Registration
Server
<<Campus LAN>> <<Campus LAN>>
<<legacy>> <<legacy>>
Course Billing
Catalog System
Object Oriented Analysis and Design 17
Describe Distribution Steps
Define the network configuration
Allocate processes to nodes
Define the distribution mechanism
Object Oriented Analysis and Design 18
Process-to-Node Allocation Considerations
Distribution patterns
Response time and system throughput
Minimization of cross-network traffic
Node capacity
Communication medium bandwidth
Availability of hardware and
communication links
Rerouting requirements
Object Oriented Analysis and Design 19
Example: Process-to-Node Allocation
Desktop PC Desktop PC
StudentApplication StudentApplication
<<Campus LAN>> <<Campus LAN>>
Registration
Server
<<Campus LAN>> CourseCatalogSystemAccess <<Campus LAN>>
CourseRegistrationProcess
BillingSystemAccess
<<legacy>> <<legacy>>
Course Billing
Catalog System
Object Oriented Analysis and Design 20
Describe Distribution Steps
Define the network configuration
Allocate processes to nodes
Define the distribution mechanism
Object Oriented Analysis and Design 21
Distribution Mechanism
RMI was chosen as the implementation
mechanism for distribution
Analysis Design Implementation
Mechanism Mechanism Mechanism
(Conceptual) (Concrete) (Actual)
Distribution Remote Method
Java 1.2 from Sun
Invocation (RMI)
Analysis Design Implementation
Object Oriented Analysis and Design 22
Design Mechanisms: Distribution: RMI
Distribution characteristics
Latency
Synchronicity
Message Size
Protocol
Object Oriented Analysis and Design 23
Remote Method Invocation (RMI)
Naming
Lookup(serverURL)
Distributed Class
Remote
Client
InvokeOp() InvokeOp()
RemoteObject
RemoteStub RemoteSkeleton
RMI Transport
Provided “for free” with RMI for each distributed class
Object Oriented Analysis and Design 24
RMI (cont.)
Roles to be filled by the
designer applying the
One mechanism For all classes that realize the Remote
Instance Naming. interface, a remote stub and a remote
per node (from java.rmi) skeleton are created. These classes handle
the communication that must occur to
lookup(name : String) : Remote Remote support distribution.
(from java.rmi)
Any Java class that you want to
pass as an argument to an
operation on a remote interface
<<Interface>> must realize the Serializable
<<role>> ISampleDistributedClass Interface.
SampleDistributedClassClient
doSomething(aParameter : SamplePassedData)
To "distribute" a class in Java, you must define an interface
that inherits from Remote. The distributed class needs to UnicastRemoteObject <<role>>
(from Server)
SamplePassedData
realize the defined Remote interface and also inherit from
(extend) the UnicastRemoteObject.
Serializable
(from java.io)
<<role>>
SampleDistributedClass
doSomething(aParameter : SamplePassedData)
Object Oriented Analysis and Design 25
Incorporating RMI: Steps
Provide access to RMI support classes
(e.g., Remote and Serializable interfaces,
Naming Service)
java.rmi and java.io package in Middleware layer
For each class to be distributed:
Controllers to be distributed are in the
Application layer
Dependency from the Application to the
Middleware layer is needed to access java
packages
Define interface for class that realizes Remote
Deferred Have class inherit from UnicastRemoteObject
(continued)
Object Oriented Analysis and Design 26
Incorporating RMI: Steps (cont.)
Have classes for data passed to distributed
objects realize the Serializable interface
Core data types are in Business Services layer
Dependency from Business Services layer to
the Middleware layer is needed to access
java.rmi
Add the realization relationships Deferred
Run pre-processor Out of scope
(continued)
Object Oriented Analysis and Design 27
Incorporating RMI: Steps (cont.)
Have distributed class clients lookup
the remote objects using the Naming
service
Most Distributed Class Clients are forms
Forms are in the Application layer
Dependency from the Application layer to
the Middleware layer is needed to access
java.rmi
Add relationship from Distributed Class
Clients to Naming Service
Create and update interaction Deferred
diagrams with distribution processing
Object Oriented Analysis and Design 28
Example: Incorporating RMI
<<layer>>
Application
<<layer>> <<layer>>
Business Services Application
Registration
Package
(from Application)
University Artifacts
(from Business Services)
<<layer>>
Business
<<layer>> Services
Middleware
java.rmi
Java.io
Naming Server
(from java.rmi)
<<interface>> <<layer>>
Serializable UnicastRemote Middleware
(from java.io)
<<interface>> Object
(from Server)
remote
(from java.rmi)
Object Oriented Analysis and Design 29
Checkpoints: Deployment View
Have the distributed data update
coordination and synchronization
issues been addressed and
documented?
Are services that require more rapid
response available locally (LAN vs.
WAN)?
Have all redundant server issues
been addressed and documented
(primary vs. secondary)?
Are the failure modes documented?
Object Oriented Analysis and Design 30
Review: Describe Distribution
What is the purpose of the Describe
Distribution activity?
What is a node? Describe the two different
“types” of nodes.
Describe some of the considerations when
mapping processes to nodes.
How do you model the Deployment View?
What modeling elements and diagrams are
used?
Object Oriented Analysis and Design 31
Exercise: Describe Distribution
Given the following textual information:
Network configuration (e.g., nodes and
their connections)
• What processes run on what nodes?
(continued)
Object Oriented Analysis and Design 32
Exercise: Use-Case Analysis
Produce the following:
• Deployment diagram depicting:
• Nodes
• Connections
• What processes run
on what nodes
Object Oriented Analysis and Design 33
Exercise: Review
Compare your Deployment Model
with those developed by the rest of
the class.
Have nodes and node connections
been modeled?
Have processes been identified and
assigned to nodes? Do the allocations
make sense?
Are the processes listed beneath the Payroll System
nodes in the Deployment diagram?
Object Oriented Analysis and Design 34