1 / 39

COM vs. CORBA

COM vs. CORBA. What are They?. COM: The Component Object Model is a software architecture that allows programs to be built from parts from different software producers.

mariko
Download Presentation

COM vs. CORBA

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 vs. CORBA

  2. What are They? • COM: The Component Object Model is a software architecture that allows programs to be built from parts from different software producers. • CORBA: The Common Object Request Broker Architecture is an open distributed object computing infrastructure that is being standardized by the Object Management Group (OMG).

  3. COM • Designed by Microsoft in 1993 • Primarily used with Windows • It is being replaced with Microsoft .NET although it can be used with .NET

  4. COM • COM provides the framework for interoperability and reusability of distributed objects. • Programmers can use different components from different vendors that communicate through COM. • Makes maintaining systems easier.

  5. COM • The main technologies that operate on the COM system are OLE, ActiveX, and MTS. • OLE aspects include compound documents, custom controls, inter-application scripting, data transfer, etc. • ActiveX allows programs to be web based. • MTS provides advanced features to allow COM to be used in enterprise solutions.

  6. COM

  7. What does COM do? • Defines a binary standard for component interoperability • Is Language-independent • Can support multiple platforms • Allows for component systems to grow • Is extensible

  8. What does COM do? • Communications between components, even across process and networks. (dcom) • Shared memory management between components • Error and status reporting • Dynamic loading of components

  9. How does COM do it? • The Binary structure • If the compiler can reduce language structures down to the specified binary representation. • This allows the communication at the binary level

  10. Vtables • COM defines a standard way to lay out virtual function tables in memory and a standard way to call functions through vtables. • Through this any language that can call functions through pointers can be used with COM. • This allows the sharing of resources by using multiples of an object, therefore reducing the memory requirement.

  11. Vtable

  12. COM Interfaces • An interface is not a class, it is just a group of related functions and is how components communicate. • Clients can only use interface pointers which abstract all functions. The only way an interface can be used is if it has a pointer. • A component usually has more than one interface because it has multiple services. • Interfaces never change, to make sure that all version can work together. If a new components is added it requires a new interface

  13. COM interface benefits • The functionality in applications to grow over time • All COM objects support QueryInterface which allows the making of more interfaces without changing the binary compatibility with existing code. • This also helps guarantees backward compatibility because of unchangeable interfaces.

  14. COM Interface benefits • Fast interaction because the calls are simply two memory pointers. The difference between a COM call and direct function call is negligible. • It allows for fast negotiation of interfaces because it is done in groups.

  15. COM Interface benefits • Interface reusability allows for code to be reused easily and makes it easy for programmers to remember a specific interface. • Allows for multiple higher level languages to be used. It breaks down the languages into a binary standard.

  16. COM Interface benefits • COM handles all calls to remote processes including network calls. COM will make the remote procedure call so that no additional code is required to make a remote function call. This functionality was added with the release of DCOM.

  17. COM Interface Benefits • COM creates a unique identifier that is a 128-bit integer so that there will be a way to correctly identify a component across a network of millions of components.

  18. COM Client/Server Model • The interaction between components creates a Client/Server model • The code that requests a function from a component is considered the client and the component that provides the function is considered the server. • This allows for a crash at the server level but will keep the client operating. • Clients can also represent themselves and act as a peer to peer service.

  19. COM Client/Server Model • There are 3 different types of servers • “in-process” means that the requested information is in the same process • “local” means that the location of the component is running on the same machine but in a different process • “remote” means that the component is on a different machine on the network.

  20. COM: IUnknown • IUnkown is a special interface made up of AddRef, Release, and QueryInterface. • AddRef and Release keep track of the objects connected to the component. • QueryInterface allows clients to determine if it can use a given interface with a component. It also retrieves the interface pointers.

  21. COM: COL • The Component Object Library contains much of the work of the COM system. • It maintains all of the GUID’s • It handles loading requested components by calling what the component needs.

  22. COM: Problems • Implementation Inheritance can inherit some of its functionality from another component • The problem is this is not clearly defined. If a parent or child component is changed it my mess up other components related to it.

  23. COM: Problems • Cost for using COM on Microsoft products is very low, but for non Microsoft products is very expensive. • COM doesn’t make distributed any easier it just redirects where this process is handled.

  24. CORBA • It is maintained by the Object Management Group, which is comprised of nearly all the major software developers.

  25. CORBA • CORBA handles network programming tasks such as object registration, location, and activation, request demultiplexing, framing and error-handling, etc. • Each service that an object provides is given by its interface which is defined by Interface Definition Language (IDL). • Object Request Broker (ORB) handles requests and delivers them from objects to the clients.

  26. CORBA: ORB • The ORB is a distributed service that sends requests to remote objects, finds that object and waits for it’s reply and gives it to the client. • The client is hidden from this process as it same method as calling a local object.

  27. CORBA: ORB • The ORB also maintains the Interface Repository (IR) which contains the IDL. • On the server side ORB regulates the running objects by turning on or off programs as they are needed.

  28. CORBA: DII • The Dynamic Invocation Interface are interpreted at run time an not compiled. • This allows the invocation of an operation of a new type. • There must be a way to retrieve the necessary information to use the DII.

  29. CORBA: Stubs • Stubs are what the client uses to interface with the ORB. • A client might invoke hundreds of instances but a new stub is created when the instance is of a different type

  30. CORBA: ORB Interface • It provides access to every ORB service except for client requests which go through the stubs and object requests which are done through the POA.

  31. CORBA: ORB Implementaion • The client-side architecture is simple • This allows for all scalability options are on the server side. • The ORB doesn’t require code to be in a specific spot so that ORBs can spread their work across vast networks or keep it all in one computer.

  32. CORBA: Interoperability • CORBA specifies an API to use which creates the ability to use code with different vendor’s with little effort. • CORBA 2.0 added IIOP network protocol that allowed communication of CORBA products over TCP/IP connections. • IIOP is used by other systems so that interoperability is possible with non-CORBA systems.

  33. CORBA: Services • These services support the distributed objects. • They operate on the ORB and have IDL interfaces • These include naming, events, transactions, properties, etc.

  34. CORBA: IDL • The Interface Definition Language doesn’t have a programming language but it maps to popular programming languages. • The IDL defines the interface very strictly so that it can easily pass requests between different programming language objects. • It is so strict that even if an ORD is different is can still easily communicate • The other objects are encapsulated so that a client can’t see other objects code or data.

  35. CORBA: Problems • CORBA calls are all the same so the simplest call must be the same as the most complex call. There is no limit on the complexity. • Since CORBA is regulated by the very large OMG, it is difficult to create standards because of the many different opinions.

  36. Questions?

More Related