Object-Oriented Network Communication (OOMI)

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Distributed Object & Remote Invocation Vidya Satyanarayanan.
Remote Method Invocation
CORBA - Common Object Request Broker Architecture.
Netprog CORBA Intro1 CORBA Common Object Request Broker Architecture Based partially on Notes by D. Hollinger and Java Network Programming and Distributed.
Advanced Comm. between Distributed Objects 1 Advanced Communication Among Distributed Objects  Outline  Request synchronization  Request multiplicity.
Software Engineering and Middleware: a Roadmap by Wolfgang Emmerich Ebru Dincel Sahitya Gupta.
II. Middleware for Distributed Systems
Software Engineering and Middleware A Roadmap Author: Wolfgang Emmerich Presented by: Sam Malek.
Communication in Distributed Systems –Part 2
1 From Objects to Components joint lecture by Prof. Judith Bishop, University of Pretoria, South Africa Stephan Herrmann, TU Berlin.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 4: RPCs vs. CORBA Dr. Michael R. Lyu Computer Science & Engineering.
.NET Mobile Application Development Remote Procedure Call.
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
© 2003 Wolfgang Emmerich 1 Validating Distributed Object & Component Designs Wolfgang Emmerich and Nima Kaveh London Software Systems University College.
Messaging is an important means of communication between two systems. There are 2 types of messaging. - Synchronous messaging. - Asynchronous messaging.
New features for CORBA 3.0 by Steve Vinoski Presented by Ajay Tandon.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
CS551 - Lecture 16 1 CS551 Object Oriented Middleware (V) Advanced Communication between Distributed Objects (Chap. 7 of EDO) Yugi Lee STB #555 (816)
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
CS551 - Lecture 15 1 CS551 Object Oriented Middleware (IV) Dynamic Requests (Chap. 6 of EDO) Yugi Lee STB #555 (816)
Common Object Request Broker Architecture (CORBA) The Common Object Request Broker Architecture (CORBA) is a specification of a standard architecture for.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 3: Communication Dr. Michael R. Lyu Computer Science & Engineering.
Distributed Objects & Remote Invocation
Presentation 3: Designing Distributed Objects. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Assumed students are knowledgeable about OOP principles.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
CS551 - Lecture 12 1 CS551 Object Oriented Middleware (IV) Dynamic Requests (Chap. 6 of EDO) Yugi Lee STB #555 (816)
Presentation: Special Repetition Recap on Distributed Principles.
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Topic 3: Remote Invocation Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Multi Threading.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Communication between distributed objects Remote procedure call
Prof. Leonardo Mostarda University of Camerino
Remote Method Invocation
Distributed OS.
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
Distributed Systems - Comp 655
Inventory of Distributed Computing Concepts and Web services
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Multithreading.
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Channels.
Remote method invocation (RMI)
Distribution Infrastructures
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Channels.
Channels.
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

Object-Oriented Network Communication (OOMI) Advanced Communication between Distributed Objects Emmerich – Chapter 7. 9.03.2003

Motivation The requests we have seen have Synchronous execution Have at-most-once reliability may or may not succeed -> exception If not Other forms of requests are useful We therefore look at different forms of Synchronization Operation execution Reliability

Outline Request Synchronization 2. Request Reliability Four types: Synchronous Oneway Deferred Synchronous Asynchronous 2. Request Reliability

1. Request Synchronization OO-Middleware: synchronous requests :Client :Server Op() Synchronous requests might block clients unnecessarily Examples: User Interface Components Concurrent Requests from different servers

Oneway Requests Return control to client as soon as request has been taken by middleware Client and server are not synchronized Use if: Server does not produce a result Failures of operation can be ignored by client :Client :Server oneway()

Oneway using Java Threads class PrintSquad { static void main(String[] args) { Team team; Date date; //initializations of team and date omitted ... OnewayReqPrintSquad a= new OnewayReqPrintSquad(team,date); a.start(); //continue to do work while request thread is blocked } // thread that invokes remote method class OnewayReqPrintSquad extends Thread { Team team; Date date; OnewayReqPrintSquad(Team t, Date d) { team=t; date=d;} public void run() { team.print(date); //call remote method and then die } }

Oneway Requests in CORBA Declared statically in the interface definition of the server object IDL compiler validates that operation has a void return type does not have any out or inout parameters does not raise type specific exceptions Example: interface Team { oneway void mail_timetable(in string tt); };

Oneway Requests in CORBA If oneway declarations cannot be used: Use dynamic invocation interface :Server :Client r=create_request() r:Request send() Op() delete()

Deferred Synchronous Requests Return control to client as soon as request has been taken by middleware Client initiates synchronization Use if: Requests take long time Client should not be blocked Clients can bear overhead of synchronization :Server :Client :Request send() op() get_result()

Deferred Synchronous Requests with Threads class PrintSquad { public void print(Team t, Date d) { DefSyncReqPrintSquad a=new DefSyncReqPrintSquad(t,d); // do something else here. a.join(this); // wait for request thread to die. System.out.println(a.getResult()); } // thread that invokes remote method class DefSyncReqPrintSquad extends Thread { String s; Team team; Date date; DefSyncReqPrintSquad(Team t, Date d) {team=t; date=d;} public String getResult() {return s;} public void run() { s=team.asString(date);// call remote method and die

CORBA Deferred Synchronous Requests Determined at run-time using DII By invoking send() from a Request object And using get_response() to obtain result :Server :Client r:Request op() get_response() r=create_request(“op”) send()

Asynchronous Requests Return control to client as soon as request has been taken by middleware Server initiates synchronization Use if: Requests take long time Client should not be blocked Server can bear overhead of synchronization :Client :Server op()

Asynchronous Requests with Threads Client has interface for callback Perform request in a newly created thread Client continues in main thread New thread is blocked Requested operation invokes callback to pass result New thread dies when request is complete

Asynchronous Requests with Threads interface Callback { public void result(String s); } class PrintSquad implements Callback { public void Print(Team team, Date date){ A=new AsyncReqPrintSquad(team,date,this); A.start(); // and then do something else public void result(String s){ System.out.print(s); class AsyncReqPrintSquad extends Thread { Team team; Date date; Callback call; AsyncReqPrintSquad(Team t, Date d, Callback c) { team=t;date=d;call=c; public void run() { String s=team.AsString(date); call.result(s);

Asynchronous Requests using Message Queues Messaging is starting to be provided by object-oriented middleware Microsoft Message Queue CORBA Notification Service Java Messaging Service Request and reply explicitly as messages Using two message queues Asynchronous requests can be achieved

Asynchronous Requests using Message Queues enter Request Queue Reply Queue remove Client Server remove enter

Difference between Thread and MQs Threads Communication is immediate Do not achieve guaranteed delivery of request Can be achieved using language/OS primitives Message Queues Buffer Request and Reply messages Persistent storage may achieve guaranteed delivery Imply additional licensing costs for Messaging

2. Request Reliability How certain can we be that a request has been executed? Extremes: Guaranteed execution Do not know There are different degrees in between Client designers specify how reliably their requests need to be executed Different classification for unicast and multicast

Request Reliability Unicast Multicast Exactly once (1) Atomic (2) At-most-once (3) At-least-once (4) Maybe (5) Multicast

Unicast Reliability: Exactly once (1) Highest degree of reliability for unicast requests Middleware guarantees that requests are executed once and only once Example: CORBA Notification service Occurrence of failures transparent for both client and server designers Requires persistent storage of request data Implies serious performance penalty!

Unicast Reliability: Atomic (2) Atomic requests are either performed completely or not at all Clients know from where to recover Implemented using transactions Still quite expensive

Unicast Reliability: At-least-once (3) Middleware guarantees to execute request once Example: Message-oriented middleware (MQSeries) Request maybe executed more often Achieved by re-sending request or reply messages Difficult to use with requests that modify server object’s state

Unicast Reliability: At-most-once (4) Default reliability in OO Middleware: At-most-once semantics Means that the middleware attempts to execute the request at most once i.e. the requested operation may or may not have been executed the middleware detects failures and informs client the client may then decide what to do e.g. by asking the user Good compromise between complexity and reliability

Unicast Reliability: Maybe (5) Similar to at-most once reliability except that Clients are not notified about failures Example: CORBA oneway requests or if we ignore the exceptions No overhead for error handling