Presentation is loading. Please wait.

Presentation is loading. Please wait.

II. Middleware for Distributed Systems

Similar presentations


Presentation on theme: "II. Middleware for Distributed Systems"— Presentation transcript:

1 II. Middleware for Distributed Systems
Outline Principles of Object-Oriented Middleware CORBA, COM and Java/RMI Resolving Heterogeneity Dynamic Object Requests CORBA, COM & Java/RMI

2 CORBA, COM and Java/RMI Outline CORBA COM Java/RMI

3 Object Management Architecture
Vertical domain-specific interfaces Non-standardized application-specific interfaces Horizontal facility interfaces Domain Interfaces Application Interfaces CORBA facilities Object Request Broker CORBA services General service interfaces CORBA, COM & Java/RMI

4 Object Management Architecture
CORBA Services foundational services for use by developers of implementation objects some published services: Naming Events Transactions Security Trading Common Facilities object services provide functionality for use by objects, CORBA facilities provide standards for services used by applications generic functionality needed by many applications (e.g., printing, document management, , etc.) Domain Interfaces provide domain-specific objects for vertical application domains Examples: Finance, Healthcare, Manufacturing, Telecom, Electronic Commerce, Transportation CORBA, COM & Java/RMI

5 Overview of CORBA Objects
CORBA objects differ from typical programming language objects: CORBA objects can be located anywhere on a network. CORBA objects (like Java objects) can run on any platform. CORBA objects can be written in any of several languages. CORBA object references are persistent. CORBA object developers need know nothing of where their clients will be, what hardware or OS they will run on, or what language they will be written in. CORBA objects approach universal accessibility. CORBA, COM & Java/RMI

6 Overview of CORBA Objects
A client of an object has access to an object reference for the object, and invokes operations on the object. A client knows only the logical structure of the object according to its interface and experiences the behavior of the object through invocations. Client code has no knowledge of the implementation of the object or which ORB is used to access the implementation. An object implementation provides the semantics of the object, usually by defining data for the object instance and code for the object's methods. CORBA, COM & Java/RMI

7 Overview of CORBA Object Types
CORBA object model is statically typed Object types have a unique name Modules are used to provide scope Nested modules Object types are defined in IDL by interface Interface contains operation, attribute, type and exception Atomic type: boolean, char, short, long, float, string Complex types can be constructed from objects and atomic types Instance of complex types are complex values that do not have identity and cannot be referenced CORBA, COM & Java/RMI

8 OMG IDL OMG Interface Definition Language (IDL): IDL Structure
mappings for many languages/compilers; independent of any particular language/compiler; multiple-inheritance, public interface-structured specification language; not for implementation. primary support for interoperability between static and dynamic requests mechanisms. IDL Structure Module a namespace Interface abstract type multiple inheritance Struct structured data Module auction { exception NotAllowed {}; struct Sale { int price; string item; }; interface Auction { void bid (in long price) raises NotAllowed; } CORBA, COM & Java/RMI

9 Object Implementation Side Internet InterORB Protocol (IIOP)
Role of OMG IDL Client Side Object Implementation Side C COBOL C++ C I D L I D L I D L I D L COBOL Ada I D L ORB I D L ORB I D L Internet InterORB Protocol (IIOP) I D L Ada Small talk I D L I D L I D L I D L Small talk C++ C++ JAVA JAVA CORBA, COM & Java/RMI

10 Overview of CORBA Object Attributes
Attributes make state information of server objects accessible to client objects Attributes are treated as a pair of operations (get and set) All attributes that are declared in the interface are accessible to clients Read-only attributes Constants Read-only for client objects Read-only for server objects Scoping rules Define, then use Forward declarations interface Player; typedef sequence<Player> PlayerList interface Trainer; typedef sequence<Trainer> TrainerList; interface Team { readonly attribute string name; attribute TrainerList coached_by; attribute Club belongs_to; attribute PlayerList players; }; (**** there is a mistake here ****) CORBA, COM & Java/RMI

11 Overview of CORBA Object Operations
CORBA operations specify the services that clients can request from server objects Operation name Return type List of parameters In Out Inout List of exceptions Accessible to client objects (no private, or protected operations) No overloading interface Team { string print(); void bookGoalies(in Date d)…; }; CORBA, COM & Java/RMI

12 CORBA CORBA, COM & Java/RMI

13 Object Implementation
A Request A request consists of: Target object (target object identified by a unique object reference) Operation Parameters (the input, output and in-out parameters defined for the operation; may be specified individually or as a list) Optional request context Results (the result values returned by the operation) Client Object Implementation Client Proxy (stub code) Skeleton code Request ORB CORBA, COM & Java/RMI

14 Failure Handling Exceptions are used to inform client object about their request failures About 25 system failures User defined exceptions exception PlayerBooked{}; interface Team { void bookGoalies(in Date d) raises (PlayerBooked); }; CORBA, COM & Java/RMI

15 Subtypes and Multiple Inheritance
CORBA object model support (multiple) inheritance Public inheritance (inherit all) Virtual inheritance (operations are dynamically bound) Object is the root object Conflict resolved at IDL compile time interface Organization{ readonly attribute string name; } interface Club: Organization { exception NotInClub(); attribute TeamList teams; readonly attribute short noOfMembers; void transfer (in Player p) raises (NotInClub); }; CORBA, COM & Java/RMI

16 Polymorphism CORBA object model support restricted form of polymorphism Inheritance relationship Redefinition only on operations, not on attributes CORBA, COM & Java/RMI


Download ppt "II. Middleware for Distributed Systems"

Similar presentations


Ads by Google