1 / 10

COM/DCOM Implementation

COM/DCOM Implementation. Basics of: Object creation and access Object Reuse Interface referencing. 4 Basic Problems. Basic interoperability – ensuring different vendor components can interoperate Version Control – upgrading separate components without upgrading entire system

ingrid
Download Presentation

COM/DCOM Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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

More Related