distributed object computing weilie yi dec 4, 2001

25
Distributed Object Distributed Object Computing Computing Weilie Yi Dec 4, 2001

Post on 20-Dec-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Distributed Object ComputingDistributed Object Computing

Weilie YiDec 4, 2001

Why Distributed ComputingWhy Distributed Computing

Inherently distributed:Inherently distributed: Multi-user games, chat applicationsMulti-user games, chat applications

Other applications having at least 2 Other applications having at least 2 parts:parts: C/S, for scalability and ease of deploymentC/S, for scalability and ease of deployment

Remote Procedure CallRemote Procedure Call

allowing a program to make a allowing a program to make a subroutine call on a remote machine. subroutine call on a remote machine.

Key Features of RPCKey Features of RPC

Request-replyRequest-reply most programs block awaiting a replymost programs block awaiting a reply

UDP or TCP transportUDP or TCP transport RPC/UDP vs. RPC/TCP RPC/UDP vs. RPC/TCP

Standardized data representationStandardized data representation XDR protocolXDR protocol

AuthenticationAuthentication

Object Oriented SolutionsObject Oriented Solutions

DCOMDCOMObject Management Group, Inc.Object Management Group, Inc.

CORBACORBAMicrosoft CorporationMicrosoft Corporation

Sun Microsystems, Inc.Sun Microsystems, Inc.  Java 2 Enterprise Edition (J2EE) Java 2 Enterprise Edition (J2EE)

DCOMDCOM

Distributed Component Object ModelDistributed Component Object Model An extension to COM (component An extension to COM (component

object model)object model)

Object OrientedObject Oriented Location transparencyLocation transparency

What Is a ComponentWhat Is a Component

Packaging PerspectivePackaging Perspectivea set of elements which can be reused as a a set of elements which can be reused as a

unit. unit.

Service PerspectiveService Perspectivea software entity which offers services a software entity which offers services

through interfacesthrough interfaces

Integrity PerspectiveIntegrity Perspectivea data integrity or encapsulation boundarya data integrity or encapsulation boundary

Component CategorizationComponent Categorization

PackagingPackaging ServiceService IntegrityIntegrity

files, files,

documents,documents,

directories,directories,

source code files,source code files,

class libraries,class libraries,

templates, templates,

tables,tables,

executables, executables,

dll’sdll’s

database services,database services,

operating system operating system services,services,

function libraries,function libraries,

system utilities,system utilities,

individual API individual API functions,functions,

COM classesCOM classes

databases, databases,

operating systems,operating systems,

frameworks, frameworks,

ActiveX controls, ActiveX controls,

some COM some COM classes,classes,

Java Applets,Java Applets,

applications,applications,

complete APIscomplete APIs

ClientClient ComponentComponent

In the same process In the same process Fast, direct function Fast, direct function callscalls

ClientClient ComponentComponentCOMCOM

Client ProcessClient Process Server ProcessServer Process

On the same machineOn the same machineFast, secure IPCFast, secure IPC

Across machinesAcross machinesSecure, reliable and Secure, reliable and flexible DCE-RPCflexible DCE-RPCbased based DCOMDCOM protocol protocol

COMCOMDCERPC

ClientClient

Server MachineServer MachineClient MachineClient Machine

COMCOM ComponentComponent

DCOM ArchitectureDCOM Architecture

Interface and ComponentInterface and Component

COM allows clients to invoke services COM allows clients to invoke services provided by COM-compliant components provided by COM-compliant components (COM objects)(COM objects)

InterfacePointer

ClientApplication Object

An Example of InterfaceAn Example of Interface A COM object can support any number of A COM object can support any number of

interfaces. interfaces. An interface provides a grouped collection of An interface provides a grouped collection of

related methodsrelated methods

ClockObject

IClock

ITimer

IAlarm

ComponentInterfacesMethords

set_current_time

get_current_time

Three Methods for Accessing Three Methods for Accessing COM ObjectsCOM Objects

Cross-process CommunicationCross-process Communication

1.1. COM creates the COM creates the "stub" in the object's "stub" in the object's server processserver process

2.2. COM creates the COM creates the "proxy" in the client's "proxy" in the client's process, and connects process, and connects it to the stubit to the stub

3.3. The proxy supplies the The proxy supplies the interface pointer to the interface pointer to the clientclient

Where Is the Server?Where Is the Server?

1.1. ““Create Object”Create Object”

2.2. Locate ImplementationLocate Implementation

3.3. Get object interface pointer, return to clientGet object interface pointer, return to client

4.4. Call interface membersCall interface members

Server

ObjectClientApplication

(1) (2)

(3)

(4)

COM

DCOM: Design Issues (1)DCOM: Design Issues (1)

Components and ReuseComponents and ReuseBuild software from parts, not from scratch

Location IndependenceLocation IndependenceServices used in a standard way, regardless of Services used in a standard way, regardless of

locationlocation

Language NeutralityLanguage NeutralityVirtually any language can be used to create DCOM Virtually any language can be used to create DCOM

components, which can be used from even more components, which can be used from even more languageslanguages

DCOM: Design Issues (2)DCOM: Design Issues (2)

Connection ManagementConnection Management Manages connections to components, by Manages connections to components, by

maintaining a reference count on each maintaining a reference count on each component. component.

symmetric network protocol and symmetric network protocol and programming model. programming model.

DCOM: Design Issues (3)DCOM: Design Issues (3)

ScalabilityScalability Symmetric Multiprocessing (SMP)Symmetric Multiprocessing (SMP)

Single processor -> multiprocessorSingle processor -> multiprocessor

Flexible DeploymentFlexible DeploymentThis computer -> other computersThis computer -> other computers

Evolving Functionality: VersioningEvolving Functionality: VersioningPresent -> Past, present, and futurePresent -> Past, present, and future

Scalability Examples (1)Scalability Examples (1) Parallel DeploymentParallel Deployment

Scalability Examples (2)Scalability Examples (2) Pipelining Pipelining

Scalability Examples (3)Scalability Examples (3) Robust VersioningRobust Versioning

Functionality is grouped into interfaces in the DCOM Functionality is grouped into interfaces in the DCOM programming modelprogramming model

Old interface:old c old snew c old s

New interfaceold c new snew c new s

DCOM: Design Issues (4)DCOM: Design Issues (4) Protocol NeutralityProtocol Neutrality

TCP, UDPTCP, UDP

IPX, SPXIPX, SPX

HTTPHTTP

Server MachineServer MachineClient MachineClient Machine

COM

……

ClientsClients

COM

COMCOMObjectObject

DCOM: Design Issues (5)DCOM: Design Issues (5) Platform NeutralityPlatform Neutrality

COMClient

Linux 2.0 (Intel)

BETA COM

HP/UX

COM

Digital Open VMS

COM

Siemens Nixdorf SINIX

COM

SCO UnixWare

COM

Digital Unix 4.0 (Alpha)RC

COM

IBM MVS 5.2.2 (OS390)

COM

IBM OS/400

COM

IBM AIX

COM

DCOM

Sun Solaris (Sparc) 2.5

RC COM Q3’97

Q3’97

Q1’98

H1’98

H1’98 H1’98

Q4’97

H1’98

H1’98

Q4’97

DCOM: Design Issues (6)DCOM: Design Issues (6) PerformancePerformance Bandwidth and LatencyBandwidth and Latency SecuritySecurity Load BalancingLoad Balancing Fault ToleranceFault Tolerance Ease of DeploymentEase of Deployment Platform NeutralityPlatform Neutrality Seamless Integration with Other Seamless Integration with Other

Internet ProtocolsInternet Protocols

DCOM Vs. RPCDCOM Vs. RPC

DCOMDCOM ReusabilityReusability MaintainabilityMaintainability AdaptabilityAdaptability

RPCRPC PortabilityPortability FlexibilityFlexibility ComplexityComplexity

SummerySummery

Brief RPC ReviewBrief RPC Review Why use DCOMWhy use DCOM DCOM ArchitectureDCOM Architecture DCOM Design IssuesDCOM Design Issues DCOM vs. RPCDCOM vs. RPC