Advanced Comm. between Distributed Objects 1 Advanced Communication Among Distributed Objects  Outline  Request synchronization  Request multiplicity.

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Distributed Object & Remote Invocation Vidya Satyanarayanan.
CORBA - Common Object Request Broker Architecture.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
Group Communication Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 24 th, 2004.
Concurrency CS 510: Programming Languages David Walker.
Middleware Technologies compiled by: Thomas M. Cosley.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
II. Middleware for Distributed Systems
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Software Engineering and Middleware A Roadmap Author: Wolfgang Emmerich Presented by: Sam Malek.
Asynchronous Message Passing EE 524/CS 561 Wanliang Ma 03/08/2000.
1 From Objects to Components joint lecture by Prof. Judith Bishop, University of Pretoria, South Africa Stephan Herrmann, TU Berlin.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 4: RPCs vs. CORBA Dr. Michael R. Lyu Computer Science & Engineering.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
.NET Mobile Application Development Remote Procedure Call.
Fundamentals of Python: From First Programs Through Data Structures
Client/Server Software Architectures Yonglei Tao.
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.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
© 2003 Wolfgang Emmerich 1 Validating Distributed Object & Component Designs Wolfgang Emmerich and Nima Kaveh London Software Systems University College.
Multi-Threaded Application CSNB534 Asma Shakil. Overview Software applications employ a strategy called multi- threaded programming to split tasks into.
Problems with Send and Receive Low level –programmer is engaged in I/O –server often not modular –takes 2 calls to get what you want (send, followed by.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
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.
Dynamic Invocation Interface Alternative to using IDL stubs Object cannot distinguish between the two. How is DII different for the programmer?
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.
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
Electronic Payment Systems (1)
Common Object Request Broker Architecture (CORBA) The Common Object Request Broker Architecture (CORBA) is a specification of a standard architecture for.
Shuman Guo CSc 8320 Advanced Operating Systems
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
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Presentation 3: Designing Distributed Objects. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Assumed students are knowledgeable about OOP principles.
Multithreaded programming  Java provides built-in support for multithreaded programming. A multithreaded program contains two or more parts that can run.
1 Distributed Programming low level: sending data among distributed computations higher level: supporting invocations among distributed computations network.
Distributed objects and remote invocation Pages
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
Channels. Models for Communications Synchronous communications – E.g. Telephone call Asynchronous communications – E.g. .
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.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
Topic 4: Distributed Objects 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.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Last Class: Introduction
Multi Threading.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
Object-Oriented Network Communication (OOMI)
DISTRIBUTED COMPUTING
Multithreading.
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Threaded Programming in Python
Lecture 6: RPC (exercises/questions)
Threads and Multithreading
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
Presentation transcript:

Advanced Comm. between Distributed Objects 1 Advanced Communication Among Distributed Objects  Outline  Request synchronization  Request multiplicity  Request reliability

Advanced Comm. between Distributed Objects 2 Request Synchronization  Request synchronization  Synchronous  Wait for the results  Oneway  Do not expect any results or exceptions  Request returns control to client as soon as the middleware accepts the request  Server and Client execute concurrently  Deferred synchronous  Dynamic  Explicit request object  Invoke more than one concurrent operations with single thread  Asynchronous  Callback from the server to client  Non-synchronous requests can be achieved by synchronous requests and multi-threading  COBRA provide direct support for all 4 different requests

Advanced Comm. between Distributed Objects 3 Oneway Request  Using thread  Spawn a child thread to make synchronous request  Terminate the child thread once the request is finished  Performance penalty

Advanced Comm. between Distributed Objects 4 Oneway Request Class PrintSquas { static void main(string[] args){ Team team; Date date; // initialization.. OnewayReq a = new OnewayReq (team, date); a.start(); // continue … } Class OnewayReq extends Thread { Team team; Date date; OnewayReq (Team t, Date d){ team = t; date = d;} public void run(){ team.print(date); // call remote method } Class PrintSquas { static void main(string[] args){ Team team; Date date; // initialization.. OnewayReq a = new OnewayReq (team, date); a.start(); // continue … } Class OnewayReq extends Thread { Team team; Date date; OnewayReq (Team t, Date d){ team = t; date = d;} public void run(){ team.print(date); // call remote method }

Advanced Comm. between Distributed Objects 5 Oneway Request  Using thread  Spawn a child thread to make synchronous request  Terminate the child thread once the request is finished  Performance penalty  CORBA  Static and dynamic invocation support oneway request  IDL defines oneway operations  Precondition: –No out, or inout parameter –Viod return type –No type-specific exceptions  Static invocation, Server decides this synchronization scheme  Dynamic invocation, client can choose oneway request (review the Request object, send operation.)

Advanced Comm. between Distributed Objects 6 Oneway Request  CORBA  IDL defines oneway operations  Static invocation, Server decides this synchronization scheme  Dynamic invocation, client can choose oneway request interface Team { oneway void mail_timetable (in Date date); … }; interface Team { oneway void mail_timetable (in Date date); … }; : Client : Server r:Request r =create_request() send_oneway delete() Op()

Advanced Comm. between Distributed Objects 7 Oneway Request  Comparison  Thread  Less efficient (Create/delete thread)  IDL (oneway)  Less flexible  Type safe  DII  Flexible using different flag with send  Type unsafe  Less efficient (Create/delete request object)

Advanced Comm. between Distributed Objects 8 Deferred Request  Using thread  Spawn a child thread to make synchronous request  Wait for termination of the child request thread  Obtain the result  Performance penalty

Advanced Comm. between Distributed Objects 9 Deferred Request --- Using Thread class PrintSquad { public void print (Team team, Date date) { DefsyncReqPrintSquad a = new DefSyncReqPrintSquad (team, date); // do something here. a.join(this) ;// wait for request thread to die System.out.println(a.getResult()); } class DefSyncReqPrintSquad extends Thread { … DefsyncReqPrintSquad (Team t, Date d); Public String getResult(); Public void run() { strings; s = team.asString(date); // call remote method and die } class PrintSquad { public void print (Team team, Date date) { DefsyncReqPrintSquad a = new DefSyncReqPrintSquad (team, date); // do something here. a.join(this) ;// wait for request thread to die System.out.println(a.getResult()); } class DefSyncReqPrintSquad extends Thread { … DefsyncReqPrintSquad (Team t, Date d); Public String getResult(); Public void run() { strings; s = team.asString(date); // call remote method and die }

Advanced Comm. between Distributed Objects 10 Deferred Request  CORBA  Only dynamic invocation interface support deferred synchronous request  Cannot be issued using client stub  get_response: no-wait returns control back to client with indication if the result is ready : Client : Server r:Request r =create_request() send_defeered() delete() Op() get_response()

Advanced Comm. between Distributed Objects 11 Asynchronous Request  Using thread  Similar to deferred synchronous request  Request thread invokes a call back operation  Request thread join the main thread

Advanced Comm. between Distributed Objects 12 Asynchronous Request --- Using Thread Interface Callback { public void result (String s); } class PrintSquad implements Callback { public void print (Team team, Date date) { AsyncReqPrintSquad a = new AsyncReqPrintSquad (team, date, this); a.start(); // continue to do some work here } public void result (String s) {// callback System.out.println(s); } class AsyncReqPrintSquad extends Thread { Team team; Date date; Callback call; AsyncReqPrintSquad (Team t, Date d, Callback c); Public void run() { string s; s = team.asString(date); // call remote method call.result(s); // pass result to parent thread } Interface Callback { public void result (String s); } class PrintSquad implements Callback { public void print (Team team, Date date) { AsyncReqPrintSquad a = new AsyncReqPrintSquad (team, date, this); a.start(); // continue to do some work here } public void result (String s) {// callback System.out.println(s); } class AsyncReqPrintSquad extends Thread { Team team; Date date; Callback call; AsyncReqPrintSquad (Team t, Date d, Callback c); Public void run() { string s; s = team.asString(date); // call remote method call.result(s); // pass result to parent thread }

Advanced Comm. between Distributed Objects 13 Asynchronous Request  CORBA : Client : Server r:Request r =create_request() send() Op() Callback ()

Advanced Comm. between Distributed Objects 14 Asynchronous Request  Using Message Queues ClientServer Request Queue Reply Queue enter removeenter remove

Advanced Comm. between Distributed Objects 15 Request Multiplicity  Request multiplicity  Unicast (from one client to one server)  Group request  same operations from multiple server objects  Group requests are anonymous  Group composition is managed by a channel  Group membership is unknown to the request producer  Group members are request consumers  Multiple request  Different operations from different server objects that are known to the client  Requested operations are independent with each other with no precedence relation  Client can collect results as they become available

Advanced Comm. between Distributed Objects 16 Request Multiplicity  Implementing group request  Channel (Example 7.5)  CORBA Event channel (Example 7.6)  Implementing multiple request  Thread  Tuple space (Example 7.8) –Out –In (blocking call) –Rd (blocking call)  Performance and development overhead  DII (Example 7.9)

Advanced Comm. between Distributed Objects 17 Request Reliability  Unicast Request Reliability  Exactly-once  Highest reliability  Depends on middleware, fault-tolerant, hardware, os platforms  Expensive  Atomic  Avoid side-effects when a failure occurs  Transactions  At-least-once  Middleware guarantees the execution  Multiple execution of a single request due to reply lose  If request modify server’s state, this semantics is not desirable  At-most-once  If not executed, errors are raised  Maybe  No guarantee of execution  Client doesn’t know the failure  Oneway request in CORBA

Advanced Comm. between Distributed Objects 18 Request Reliability  Group and Multiple Request Reliability  K-reliability  Totally ordered  Best effort  Trade off between performance and Reliability