COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms.

Slides:



Advertisements
Similar presentations
Qisheng Hong Yani Mulyani Paul Visokey
Advertisements

Threads, SMP, and Microkernels
COM vs. CORBA.
Intro to COM What is it and how do I use it?. Objectives Teach the fundamentals of COM. Understand the reason for using it. Learn to make a simple in-process.
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
OPC - OLE For Process Control Paul C. Shafer Bently Nevada Corp.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
CSE3030Lecture 11 Know Your User The First Slogan.
1 COM/DCOM n Part of Project Presentation (Concept Outline)
Active X Microsoft’s Answer to Dynamic Content Reference: Using Active X by Brian Farrar QUE
Object Based Operating Systems1 Learning Objectives Object Orientation and its benefits Controversy over object based operating systems Object based operating.
Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.
1 DirectX CIS 487/587 Bruce R. Maxim UM-Dearborn.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Intro to COM What is it and what can it do for me?
DCOM Technology. What is DCOM? DCOM is just COM with a longer wire DCOM is just COM with a longer wire DCOM extends COM to support communication among.
1 Modular Software/ Component Software 2 Modular Software Code developed in modules. Modules can then be linked together to produce finished product/program.
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
CHAPTER 3 The Component Object Model and DirectX © 2008 Cengage Learning EMEA.
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
What are Webservices?. Web Services  What are Web Services?  Examine important Web Services acronyms (UDDI, SOAP, XML and WSDL)  What are the benefits.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Internet, intranet, and multimedia database processing l Database processing across local and wide area networks l Alternative architectures for distributing.
Fundamentals of Database Chapter 7 Database Technologies.
Threading Models in Visual Basic Language Student Name: Danyu Xu Student ID:98044.
Android for Java Developers Denver Java Users Group Jan 11, Mike
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Microsoft’s Distributed Component Object Model (DCOM) Jim Ries Updated 10/5/1999 A semi-technical overview.
COM/DCOM Implementation Basics of: Object creation and access Object Reuse Interface referencing.
OLE / COM Helia / Martti Laiho Sources: MSDN Kraig Brockschmidt: Inside OLE Orfali-Harkey-Erwards: Client/Server Survival Guide.
COM and DCOM CS 562 February 27, Motivation Data Analyzer Resource Monitor int compute (…) { } int compute (…) { } Data Analyzer int compute (…)
Introduction to COM and DCOM Organizational Communications and Technologies Prithvi N. Rao H. John Heinz III School of Public Policy and Management Carnegie.
1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong. With Thanks to.
Information Management NTU Interprocess Communication and Middleware.
A COM implementation of the KSpace A ‘Knowledge Space prototype’ by Santhosh CST
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Introduction to COM and ActiveX Controls. What is an object? In the Fayad sense of the word.
In the name of Allah The Proxy Pattern Elham moazzen.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Transparent Mobility of Distributed Objects using.NET Cristóbal Costa, Nour Ali, Carlos Millan, Jose A. Carsí 4th International Conference in Central Europe.
DISTRIBUTED COMPUTING. Computing? Computing is usually defined as the activity of using and improving computer technology, computer hardware and software.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct.
COM / DCOM Xiaolan Lu Mingzhen Wang Dong Xie. Why COM / DCOM?  Challenges facing the software industry  Component software provides a solution  General.
Seminarium on Component-based Software Engineering Feraaz Imami LIACS – Leiden University Fall 2005 Component Object Model (COM)
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Internet Computing Module II. Syllabus Creating & Using classes in Java – Methods and Classes – Inheritance – Super Class – Method Overriding – Packages.
Java Distributed Computing
Component Object Model
Component Object Model
Microsoft’s Distributed Component Object Model (DCOM)
Java Distributed Computing
Out-of-Process Components
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Java History, Editions, Version Features
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Out-of-Process Components
Presented By Justas Raslanas
Lecture 7 ATL and Out-of-Process Components
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms (COM, DCOM, MTS) Know where to go, what to do, next Not Be Able To: Start programming COM (find a technical tutorial for that)

“Framework for runtime objects” OOP, plus ways of interacting with the objects at runtime Need to be able to create, inspect, use, destroy them In order to use them, must be able to ask them about what they do, ask them to do things Extensible: doesn’t require any more changes to COM itself (i.e., there is no COM 2.0, 3.0,etc) Versioning: figuring out which version of an object you want (at runtime) Language independent: Strongly influenced by C++, but usable in C, VB, Java, plus anything else that you want to do the work for (Python?) Middleware – doesn’t really do any app. level work, but provides the ‘pipes’ for app.s to do work Some Cool Features:

History: Started with OLE 1.0: Object Linking and Embedding, or “How do I drop an Excel spreadsheet into Word?” Worked, but badly, OLE didn’t look like COM OLE 2.0: OLE built over COM, and so version number stops here ActiveX: COM is cool, but the Internet showed up, MS wrote up a collection of COM stuff specifically oriented at Internet use: how to download, sign, install COM objects. Thus, COM is the framework/architecture/infrastructure over which OLE (business stuff), and ActiveX (Internet stuff) is built

Example of a COM session CRandom Server Client Server supports the creation of random numbers, Client wants a random number 1) Client creates an instance of CRandom (via CoCreateInstance system call) COM 2) COM locates the server, if not already running, COM starts it, asks server to create an instance of CRandom 3) CRandom server creates an instance of CRandom, and hands a pointer back to the client Newly Created object

Example of a COM session (con’t) CRandom Server 4) Client can interrogate the object about what it can do, then invoke methods on the object. Client 5) Client finishes using the object, then calls the Release method to tell the object that the client is finish. 6) At this point, the object deletes itself, and the server figures out if it can be unloaded. If so, either it or COM unloads it from memory. CRandom object

More Technical Overview: Phases: Location: How to name objects, how does COM know where the servers are to be found? Creation: How does one create individual instances of an object? Communication: How do the objects talk to each other in a standard way? Teardown: How to manage destruction, especially since multiple client may be using the same object simultaneously?

Naming Objects: Decentralized, guaranteed to be unique names UUID: Universally Unique IDentifier GUID: Globally Unique Identifier Guidgen tool is provided to make these for you. How does COM Locate stuff? Registry: an OS level DB that holds (among other things) locations of code info about the code, etc Location Phase:

Once request to create the object has been given to COM, and it’s figured out where the object server is, it starts the server (if it hasn’t been started yet), and asks it to create another instance of the object via…. Class Factory: Another COM class, except that it has no GUID associated with it (uses the GUID of the object it creates), responsible for creating new objects. Note that this process differs in different languages (e.g., C++ vs. C). Since whoever writes the COM server also writes the Class Factory, this also gives some power in being able to control how objects are created -- could create a single instance & share among the clients, or create lots and lots, etc. Creation Phase:

Interfaces: All communication between clients and objects are done through INTERFACES. To the client, calling any method on any object is exactly the same, except for arguments and return values. Thus there is a standard way of getting clients to communicate with objects. Every interface derives from IUnknown, which contains three methods: QueryInterface: Does object support interface X? AddRef: Tell object that something else is using interface Release: Tell object that something is finished using interface Code to marshal arguments between client and object may be needed (e.g., cross process) Communication Phase:

How does COM know when to deallocate stuff? It doesn’t -- the objects themselves know, by keeping a reference count of clients. Each time a client asks for an interface (or calls AddRef), this count gets bumped up. Each time the client calls the Release() method on an interface, the reference count get decremented. When the reference count is zero, the object can deallocate itself (i.e., delete this; ) Recurrent theme objects keep refcounts to know when to deallocate, object servers keep reference counts on number of outstanding objects to know when they can be shut down Within the IClassFactory interface, the LockServer method keeps a reference count so that the object server WON’T shut down, etc Teardown Phase:

Containment/Aggregation – inheritance Threading -- couple of different threading models IDispatch Run time use of interfaces & methods Used by interpreted/macro languages (Java, VB) so they don’t have to recompile to use a new interface Uses Type Libraries, which contain descriptions of methods, the arguments, etc Other Issues:

DCOM (Distributed COM) How to instantiate / use components residing on different computers? Also needs to worry about security, more efficient ways of asking about interfaces, etc MTS (MS Transaction Server ) Runtime environment layered over DCOM to support scalable, fault tolerant apps COM+ (not yet released) Runtime environment, makes it easier to use COM Beyond that, ??? Recent Developments

Books Inside COM Professional DCOM programming Essential COM My Web page mwp3/COM_Tutorial/index.html MS web site Mailing lists Each other in Quintet– ask around! Further References, Resources: