From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 8: Distributed.

Slides:



Advertisements
Similar presentations
DISTRIBUTED OBJECTS AND REMOTE INVOCATION
Advertisements

Slides for Chapter 20: CORBA Case Study From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Addison-Wesley 2005.
Slides for Chapter 6: Operating System support From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 11: CORBA.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
IDL Interface Definition Language. IDL products Interface repository Dynamic Interface Static skeletons Client IDL stubs Dynamic skeletons Server Object.
Notes from “Distributed Systems Concepts and Design” by Coulouris
1 CS 194: Distributed Systems Distributed based Object Systems Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 13: CORBA.
By Dr. Jiang B. Liu 11. Java IDL and CORBA  Generic ORB Core  idltojava development tool  CORBA Object Service (COS) name service - nameserv  Java.
CORBA Chapter 17 Coulouris text. Today’s Topics CORBA History and goals CORBA RMI CORBA services The Distributed Whiteboard Revisited.
Slides for Chapter 5: Communication between distributed objects
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 9 Web Services.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
Programming with CORBA Hongtao Shi 04/23/01. §CORBA Overview §Advantages of CORBA §Interface Definition Language §Application: Address Book Outline.
Distributed Objects and Remote Invocation: RMI and CORBA Most concepts are drawn from Chapter 17 © Pearson Education Rajkumar Buyya, Xingchen Chu, Rodrigo.
Communication between distributed objects Remote procedure call
Information Management NTU Interprocess Communication and Middleware.
Copyright (c) Qusay H. Mahmoud 1 The Naming Service (Client’s View) A tree-like directory for object references Much like a file system: provides directory.
Slide 1 CORBA Programming: Presentation of a simple “Hello World” CORBA client and server application ITONK1.
CS Distributed Computing Systems Chapter 17: CORBA Chin-Chih Chang, From Coulouris, Dollimore and Kindberg Distributed Systems:
Objekt orienteret Netværkskommunikation CORBA Introduction & CORBA Programming.
Abhishek Bachchan Vishal Patangia
CORBA – Command Line CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 9: Web Services.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 2: Architectural.
Lecture 5: RPC and Distributed Objects Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
CORBA Details Three Tier Architecture CORBA API Holders and Helpers COS Naming and Naming Contexts Transient and Persistent Objects Properties Callbacks.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 4: Interprocess.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Vakgroep Informatietechnologie - IBCN CORBA & RMI Design of Distributed Software.
Slides for Chapter 4: Interprocess Communication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Addison-Wesley.
Slides for Chapter 17: CORBA Case Study From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
Distributed Systems Concepts Ch. 10 and Figure 10.1 Skew between computer clocks in a distributed system.
Slide 1 Objektorienteret Netværkskommunikation CORBA Introduction.
CORBA – Eclipse CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CORBA_1/001 Department of Computer Science Southern Illinois University Edwardsville Spring, 2010 Dr. Hiroshi Fujinoki CORBA:
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
WEB SERVICES 1 From Chapter 19 of Distributed Systems Concepts and Design,4 th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
1 CORBA. 2 What options do I have for distributed application development using java? 1.RMI-IIOP is for developers who program in the Java programming.
1 Distributed Objects and Remote Invocation – 5.1 Introduction  Foci: –Communication among distributed objects via RMI  Recipients of remote invocations.
Remote Method Invocation with Java-RMI
Notes from Coulouris 5Ed Distributed Systems Notes on Components.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 7: Operating.
Slide 1 of 15 © Ingeniørhøjskolen i Århus CORBA Programming: Presentation of a simple “Hello World” CORBA client and server application.
1 callback. 2 Client programs often react to changes or updates that occur in a server. For example, a client graph or spreadsheet program might need.
Slides for Chapter 5: Distributed objects and remote invocation From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition.
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
IDL Models The Inheritance Model: Using the Inheritance Model, you implement the IDL interface using an implementation class that also extends the compiler-generated.
6/5/2016B.Ramamurthy1 Distributed Objects and Remote Invocation Chapter 5 B.Ramamurthy.
Topic 5: CORBA RMI Dr. Ayman Srour
Object Oriented Programming Lecture 2: BallWorld.
CORBA Barış COŞKUN Çağatay DİKİCİ. INTRODUCTION Computer networks are heterogenous In 1989 OMG(Object Management Group) was formed to address the problems.
Introduction to CORBA.
Only small steps in CORBA programming – much complexity
Communication between distributed objects Remote procedure call
Communication between distributed objects Remote procedure call
CORBA (Common Object Request Broker Architecture)
Slides for Chapter 2: Architectural Models
Edition 5, © Addison-Wesley 2012
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
Slides for Chapter 6: Operating System support
Slides for Chapter 5: Distributed objects and remote invocation
IDL to TTCN-3 mapping issues
Remote method invocation (RMI)
Exercises for Chapter 20: CORBA CASE STUDY
Slides for Chapter 18: Replication
Presentation transcript:

From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 8: Distributed Objects and Components

2 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.1 Distributed objects 2

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.2 IDL interfaces Shape and ShapeList struct Rectangle{1 long width; long height; long x; long y; } ; struct GraphicalObject {2 string type; Rectangle enclosing; boolean isFilled; }; interface Shape {3 long getVersion() ; GraphicalObject getAllState() ; // returns state of the GraphicalObject }; typedef sequence All; 4 interface ShapeList {5 exception FullException{ }; 6 Shape newShape(in GraphicalObject g) raises (FullException);7 All allShapes();// returns sequence of remote object references8 long getVersion() ; };

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.3 IDL module Whiteboard module Whiteboard { struct Rectangle{...} ; struct GraphicalObject {...}; interface Shape {...}; typedef sequence All; interface ShapeList {...}; };

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.4 IDL constructed types – 1 TypeExamplesUse sequence typedef sequence All; typedef sequence All bounded and unbounded sequences of Shapes Defines a type for a variable-length sequence of elements of a specified IDL type. An upper bound on the length may be specified. string String name; typedef string SmallString; unboundedand bounded sequences of characters Defines a sequences of characters, terminated by the null character. An upper bound on the length may be specified. array typedef octet uniqueId[12]; typedef GraphicalObject GO[10][8] Defines a type for a multi-dimensional fixed-length sequence of elements of a specified IDL type. this figure continues on the next slide

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.4 IDL constructed types – 2 TypeExamplesUse record struct GraphicalObject { string type; Rectangle enclosing; boolean isFilled; }; Defines a type for a record containing a group of related entities. Structs are passed by value in arguments and results. enumerated enum Rand (Exp, Number, Name); The enumerated type in IDL maps a type name onto a small set of integer values. union union Exp switch (Rand) { case Exp: string vote; case Number: long n; case Name: string s; The IDL discriminated union allows one of a given set of types to be passed as an argument. The header is parameterized by anenum, which specifies which member is in use. };

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.5 The main components of the CORBA architecture client server proxy or dynamic invocation implementation repository object adapter ORB skeleton or dynamic skeleton client program interface repository Request Reply core for A Servant A

8 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.6 CORBA Services (1) this figure continues on the next slide

9 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.6 CORBA Services (continued) 9

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.7 Java interfaces generated by idlj from CORBA interface ShapeList public interface ShapeListOperations { Shape newShape(GraphicalObject g) throws ShapeListPackage.FullException; Shape[] allShapes(); int getVersion(); } public interface ShapeList extends ShapeListOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { }

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.8 ShapeListServant class of the Java server program for CORBA interface ShapeList import org.omg.CORBA.*; import org.omg.PortableServer.POA; class ShapeListServant extends ShapeListPOA { private POA theRootpoa; private Shape theList[]; private int version; private static int n=0; public ShapeListServant(POA rootpoa){ theRootpoa = rootpoa; // initialize the other instance variables } // continued on the next slide

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.8 continued public Shape newShape(GraphicalObject g) throws ShapeListPackage.FullException {1 version++; Shape s = null; ShapeServant shapeRef = new ShapeServant( g, version); try { org.omg.CORBA.Object ref = theRoopoa.servant_to_reference(shapeRef);2 s = ShapeHelper.narrow(ref); } catch (Exception e) {} if(n >=100) throw new ShapeListPackage.FullException(); theList[n++] = s; return s; } public Shape[] allShapes(){... } public int getVersion() {... } }

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.9 Java class ShapeListServer import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; import org.omg.PortableServer.*; public class ShapeListServer { public static void main(String args[]) { try{ ORB orb = ORB.init(args, null);1 POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));2 rootpoa.the_POAManager().activate();3 ShapeListServant SLSRef = new ShapeListServant(rootpoa);4 org.omg.CORBA.Object ref = rootpoa.servant_to_reference(SLSRef);5 ShapeList SLRef = ShapeListHelper.narrow(ref); org.omg.CORBA.Object objRef =orb.resolve_initial_references("NameService"); NamingContext ncRef = NamingContextHelper.narrow(objRef);6 NameComponent nc = new NameComponent("ShapeList", "");7 NameComponent path[] = {nc};8 ncRef.rebind(path, SLRef); 9 orb.run();10 } catch (Exception e) {... } }}

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.10 Java client program for CORBA interfaces Shape and ShapeList import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; public class ShapeListClient{ public static void main(String args[]) { try{ ORB orb = ORB.init(args, null); 1 org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContext ncRef = NamingContextHelper.narrow(objRef); NameComponent nc = new NameComponent("ShapeList", ""); NameComponent path [] = { nc }; ShapeList shapeListRef = ShapeListHelper.narrow(ncRef.resolve(path));2 Shape[] sList = shapeListRef.allShapes();3 GraphicalObject g = sList[0].getAllState();4 } catch(org.omg.CORBA.SystemException e) {...} }

15 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.11 An example software architecture

16 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.12 The structure of a container

17 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.13 Application servers

18 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.14 Transaction attributes in EJB.

19 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.15 Invocation contexts in EJB

20 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.16 An example component configuration in Fractal

21 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.17 The structure of a Fractal component

22 Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 8.18 Component and ContentController Interfaces in Fractal