Distributed Component Object Model
Download
Report
Transcript Distributed Component Object Model
Distributed Object Computing
Weilie Yi
Dec 4, 2001
Why Distributed Computing
Inherently distributed:
Multi-user games, chat applications
Other applications having at least 2
parts:
C/S, for scalability and ease of deployment
Remote Procedure Call
allowing a program to make a
subroutine call on a remote machine.
Key Features of RPC
Request-reply
UDP or TCP transport
RPC/UDP vs. RPC/TCP
Standardized data representation
most programs block awaiting a reply
XDR protocol
Authentication
Object Oriented Solutions
DCOM
Object Management Group, Inc.
CORBA
Microsoft Corporation
Sun Microsystems, Inc.
Java 2 Enterprise Edition (J2EE)
DCOM
Distributed Component Object Model
An extension to COM (component
object model)
Object Oriented
Location transparency
What Is a Component
Packaging Perspective
a set of elements which can be reused as a
unit.
Service Perspective
a software entity which offers services
through interfaces
Integrity Perspective
a data integrity or encapsulation boundary
Component Categorization
Packaging
Service
Integrity
files,
documents,
directories,
source code files,
class libraries,
templates,
tables,
executables,
dll’s
database services,
operating system
services,
function libraries,
system utilities,
individual API
functions,
COM classes
databases,
operating systems,
frameworks,
ActiveX controls,
some COM
classes,
Java Applets,
applications,
complete APIs
DCOM Architecture
In the same process
Fast, direct function
calls
Client
On the same machine
Fast, secure IPC
Secure, reliable and
flexible DCE-RPC
based DCOM protocol
Client Process
Client
Client Machine
Across machines
Client
Component
Server Process
COM
Component
Server Machine
DCE
COM RPC COM
Component
Interface and Component
COM allows clients to invoke services
provided by COM-compliant components
(COM objects)
Client
Application
Interface
Pointer
Object
An Example of Interface
A COM object can support any number of
interfaces.
An interface provides a grouped collection of
related methods
set_current_time
IClock
get_current_time ITimer
Clock
Object
IAlarm
Methords
Interfaces
Component
Three Methods for Accessing
COM Objects
Cross-process Communication
1.
2.
3.
COM creates the
"stub" in the object's
server process
COM creates the
"proxy" in the client's
process, and connects
it to the stub
The proxy supplies the
interface pointer to the
client
Where Is the Server?
1.
2.
3.
4.
“Create Object”
Locate Implementation
Get object interface pointer, return to client
Call interface members
Client
Application
(4)
Object
Server
(3)
(1)
(2)
COM
DCOM: Design Issues (1)
Components and Reuse
Build software from parts, not from scratch
Location Independence
Services used in a standard way, regardless of
location
Language Neutrality
Virtually any language can be used to create DCOM
components, which can be used from even more
languages
DCOM: Design Issues (2)
Connection Management
Manages connections to components, by
maintaining a reference count on each
component.
symmetric network protocol and
programming model.
DCOM: Design Issues (3)
Scalability
Symmetric Multiprocessing (SMP)
Single processor -> multiprocessor
Flexible Deployment
This computer -> other computers
Evolving Functionality: Versioning
Present -> Past, present, and future
Scalability Examples (1)
Parallel Deployment
Scalability Examples (2)
Pipelining
Scalability Examples (3)
Robust Versioning
Functionality is grouped into interfaces in the DCOM
programming model
Old interface:
old c old s
new c old s
New interface
old c new s
new c new s
DCOM: Design Issues (4)
Protocol Neutrality
Clients
C
O
M
TCP, UDP
IPX, SPX
HTTP
C
O
M
…
Client Machine
Server Machine
COM
Object
DCOM: Design Issues (5)
Platform Neutrality
Sun Solaris (Sparc) 2.5
HP/UX
COM
COM
RC
COM
Client
DCOM
Q3’97
Q4’97
Digital Unix 4.0 (Alpha)
RC
COM
Q3’97
Digital Open VMS
IBM MVS 5.2.2 (OS390)
Siemens Nixdorf SINIX
COM
COM
Q1’98
IBM OS/400
COM
H1’98
H1’98
Linux 2.0 (Intel)
H1’98
IBM AIX
COM
COM
BETA
COM
Q4’97
SCO UnixWare
H1’98
COM
H1’98
DCOM: Design Issues (6)
Performance
Bandwidth and Latency
Security
Load Balancing
Fault Tolerance
Ease of Deployment
Platform Neutrality
Seamless Integration with Other
Internet Protocols
DCOM Vs. RPC
DCOM
Reusability
Maintainability
Adaptability
RPC
Portability
Flexibility
Complexity
Summery
Brief RPC Review
Why use DCOM
DCOM Architecture
DCOM Design Issues
DCOM vs. RPC