C O R B A Unit 4


Published on

Published in: Technology
1 Comment
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

C O R B A Unit 4

  1. 1. Unit – 4
  2. 2. Distributed Systems <ul><li>The Beginning: Monolithic Systems and Mainframes </li></ul><ul><li>The Revolution: Client/Server Architecture </li></ul><ul><li>The Evolution: Multitier Client/Server </li></ul><ul><li>The Next Generation: Distributed Systems </li></ul>
  3. 3. The Beginning: Monolithic Systems and Mainframes
  4. 4. The Revolution: Client/Server Architecture
  5. 5. The Evolution: Multitier Client/Server
  6. 6. The Next Generation: Distributed Systems <ul><li>Exposes all functionality of the application as objects, each of which can use any of the services provided by other objects in the system, or even objects in other systems. </li></ul><ul><li>The architecture can also blur the distinction between &quot;client&quot; and &quot;server&quot; because the client components can also create objects that behave in server-like roles. </li></ul><ul><li>The distributed system architecture provides the ultimate in flexibility. </li></ul><ul><li>Distributed systems are really multitier client/server systems in which the number of distinct clients and servers is potentially large . </li></ul>
  7. 8. Purpose of CORBA <ul><li>CORBA Provides a Standard mechanism for defining the interfaces between components as well as some tools to facilitate the implementation of those interfaces using the developer’s choice of languages. </li></ul><ul><li>Two features that CORBA provides are: </li></ul><ul><ul><li>Platform Independence </li></ul></ul><ul><ul><li>Language Independence </li></ul></ul><ul><li>Platform Independence means that CORBA objects can be used on any platform for which there is a CORBA ORB implementation. </li></ul><ul><li>Language Independence means that CORBA objects and clients can be implemented in just about any programming language. </li></ul>
  8. 9. Exploring CORBA Alternatives Socket Programming <ul><li>Socket is a channel through applications can connect with each other and communicate </li></ul><ul><li>The most straight forward way to communicate between application components </li></ul><ul><li>The API for socket programming is rather low-level. </li></ul><ul><li>However, because the API is low-level, socket programming is not well suited to handling complex data types, especially when application components reside on different types machines (or) are implemented in different programming languages. </li></ul>
  9. 10. Exploring CORBA Alternatives (Contd…) <ul><li>Remote Procedure Call (RPC): </li></ul><ul><ul><li>Provides a function-oriented interface to socket-level communications </li></ul></ul><ul><ul><li>Using RPC, rather than directly manipulating the data that flows to and from a socket, the developer defines a function and generates codes that makes that function look like a normal functions to the caller. </li></ul></ul><ul><ul><li>Because RPC provides a function-oriented interface, it is often much easier to use than raw socket programming. </li></ul></ul><ul><li>DCE </li></ul><ul><ul><li>Set of Standards by the OSF, includes a standard for RPC. </li></ul></ul><ul><ul><li>It was never gained wide acceptance and exists today as little more than an historical curiosity. </li></ul></ul>
  10. 11. Exploring CORBA Alternatives (Contd…) <ul><li>DCOM </li></ul><ul><ul><li>It is a relatively robust object model, that enjoys particular good support on Microsoft O/S. </li></ul></ul><ul><ul><li>However, being a Microsoft technology, the availability of DOM is sparse outside the realm of Windows O/S. </li></ul></ul><ul><ul><li>CORBA-DCOM bridges enable CORBA objects to communicate with DCOM objects vice versa. </li></ul></ul><ul><li>RMI </li></ul><ul><ul><li>Advantage - it supports the passing of objects by value, a feature not (currently) supported by CORBA. </li></ul></ul><ul><ul><li>Disadvantage - it is a java-only solution, that is RMI servers and clients must be written in JAVA. </li></ul></ul>
  11. 12. CORBA Architecture Overview <ul><li>CORBA is an object-oriented architecture </li></ul><ul><li>CORBA objects exhibit many features and traits of other object-oriented systems, including interface inheritance and polymorphism . </li></ul><ul><li>What makes CORBA even more interesting is that it provides this capability even when used with non object-oriented languages such as C and COBOL </li></ul><ul><li>Interface inheritance allows an interface to be derived from another. </li></ul><ul><li>Even though interfaces can be related through inheritance, the implementations for those interfaces need not be. </li></ul>
  12. 14. CORBA Architecture Overview (Contd…) <ul><li>The Object Request Broker </li></ul><ul><ul><li>An ORB is a software component whose purpose is to facilitate communication between objects. </li></ul></ul><ul><ul><li>Locates a remote object, given an object reference. </li></ul></ul><ul><ul><li>Marshals parameters and return values to and from remote method invocations. </li></ul></ul><ul><ul><li>CORBA is the standard that implements this ORB capability. </li></ul></ul>
  13. 17. CORBA Architecture Overview (Contd…) <ul><li>Interface Definition Language </li></ul><ul><ul><li>Specifies interfaces between CORBA objects, is instrumental in ensuring CORBA's language independence. </li></ul></ul><ul><ul><li>Example: Client written in C++ can communicate with a server written in Java, which in turn can communicate with another server written in COBOL, and so forth. </li></ul></ul><ul><ul><li>It is not an implementation language. </li></ul></ul><ul><ul><li>The sole purpose of IDL is to define interfaces; providing implementations for these interfaces is performed using some other language. </li></ul></ul>
  14. 18. CORBA Architecture Overview (Contd…) <ul><li>The CORBA Communications Model </li></ul><ul><ul><li>CORBA uses the notion of object references (Interoperable Object References, or IORs) to facilitate the communication between objects. </li></ul></ul><ul><ul><li>Using the IOR, the client object can then invoke methods on the server object </li></ul></ul><ul><ul><li>A client is simply any application that uses the services of a CORBA object </li></ul></ul><ul><ul><li>A server is an application that creates CORBA objects and makes the services provided by those objects available to other applications </li></ul></ul><ul><ul><li>CORBA ORBs usually communicate using the Internet Inter-ORB Protocol (IIOP). </li></ul></ul>
  15. 19. CORBA Architecture Overview (Contd…) <ul><li>The CORBA Object Model </li></ul><ul><ul><li>All communication between objects is done through object references </li></ul></ul><ul><ul><li>Visibility to objects is provided only through passing references to those objects; objects cannot be passed by value </li></ul></ul><ul><ul><li>Another aspect of the CORBA object model is the Basic Object Adapter (BOA) </li></ul></ul><ul><ul><li>A BOA basically provides the common services available to all CORBA objects. </li></ul></ul>
  16. 20. CORBA Architecture Overview (Contd…) <ul><li>CORBA Clients and Servers </li></ul><ul><ul><li>A component can act as both a client and as a server. </li></ul></ul><ul><ul><li>Essentially, a component is considered a server if it contains CORBA objects whose services are accessible to other objects. </li></ul></ul><ul><ul><li>Likewise, a component is considered a client if it accesses services from some other CORBA object. </li></ul></ul><ul><ul><li>A component can simultaneously provide and use various services </li></ul></ul><ul><ul><li>So a component can be considered a client or a server, depending on the scenario in question. </li></ul></ul>
  17. 22. CORBA Architecture Overview (Contd…) <ul><li>Stubs and Skeletons </li></ul><ul><ul><li>A client stub is a small piece of code that allows a client component to access a server component. </li></ul></ul><ul><ul><li>This piece of code is compiled along with the client portion of the application. </li></ul></ul><ul><ul><li>Server skeletons are pieces of code that you &quot;fill in&quot; when you implement a server. </li></ul></ul><ul><ul><li>No need to write the client stubs and server skeletons; these pieces of code are generated during compilation of IDL interface definitions. </li></ul></ul>
  18. 23. CORBA and Networking Model <ul><li>Essentially, CORBA applications are built on top of GIOP-derived protocols such as IIOP. </li></ul><ul><li>These protocols, in turn, rest on top of TCP/IP, DCE, or whatever underlying transport protocol the network uses. </li></ul><ul><li>rather than supplant network transport protocols, the CORBA architecture creates another layer--the inter-ORB protocol layer--which uses the underlying transport layer as its foundation. </li></ul><ul><li>This, too, is a key to interoperability between CORBA applications, as CORBA does not dictate the use of a particular network transport protocol. </li></ul>
  19. 25. CORBA Object Model <ul><li>Every object-oriented architecture features an object model, which describes how objects are represented in the system. </li></ul><ul><li>Because CORBA is a distributed architecture, however, its object model probably differs somewhat from the traditional object models </li></ul><ul><li>Three of the major differences between the CORBA object model and traditional models lie in </li></ul><ul><ul><li>CORBA's &quot;semi-transparent&quot; support for object distribution , </li></ul></ul><ul><ul><li>its treatment of object references , and </li></ul></ul><ul><ul><li>its use of what are called object adapters--particularly the Basic Object Adapter (BOA) . </li></ul></ul>
  20. 26. Object Distribution <ul><li>A remote method call looks exactly like a local method call, thanks to the use of client stubs. </li></ul><ul><li>Thus, the distributed nature of CORBA objects is transparent to the users of those objects; the clients are unaware that they are actually dealing with objects which are distributed on a network. </li></ul><ul><li>Object distribution brings with it more potential for failure, CORBA must offer a contingency to handle such possibilities. (SystemExceptions) </li></ul>
  21. 27. Object References <ul><li>In a distributed application, there are two possible methods for one application component to obtain access to an object in another process. </li></ul><ul><li>One method is known as passing by reference </li></ul><ul><ul><li>When an object is passed by reference, the object itself remains &quot;in place&quot; while an object reference for that object is passed. Operations on the object through the object reference are actually processed by the object itself. </li></ul></ul><ul><li>The second method of passing an object between application components is known as passing by value </li></ul><ul><ul><li>When an object is passed by value, the object's state is copied and passed to its destination, where a new copy of the object is instantiated. Operations on that object's copy are processed by the copy, not by the original object. </li></ul></ul>
  22. 30. Basic Object Adapters (BOA) <ul><li>Primary purpose of BOA is to interface an object's implementation with its ORB. </li></ul><ul><li>New object adapter types be created only when necessary and provides three sample object adapters: </li></ul><ul><ul><li>The Basic Object Adapter (BOA), which you will concentrate on, </li></ul></ul><ul><ul><li>The Library Object Adapter </li></ul></ul><ul><ul><li>Object-Oriented Database Adapter, both of which are useful for accessing objects in persistent storage. </li></ul></ul><ul><li>The BOA provides CORBA objects with a common set of methods for accessing ORB functions. </li></ul><ul><li>These functions range from user authentication to object activation to object persistence. </li></ul><ul><li>The BOA is, in effect, the CORBA object's interface to the ORB. According to the CORBA specification, the BOA should be available in every ORB implementation. </li></ul>
  23. 31. Contd… <ul><li>The BOA supports four types of activation policies, which indicate how application components are to be initialized. These activation policies include the following: </li></ul><ul><ul><li>The shared server policy, in which a single server is shared between multiple objects </li></ul></ul><ul><ul><li>The unshared server policy, in which a server contains only one object </li></ul></ul><ul><ul><li>The server-per-method policy, which automatically starts a server when an object method is invoked and exits the server when the method returns </li></ul></ul><ul><ul><li>The persistent server policy, in which the server is started manually </li></ul></ul>
  24. 32. The ORB <ul><li>It is the infrastructure mechanism standardized by CORBA. </li></ul><ul><li>The role of the ORB is to unify access to application services, which it does by providing a common object-oriented, remote procedure call mechanism. </li></ul><ul><li>Using CORBA technologies with object orientation is a better way to separate interfaces and implementation. </li></ul><ul><li>It enables programmers to hide what they need to hide and expose what they need to expose, through interfaces. </li></ul>
  25. 33. Role of ORB <ul><li>Uniform access to services: Common RPC </li></ul><ul><li>Uniform discovery of resources: Common Naming </li></ul><ul><li>Uniform error handling </li></ul><ul><li>Uniform security policies </li></ul><ul><li>Uniform legacy application integration </li></ul>Application ORB Distributed Services
  26. 34. Similarities between DCOM and CORBA Yes Yes Location Transparency Yes-OpenDoc Yes-OLE Compound document model Yes Yes Language independence CORBA IDL allows for separation of interface and implementation and provides a repository for storage of interfaces. Microsoft IDL allows for specification of interface and implementation and provides a repository for storage of interfaces. Interface similarities Formal: managed by the Object Management Group Recently made formal; managed by the Active Group, an Open Group affiliate Standards body Yes Yes Object Model CORBA DCOM Similarities
  27. 35. Differences between DCOM and CORBA Significant number of additional services, including query, trader, transactions, as well as facilities in the areas of information management and system management. Lastly, services in areas such as finance, distributed simulation, and computer integrated manufacturing ActiveX-interactive content standard Service differences Multi-vendor Single vendor; availability from other vendors expected Availability MVS, UNIX, Windows (all), Macintosh Windows NT; future support for Windows (all), Macintosh, UNIX, MVA Platforms Enterprise first; desktop second Desktop first; enterprise second Focus CORBA DCOM Differences
  28. 36. Differences between DCOM and CORBA Multiple Inheritance; interfaces are classes. Supports aggregation but not inheritance; interfaces are not classes. Interface Inheritance C++, Smalltalk, Ada95; JAVA and COBOL in process C, C++; working on JAVA, Visual Basic, Ada Language Binding Products since 1992; many services and facilities under construction NT shipped in 1996; decade-long evolution of OLE and COM products; most services and facilities under construction Maturity CORBA DCOM Differences
  29. 37. Value Basic Value Constructed Value Object Reference Primitive Types Integer Types Floating Point void Boolean Char & wchar Long & long long Float Double & Long Double Unsigned long & Unsigned long long Short & Unsigned short octet string