Sunteți pe pagina 1din 24

Lecture #4: COM/DCOM

CPSC608: Distributed Database Systems


February 1, 2000

Hoh In
Texas A&M University

1
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Today Goals
• Understand
– COM/DCOM technology: What, Why, How
• Discuss
– Issues of DCOM: promises and problems

2
CPSC608: COM/DCOM Copyright © 2000 Hoh In
1
2

3
4

3 * Source: Visibroker Progammer’s Guide


CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: IDL
• Interface
Definition
Language
• IDL is a purely
declarative
language
– Looks like a Java
Interface
– Independent from
any programming
language
• Basic Types
– No int type
– No pointer type

4 * Source: expede.com and Supplemental Reading #19-1


CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: What are considerations for
using CORBA?

• Security
• Performance
• Fault-Tolerance
• Scalability

5
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: How to Analyze Security in
CORBA
• The CORBA Security Service specification
– Identification and authentication: verify who they claim to be
– Authorization and access control: decide whether an object
can be accessed or not
– Security auditing: make users accountable for security
– Security of communication between objects
– Non-repudiation
• The CORBA ORB-SSL integration specification
• The CORBA/Firewall specification
– TCP/IP firewalls
– SOCKS v5.0 firewalls
– GIP proxy firewalls

6
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: How to Analyze
Performance in CORBA
• Factors having a strong influence on the performance
of a distributed system
– The number of remote method invocations that are made
within the system
– The amount of data that is transferred with each remote
method invocation
– The marshalling costs of the different IDL data types used by
the system

7
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: Fault Tolerance in CORBA
• Failures caused by factors as diverse as:
– Loss of processing resources - hardware or software
– Loss of logical and physical communication paths -- network
and connectivity failures
– Both transient and permanent failures in the application itself
• Approaches
– Prevention is better than cure
– Accept the fact that processes don’t stay up for ever
– Complex heterogeneous applications are combined from
many tool components
• CORBA Support
– Cold replication model
– Warm standby model
– Hot standby model
8
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: Scalability Issues in CORBA
• If a large number of client application is concurrently
executed using any CORBA system, consider:
– Will this single host have enough processing power to
support all these clients?
– Our manager server is a single point of failure. How will our
system handle a software or hardware fault?
– Our manager server process is limited to approximately
1000 connections. How will the remaining clients be able to
connect to this process?
• Approaches
– Replicating severs
– Closing connections
– Load balancing (e.g., using application partitioning or
replication mechanisms)
9
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Review: Beyond CORBA
• Unnecessary Heavy
Services
– Some application don’t
need all services that
CORBA provides. They
may degrade performance
without any gains.
– A solution approach:
Container = objects +
selected services
• Scalability of ORB
– global Naming protocol
– complex marshalling

10 * Source: Enterprise CORBA


CPSC608: COM/DCOM Copyright © 2000 Hoh In
Contents
• Review
• What is COM/DCOM?
• Why COM/DCOM?
• How does COM/DCOM work?
• What are considerations for using
COM/DCOM?

11
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Motivation: Component Software Problems

• Basic Interoperability
– How can developers create their own unique components,
yet be assured that these components will interoprate with
other components built by different developers?
• Versioning
– How can one system component be upgraded without
requiring all the system components to be upgraded?
• Language independence
– How can components written in different languages
communicate?
• Transparent cross-process interoperability
– How can we give developers the flexibility to write
components to run in-process or cross-process, using one
simple programming model?
12
CPSC608: COM/DCOM Copyright © 2000 Hoh In
What is COM/DCOM ?
• Common Object Model (by Microsoft) is a component
software architecture that:
– Defines a binary standard for component interoperability
– Is programming language-independent
– Is provided on multiple platforms (MS Windows, MS
Windows NT, MAC, UNIX)
– Provides for robust evolution of component-based
applications and systems
– Is extensible

13 * Source: Adapted from www.expede.com


CPSC608: COM/DCOM Copyright © 2000 Hoh In
What is COM?
• COM provides the foundation for higher-level
software services like those provided by OLE

14
CPSC608: COM/DCOM Copyright © 2000 Hoh In
What is OLE?
• Object Linking & Embedding (OLE)
– enables copy not only data, but also information about the
data source and the application that provided the data
– Copy (for example, graph):
• Presentation data, which was a metafile of the graph that the
destination application would show in its document
• Class information, which was an identifier of the application
used to provide or edit the data
• Native data (raw data itself), called “embedded object”, or a
reference, called “linked object”, to the file containing the raw
data

15
CPSC608: COM/DCOM Copyright © 2000 Hoh In
COM Key Features
• A binary standard for function calling between components.
• A provision for strongly-typed groupings of functions into
interfaces.
• A base interface providing:
• A way for components to dynamically discover the interfaces
implemented by other components.
• Reference counting to allow components to track their own lifetime
and delete themselves when appropriate.
• A mechanism to uniquely identify components and their
interfaces.
• A "component loader" to set up component interactions and
additionally in the cross-process and cross-network cases to
help manage component interactions.
16
CPSC608: COM/DCOM Copyright © 2000 Hoh In
COM: Binary Standard
• Define
– a standard way to lay out virtual function tables (vtables) in
memory, and
– a standard way to call functions through the vtables.

• What are the advantages?


17
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Interface IUnknown
• Every COM object must implement this interface
without exception
• Purpose:
– to provide the basis of all other interfaces
– to support garbage collection
• Unload components whose reference count is 0
• Functions of this Interface
– AddRef (void): increase reference count
– Release (void): decrease reference count
– QueryInterface(REFIID iid, void** ppvObject): delivers
interface pointer to a client to enable component interface to
be discovered at run-time

18
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Why COM?
• Communications between components, even across
process and network boundaries
• Shared memory management between components
• Error and status reporting
• Dynamic loading of components

19
CPSC608: COM/DCOM Copyright © 2000 Hoh In
What is DCOM?
• DCOM = COM + run-time infrastructure for
communicating across distributed systems
• Based on Microsoft RPC (Remote Procedure Calls)
– Which is compliant implementation of DCE RPC (Distributed
Computing Environment RPC) defined by OSF (Open
Software Foundation)

20
CPSC608: COM/DCOM Copyright © 2000 Hoh In
The DCOM Architecture
1. In-process
(COM)

2. Inter-Process
(COM)

3. Cross-Network
(DCOM)

21
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Location Independence

22
CPSC608: COM/DCOM Copyright © 2000 Hoh In
Contents
• Review
• What is COM/DCOM?
• Why COM/DCOM?
• How does COM/DCOM work?
• What are considerations for using
COM/DCOM?

23
CPSC608: COM/DCOM Copyright © 2000 Hoh In
What are considerations for using
COM/DCOM?
• Performance
– Size of applications
– Deployment of components across processors
• Security
– Protecting servers from users
– Protecting users from servers
– Protecting users from themselves
• Garbage Collection
– Garbage occurs when network is broken
– How to detect (in)active clients? Pinging
• Scalability
– isolate old clients/servers from newly added components
– dynamic interface query

24
CPSC608: COM/DCOM Copyright © 2000 Hoh In

S-ar putea să vă placă și