Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 COM/DCOM n Part of Project Presentation (Concept Outline)

Similar presentations


Presentation on theme: "1 COM/DCOM n Part of Project Presentation (Concept Outline)"— Presentation transcript:

1 1 COM/DCOM n Part of Project Presentation (Concept Outline)

2 2 Component Object Model (COM) and DCOM

3 3 Overview u History of COM u Introduction to the COM Specification u DCOM Technical Overview u Load balancing u Microsoft Transaction Server u Monikers u DCOM vs CORBA u Problems and the future of COM

4 4 The Evolution of COM u Object Linking and Embedding (OLE1) u Object Model (OLE2) (COM standard) u ActiveX (Internet applications) u Distributed interNet Applications (COM+)

5 5

6 6 COM Specification Foundations u Reusable component objects u Binary standard for interoperability u “True” system object model u Provides distributed capabilities

7 7 Object Interoperability u Stable versioning u Rapid object interaction u Location transparency u Language independence

8 8 “True” System Object Model u Globally unique identifiers (GUID) u Reusability and inheritance u Single programming model u Life-cycle encapsulation u Object-level security

9 9 Reusability Mechanisms u Containment/Delegation u Aggregation

10 10

11 11

12 12 Objects and Interfaces

13 13

14 14 Interfaces u An interface is a named table of function pointers (methods) u An interface is not a class u An interface is not a COM component u COM clients only interact with pointers to interfaces u COM components can implement multiple interfaces u Interfaces are strongly typed u Interfaces are immutable

15 15 Object Creation and Access IUnknown and QueryInterface

16 16 Object Creation API u CoCreateInstanceEx : creates a single uninitialized object associated with the given CLSID on a specified remote machine. u CoCreateInstanceEx makes it possible to specify an array of structures, each pointing to an interface identifier (IID) on input, and, on return, containing (if available) a pointer to the requested interface and the return value of the QueryInterface call for that interface. This permits fewer round trips between machines. u The CoCreateInstanceEx helper function encapsulates three calls: first, to CoGetClassObject to connect to the class object associated with the specified CLSID, specifying the machine location of the class; second, to IClassFactory::CreateInstance to create an uninitialized instance, and finally, to IClassFactory::Release, to release the class object. CoGetClassObject IClassFactory::CreateInstance

17 17 Connectable Objects and Multicasting u Connection point implementation using Advise() HRESULT Advise( IUnknown *pUnk,//Pointer to the client’s advise sink DWORD *pdwCookie//Pointer to the connection point identifier used by Unadvise);

18 18

19 19 DCOM Architecture

20 20 Marshalling u Static balancing using a referral component u Dynamic load balancing u Marshalling (remoting): standard and custom Use custom marshalling when: - a remote object itself is a proxy to some other object - the object’s state is in shared memory (e.g. structured storage) - an object’s state is immutable (e.g. Monikers) - batching remote calls into one to optimize performance

21 21 Referral Batching

22 22 Custom Marshalling

23 23 Scalability and Performance

24 24 Microsoft Transaction Server u MTS shelters developers from complex server issues such as concurrency, resource pooling, security, and context management u MTS provides run-time services for components u MTS ensures that transactions are atomic, consistent, have proper isolation and are durable u MTS components are those that execute in the MTS run-time environment

25 25 Monikers u A moniker is a name for a specific object instance, that is, one particular combination of CLSID(GUID) and persistent data u Monikers are themselves COM objects which support an interface called Imoniker u Each moniker has its own persistent data; which includes all it needs to instantiate and initialize the single object instance which it identifies

26 26 DCOM vs CORBA u Layer comparisons u u Conclusions and comments

27 27 Summary Table

28 28 The Future of COM u Active Directory Services u What is DNA? u Implementation problems u Summary

29 29 COM+ Features u Transactions and transaction management u Databinding u Persistence u Load balancing u Security u In-memory database u Event infrastructure u Ubiquitous type description u Dynamic invocation u Garbage collection u Interception

30 30 References u The Component Object Model Specification(Introduction) Draft Version 0.9, October 24, 1995 Microsoft Corporation and Digital Equipment Corporation Copyright © 1992-95 Microsoft Corporation. http://www.microsoft.com/oledev/olecom/title.htm u DCOM Technical Overview © 1996 Microsoft Corporation. All rights reserved http://www.microsoft.com/activex/complus-f.htm u DCOM and CORBA Side by Side, Step by Step, and Layer by Layer September 3, 1997 P. Emerald Chung Yennun Huang Shalini Yajnik Bell Laboratories, Lucent Technologies, Murray Hill, New Jersey Deron Liang Joanne C. Shih Chung-Yih Wang Institute of Information Science, Academia Sinica, Republic of China, Taiwan Yi-Min Wang, AT&T Labs, Research, Florham Park, New Jersey u Distributed Component Object Model (DCOM) Binary Protocol Nat Brown and Charlie Kindel, Network Working Group Microsoft Corporation, May 1996, Updated: November 1996 http://premium.microsoft.com/msdn/library/techart/f365/f36c/f380/d390/s1305c.htm u Inside OLE, 2nd Edition Kraig Brockschmidt Microsoft Press Redmond WA 1995 u The COM Programmer's Cookbook (great implementation guide) Crispin Goswell Microsoft Office Product Unit, Spring 1995, Revised: September 13, 1995 http://premium.microsoft.com/msdn/library/techart/f365/f36c/f380/d390/s8b24.htm


Download ppt "1 COM/DCOM n Part of Project Presentation (Concept Outline)"

Similar presentations


Ads by Google