Network Objects Marco F. Duarte COMP 520: Distributed Systems September 14, 2004.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

DISTRIBUTED COMPUTING PARADIGMS
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
RPC Robert Grimm New York University Remote Procedure Calls.
RMI Varun SainiYing Chen. What is RMI? RMI is the action of invoking a method of a remote interface on a remote object. It is used to develop applications.
Remote Procedure Call Design issues Implementation RPC programming
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Implementing Remote Procedure Calls Authored by: Andrew D. Birrel and Bruce Jay Nelson Presented by: Terry, Jae, Denny.
Remote Object Invocation
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Distributed Systems Lecture #3: Remote Communication.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Network Objects Presenter: Dan Williams. Trends Network centric view of world Jini, Web Services Based on Object Oriented models Both papers contributed.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Communication in Distributed Systems –Part 2
Remote Procedure Calls. 2 Client/Server Paradigm Common model for structuring distributed computations A server is a program (or collection of programs)
.NET Mobile Application Development Remote Procedure Call.
Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Information Management NTU Interprocess Communication and Middleware.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
Implementing Remote Procedure Calls Authored by Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presented by Lars Larsson.
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
RMI Remote Method Invocation Distributed Object-based System and RPC Together 2-Jun-16.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
By Alexander H. Emmet Network Objects (the Joys of Distributed Objects)
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Coordination Models and Languages Part I: Coordination Languages and Linda Part II: Technologies based on Tuple space concept beyond Linda Part III: Comparison.
Distributed Computing A Programmer’s Perspective.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Eric Tryon Brian Clark Christopher McKeowen. System Architecture The architecture can be broken down to three different basic layers Stub/skeleton layer.
Remote Procedure Call RPC
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
CS294, YelickNetwork Objects, p1 CS Communication in Distributed Systems
Remote Method Invocation A Client Server Approach.
Distributed objects and remote invocation Pages
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Java Distributed Object Model A remote object is one whose methods can be invoked from another JVM on a different host. It implements one or more remote.
Implementing Remote Procedure Call Landon Cox February 12, 2016.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
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.
Prof. Leonardo Mostarda University of Camerino
MCA – 405 Elective –I (A) Java Programming & Technology
File Transfer and access
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Overview of RMI Architecture
Coordination Models and Languages
Remote Procedure Call Hank Levy 1.
Remote Procedure Call Hank Levy 1.
Remote Procedure Call Hank Levy 1.
Overview of RMI Architecture
Presentation transcript:

Network Objects Marco F. Duarte COMP 520: Distributed Systems September 14, 2004

Introduction Distributed systems require data, process sharing among nodes Object oriented programming appropriate for distributed systems A. Birrell, G. Nelson, S. Owicki, E. Wobber (1993) How to share objects in distributed systems? Methods provide sharing interface – share methods? Network Objects: Objects whose methods can be accessed by other programs

Pickles Solution to marshaling complex data types  Simple variable types marshaled in-line  Complex types (i.e. objects) marshaled by pickle package – which can be customized for each object type  Network objects are passed by reference  Non-network objects are copied to destination  Marshalling support for inter-process streams

Network Object Sharing  Network object T, subtypes TImpl, TSrg  Surrogates are created by the unmarshaling code  Clients select a transport shared by client and owner  Clients select TSrg corresponding to TImpl

Object Sharing How to choose best surrogate for a network object?  Narrowest Surrogate: Choose TSrg which is the most specific and consistent with TImpl, and with stubs available both in client and owner. Third Party Transfers: Obtaining a reference to a network object from another client

Object Sharing: Example MODULE Server EXPORTS Main; IMPORT NetObj, FS, Time; TYPE File = FS.File OBJECT OVERRIDES getChar := GetChar; eof := Eof END; Svr = FS.Server OBJECT OVERRIDES open := Open; END; BEGIN NetObj.Export(NEW(Srv), “FS1”); END Server. MODULE Client EXPORTS Main; IMPORT NetObj, FS, IO; VAR s: FS.Server := NetObj.import(“FS1”, NetObj.LocateHost(“server”)); f:= s.open(“/usr/dict/words”); BEGIN WHILE NOT f.eof() DO IO.PutChar(f.getChar()) END END Client … TYPE NewFS.File OBJECT METHODS close() END;

Typecodes Unique object identifier in a machine Used for allocation Typecodes are matched with supertypecodes (parent)

Typecodes: Problem

Fingerprints: Solution 64 kilobit checksum dependent on object structure

Network Object Marshaling Networks Objects are marshaled through their wire representation: (SpaceID, ObjID) If object is not known at client, a surrogate is found for it using the narrowest surrogate rule.

Remote Invocation Stubs registered in table with srgType, disp. Obtain and release connections Dispatcher: obj.disp(c, obj) – written by stub generator – unmarshals arguments and calls appropriate method Methods identified by integers

Garbage Collection

Dirty Set: List of clients containing surrogates for the objects

Garbage Collection When surrogate is collected, RPC removes it from dirty set If there are no local references, TImpl can be collected

Garbage Collection Third party transfers as results require Ack message to protect both copies

Explicit Import/Export MODULE Server EXPORTS Main; IMPORT NetObj, FS, Time; TYPE File = FS.File OBJECT OVERRIDES getChar := GetChar; eof := Eof END; Svr = FS.Server OBJECT OVERRIDES open := Open; END; BEGIN NetObj.Export(NEW(Srv), “FS1”); END Server. MODULE Client EXPORTS Main; IMPORT NetObj, FS, IO; VAR s: FS.Server := NetObj.import(“FS1”, NetObj.LocateHost(“server”)); f:= s.open(“/usr/dict/words”); BEGIN WHILE NOT f.eof() DO IO.PutChar(F.getChar()) END END Client … TYPE NewFS.File OBJECT METHODS close() END;

Bootstrapping Objects passed as results to method calls How to share an “original” object? Forge original surrogate Location, Object ID, Surrogate Type Special Object w/ID = 0 Methods implement network object runtime operations (Import, Export, Locate, etc.) get, put operations Specific TCP port assigned for location

Performance doesn’t matter Network penalty 1600 usecs Null Call 3310 usecs/call Ten integer call 3435 usecs/call Same object argument 3895 usecs/call Same object return 4290 usecs/call (ack) New object argument 9148 usecs/call (dirty) New object return usecs/call (dirty) TCP throughput 3400 Kbytes/sec Reader test 2824 Kbytes/sec Writer test 2830 Kbytes/sec

Linda: Basic Concepts N. Carriero and D. Gelernter Simpler, more powerful and more elegant than alternatives Tuple: Unconstrained data structure A tuple is a series of typed fields (“a string”, 15.01, 17. “another string”)

Tuple Operations Four basic operations : eval,out create new data objects in, rd remove and read data objects Operation syntax: out(“a string”, 15.01, 17, “another string”) in(“a string”, ? f, ? i, “another string”) rd(“a string”, ? f, ? i, “another string”)

Using Tuples Live Tuple: Tuple whose data is to be determined by a running process. Tuple space: Collection of tuples available to all programs Implementing data structures as a collection of tuples: n-vector V (“V”, 1, FirstElt), (“V”, 2, SecondElt) … (“V”, n, NthElt) To read the jth element: rd(“V”, j, ? x); To modify the ith element: in(“V”, j, ? OldVal); … out(“V”, j, NewVal);

Advantages of Linda over Concurrent Objects Communication, synchronization and process creation are two facets of the same operation Tuples are persistent Asynchronous communication between processes Data structures can be expressed as a collection of tuples. Live data structures are a collection of live tuples Fine grained live data structure programs

Linda and Objects Can be used with object oriented programming Generate passive objects using out Generate active objects using eval Communication with active object goes through tuple space Parallelism-oriented, unlike other methods

Conclusions Network object simplifies communication in distributed systems, but introduces new complexities Identifying objects consistently across computers Network-based garbage collection Communication between objects can be implemented in several ways RPC conveniently implements remote method access Object-oriented programming itself doesn’t implement parallelism