COMDCOM Implementation - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

COMDCOM Implementation

Description:

Object Creation in DCOM ... Interface referencing (DCOM) DCOM has made an extension to definition of a new primitive data type. ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 11
Provided by: cstp1
Category:

less

Transcript and Presenter's Notes

Title: COMDCOM Implementation


1
COM/DCOM Implementation
  • Basics of
  • Object creation and access
  • Object Reuse
  • Interface referencing

2
4 Basic Problems
  • Basic interoperability ensuring different
    vendor components can interoperate
  • Version Control upgrading separate components
    without upgrading entire system
  • Language independence different components can
    be developed in different languages
  • Transparency transparency across processes

3
Creating an Object
  • Invoke an API to create the new object -
    CoCreateInstance
  • COM locates object implementation and initiates
    the server process
  • Object created and pointer to interface returned
  • Object has to be initialized once it is created -
    load data from file, stream or any other data
    store.
  • Alternatively, use monikers.

4
Accessing Objects
  • In-process server - client and server execute in
    the same process.
  • Local Object Proxy - lightweight Remote Procedure
    Call.
  • Remote Object Proxy - DCOM is used for this.
    Requires marshalling and unmarshalling of data

5
Object Reuse
  • Two forms
  • Containment - one object holds an exclusive
    reference to another (outer object holds and
    inner object) But performance problems can arise
    due to hierarchies in containment.
  • Aggregation - defined in DCOM. Need collaboration
    between inner and outer objects. Mainly used for
    nested constructions.
  • Both have to maintain transparency.

6
Interface referencing
  • Specified by IDL, have a unique IID.
  • Provides a small set of methods.
  • COM objects can implement multiple interfaces.
  • They can be derived from other interfaces using
    concept of inheritance - most inherit from
    IUnknown, also from IDispatch and IPersist.

7
Interface referencing (contd..)
  • IUnknown has three methods
  • QueryInterface
  • Addref
  • Release
  • Addref and Release are reference counting
    methods.

8
Interface referencing (contd..)
  • QueryInterface - determines if interface is
    supported by object (at runtime)
  • If it is, pointer to the interface is returned. ,
    else returns an error.
  • Invoked when application needs a function of an
    object.
  • This mechanism is provided by the Component
    Object library

9
Object Creation in DCOM
  • Enhanced version of mechanism in COM - allows
    objects to be created on different machines.
  • Library to needs to know server name (on which
    object to be created) and CLSID.
  • 2 mechanisms for providing clients to indicate
    server name for object creation
  • Fixed configuration in system registry
  • Remote server name can be explicitly defined
  • Alternatively, use monikers.

10
Interface referencing (DCOM)
  • DCOM has made an extension to definition of a new
    primitive data type. This is the interface
    reference to OBJREF.
  • Variations
  • NULL
  • STANDARD
  • CUSTOM
  • HANDLER
Write a Comment
User Comments (0)
About PowerShow.com