dcom
play

DCOM (Distributed Component Object Model) Overview Overview - PDF document

Distributed Computing Spring 1998 Introduction to DCOM DCOM (Distributed Component Object Model) Overview Overview Objectives Objectives What is DCOM? This introduction is about: DCOM Changing a local scheme (COM) into a


  1. Distributed Computing Spring 1998 Introduction to DCOM DCOM (Distributed Component Object Model) Overview Overview Objectives Objectives • What is DCOM? • This introduction is about: – DCOM – Changing a local scheme (COM) into a distributed one • Where does it come from? (DCOM) – Pitfalls in doing that • This introduction is not about: • What makes it interesting? – Programming using DCOM – COM/OLE/ActiveX/… – Comparison to other schemes (CORBA, Java RMI,…) What is DCOM? Distributed Component Object Model “Application-level protocol for object-oriented remote procedure calls.” IETF Internet Draft 5/96 “Object RPC” “Microsoft RPC Version 2.0” “COM with a longer wire” Microsoft Press Release 9/96 1

  2. Distributed Computing Spring 1998 Introduction to DCOM The Clipboard Clipboard Clipboard DDE CF Text 7KH TXLFN EURZQ OLE App2 IR[ MXPSHG RYHU WKH ��� OLE2 App1 7KH TXLFN EURZQ 7KH TXLFN EURZQ IR[ MXPSHG RYHU IR[ MXPSHG RYHU WKH ��� WKH ��� DDE (Dynamic Data Interchange) The Clipboard DDE OLE App2 App2 OLE2 App1 App1 7KH TXLFN 7KH TXLFN EURZQ EOXH EURZQ EOXH IR[ MXPSHG IR[ MXPSHG RYHU WKH ��� RYHU WKH ��� 2

  3. Distributed Computing Spring 1998 Introduction to DCOM OLE (Object Linking and Embedding) The Clipboard class information Clipboard DDE Class info OLE The quick brown fox jumped over the ... 7KH TXLFN EURZQ OLE2 IR[ MXPSHG RYHU App1 WKH ��� 7KH TXLFN EURZQ IR[ MXPSHG RYHU WKH ��� presentation data presentation data OLE2 The Clipboard • visible DDE – inter-application drag-and-drop – in-place editing OLE – … OLE2 • invisible – DDE gone – message-based model gone – COM 3

  4. Distributed Computing Spring 1998 Introduction to DCOM COM (Component Object Model) object • Specification describing ObjectQI() – what an object is pIUnknown pQueryInterface ObjectAddRef() – interface advertising pAddRef ObjectRelease() – object lifetime pRelease NameQI() pIName pQueryInterface NameAddRef() QueryInterface() pAddRef NameRelease() pRelease – inquire about interfaces pGetName GetName() used by particular object pSetName SetName() AddRef() TimeQI() Release() pITime pQueryInterface pAddRef TimeAddRef() – Manage reference pRelease counters for object. TimeRelease() pGetTime GetTime() COM/DCOM Architecture server client client application server implementation proxy stub channel • COM Clients • COM Servers – Proxies map object method – In-process invocations into calls to – local COM/DCOM objects – remote 4

  5. Distributed Computing Spring 1998 Introduction to DCOM Inproc (in-process) Servers • Object executes in same process space as client. • Server code implemented as DLL (dynamic linked library). • Object has complete access to client’s memory (and vice versa ) client A client B server.dll client application 1 client application 2 stub proxy proxy server implementation stub stub server implementation server implementation Local Servers • COM object is implemented in another process. • Memories are protected. client server Proxy DLL Stub DLL ... ... object object pGetTime GetTime() object pTimeServer GetTime() GetTime() 5

  6. Distributed Computing Spring 1998 Introduction to DCOM Remote Servers • Generally, remote servers are not different from local servers. • DCOM as “COM with a longer wire”. IPC across machine boundaries (DCE RPC) client server Proxy DLL Stub DLL ... ... object object pGetTime GetTime() object pTimeServer GetTime() GetTime() DCOM Support for Distribution • Security • Object References (binding) – representation & communication marshaled interface references – maintenance reference counting, pinging, delta pinging • Optimized interfaces – e.g. batched QueryInterfaces() calls • Management of causally related chains of calls • Non-coordinated versioning of interfaces 6

  7. Distributed Computing Spring 1998 Introduction to DCOM Issues in Supporting Distribution Example: Reference Counting • Used for resource management: manage objects’ lifetimes • Local case: reference counting AddRef() Release() • Reference counting is fragile: – Abnormal termination of programs – Distributed case: effects of communication over network Issues in Supporting Distribution Example: Reference Counting (cont) • Backup mechanism: Pinging – Periodically exchange “keepalive” messages • Scalability? • Large number of objects: Delta Pinging – Pinging of sets of objects ping(set_id, additions, deletions) • Large number of clients? 7

  8. Distributed Computing Spring 1998 Introduction to DCOM Want to know more? • Specification – N. Brown, C. Kindel, “Distributed Component Object Model Protocol -- DCOM/1.0,” IETF Networking Group Internet-Draft, Microsoft Corporation, May 2, 1996 • Programming – R. Grimes, “Professional DCOM Programming,” Wrox Press Ltd, 1997. • A dissenting voice – “Comparing ActiveX and CORBA/IIOP,” OMG CORBA NEWS, 4Q96, http://www.omg.org/… . 8

Recommend


More recommend