Linda Coordination Language Presented by Tae Ki Kim

Slides:



Advertisements
Similar presentations
An Introduction of Jini Technology Presenter: Carfield Yim, Gary Lam Date: 31-Jul-2002 How can JINI Technology Boost Our Business.
Advertisements

TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
MPI Message Passing Interface
JavaSpaces and TSpaces Theresa Tamash CDA 5937 November 4, 2002.
JINI Shashwat Shriparv InfinitySoft.
Remote Method Invocation in Java Bennie Lewis EEL 6897.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Introduction to Jini & JavaSpaces
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
EEC-681/781 Distributed Computing Systems Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
1 CS 194: Distributed Systems Distributed Coordination-based Systems Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering.
Introduction to Remote Method Invocation (RMI)
Tuple Spaces and JavaSpaces CS 614 Bill McCloskey.
490dp Prelude I: Group Membership Prelude II: Team Presentations Tuples Robert Grimm.
A Framework for Smart Proxies and Interceptors in RMI Nuno Santos P. Marques, L. Silva CISUC, University of Coimbra, Portugal
Client/Server Software Architectures Yonglei Tao.
TupleSpaces Revisited: Linda to TSpaces Ben Y. Zhao 13 July, 1998 UC Berkeley Computer Science Division.
Presented by Mark Miyashita
1 Java Programming II Java Network II (Distributed Objects in Java)
SALSA: Language and Architecture for Widely Distributed Actor Systems. Carlos Varela, Abe Stephens, Department of.
Rapid Development and Flexible Deployment of Adaptive Wireless Sensor Network Applications Chien-Liang Fok, Gruia-Catalin Roman, Chenyang Lu
DNA REASSEMBLY Using Javaspace Sung-Ho Maeung Laura Neureuter.
JavaSpaces Prabhaker Mateti Wright State University.
January 26, Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.
Architecture of Software Systems RMI and Distributed Components Martin Rehák.
Presentation: RMI Continued 2 Using The Registry & Callbacks.
A Look at Jini Jian He Roy Patrick Tan. Outline History Design Goals An Example Basic Components Top View Infrastructures --- Proxies, Discovery/join.
JavaSpaces TM By Stephan Roorda Source: JavaSpaces specification.
JavaSpaces and Linda Language Ghaith Haddad EEL6897 Fall 2007.
Implementing Remote Procedure Calls Authored by Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presented by Lars Larsson.
IBM TSpaces Lab 1 Introduction. Summary TSpaces Overview Basic Definitions Basic primitive operations Reading/writing tuples in tuplespace HelloWorld.
Presentation 18: RMI introduction. Goals of this lesson After this 35 min. lesson you will be: Introduced to Java RMI Ready to present RMI’s position.
Message Oriented Communication Prepared by Himaja Achutha Instructor: Dr. Yanqing Zhang Georgia State University.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 — Simple Object Access Protocol (SOAP) and Microsoft BizTalk™ Outline 23.1Introduction 23.2Simple.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Presentation: RMI Continued 2 Using The Registry & Callbacks.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Presentation: RMI introduction. Goals of this lesson After this 35 min. lesson you will be: Introduced to Java RMI Ready to present RMI’s position in.
Coordination Languages and their Significance Paper by: David Gelernter Nicholas Carriero Presented by: Varuna Iyengar.
Coordination Models and Languages Part I: Coordination Languages and Linda Part II: Technologies based on Tuple space concept beyond Linda Part III: Comparison.
Distributed Coordination-Based Systems Adapted from: "Distributed Systems", Tanenbaum & van Steen, course slides.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
IBM TSpaces Lab 3 Transactions Event Registration.
Virtual Real-time 3D Object Sharing for Supporting Distance Education and Training Hiroko Suzuki Faculty of Computer and Information Science, Hosei University,
Java Remote Method Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
JINI Coordination-Based System By Anthony Friel * David Kiernan * Jasper Wood.
1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas.
Presentation 11: RMI introduction. Ingeniørhøjskolen i Århus Slide 2 af 20 Goals of this lesson After these 2x35 lessons you will be –Introduced to Java.
Presentation: RMI Continued 2 Using The Registry & Callbacks.
DISTRIBUTED OBJECTS AND REMOTE INVOCATION 1. 2 Topics  Middleware  Remote Method Invocation  Remote Procedure Call.
 Java RMI Distributed Systems IT332. Outline  Introduction to RMI  RMI Architecture  RMI Programming and a Sample Example:  Server-Side RMI programming.
Network Objects Marco F. Duarte COMP 520: Distributed Systems September 14, 2004.
Remote Method Invocation RMI architecture stubs and skeletons for remote services RMI server and client in Java Creating an RMI Application step-by- step.
January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.
1 Lecture 15 Remote Method Invocation Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Distributed and Parallel Processing George Wells.
Pervasive Computing MIT SMA 5508 Spring 2006 Larry Rudolph 1 Publish & Subscribe Larry Rudolph May 3, 2006 SMA 5508 & MIT
Distributed Coordination-Based Systems
Java Distributed Object System
Remote Method Invocation
Object Spaces 9/22/2018.
Knowledge Byte In this section, you will learn about:
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
An Introduction of Jini Technology
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
Coordination Models and Languages
Java Remote Method Invocation
Presentation transcript:

Linda Coordination Language Presented by Tae Ki Kim

Outline Linda C-Linda Java Space

Linda Parallel coordination language Virtual shared memory system on heterogeneous networks Associative addressing through efficient hashing Simple language primitives allow minimal code rewriting:  In(), Out() moves “tuples” to/from TupleSpace  Eval() spawns processes in Tuplespace  Rd() does non-destructive reads in T.S.  Inp(), Rdp() are non-blocking versions of In() and Rd()

Tuplespace

C-Linda Language The C-Linda programming language is the combination of the C and the Linda language. The C-Linda is one realization of the Linda model. The C-Linda supports six Linda functions.

C-Linda Functions Out(t) – causes tuple t to be added to tuple space Out(“a string”, 15.01, 17, x) Out(0, 1) In(s) – causes some tuple t that matches anti-tuple s to be withdrawn from tuple space. In(“a string”, ? F, ? I, y)

C-Linda Functions Rd(s) is the same as in(s) except that the matched tuple remains in tuple space. Eval(t) is the same as out(t), except that it sends an active tuple into Tuplespace. –For example, out(“foo”, 3, 4.3) Eval(“factorial”, 7, fact(7))

C-Linda Functions Inp and Rdp – predicate versions of in and rd, attempt to locate a matching tuple and return 0 if they fail; otherwise they return 1.

Example of Tuple matching N-element vector stored as n tuples in the Tuple space (“V”, 1, FirstElt) (“V”, 2, SecondElt) … (“V”, n, NthElt) To read the jth element and assign it to x, use Rd(“V”, j, ?x)

/* hello.clc: a simple C-Linda program */ #include "linda.h" int worker(int num) { int i; for (i=0; i<num; i++) out("hello, world"); return 0; } int real_main(int argc, char *argv[]) { int result; eval("worker", worker(5)); in("hello, world"); in("worker", ? result); return 0; }

Benefits of C-Linda Anonymous and asynchronous communication Associative addressing / pattern matching Data persistence independent of creator Simple API  less and easier coding Ease of code transformation

C-Linda Limitations High system overhead Designed as parallel computing model, primarily for LANs –Lack of security model –Lack of transaction semantics Language specific implementation Blocking calls, but no notification mechanism

JavaSpaces (Sun Micro) Lightweight infrastructure for network applications Distributed functionality implemented through RMI Entries written to/from JavaSpace with “write, read” “notify” notifies client of incoming entries w/ timeout

JavaSpace Pattern Matching done to templates with class type comparisons, no comparison of literals. Transaction mechanism with a two phase commit model Entries are writtern with a “lease”, so limited persistence with time-outs.

package examples.spaces; import net.jini.impl.outrigger.binders.RefHolder; import net.jini.lease.Lease; import net.jini.space.JavaSpace; import net.jini.transaction.Transaction; import java.rmi.Naming; import java.rmi.RMISecurityManager; public class HelloWorld { /** * Get a remote reference to a particular space */ public JavaSpace getSpace() { try { // RefHolderImpl is the remote object registered with // the registry // RefHolder rh = (RefHolder)Naming.lookup("JavaSpace"); // Use the RefHolder's proxy method to get the space // reference // JavaSpace js = (JavaSpace)rh.proxy(); return js; } catch (Exception e) { System.err.println(e.getMessage()); } return null; }

public static void main(String [] args) { // Set a security manager so that the MyEntry class // can be downloaded from this codebase to the server // if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } // Create an instance of this class to call the getSpace // method JavaSpace space = (new HelloWorld()).getSpace(); System.out.println("Got a remote reference" + "to a JavaSpace implementation"); //Create an Entry to write in to the space // MyEntry msg = new MyEntry(); msg.content = "Howdy";

// The transaction under which to perform the write // Transaction txn = null; // The lease duration that should be requested for // this entry long timeToLive = Lease.FOREVER; try { space.write(msg, txn, timeToLive); System.out.println("Wrote an Entry to the space"); MyEntry template = new MyEntry(); // Set attribute to be null, so it will act as a // wildcard and match on any MyEntry // template.content = null; System.out.println("Created a template");

// The amount of time to wait for a match // long timeToWait = 0L; // The transaction under which to perform the read // Transaction sotxn = null; MyEntry result = (MyEntry) space.read (template, sotxn, timeToWait); System.out.println("Read the an Entry from the space"); String valueToPrint = ""; valueToPrint = result.content; System.out.println("And the result was: " + valueToPrint); } catch (Exception e) { e.printStackTrace(System.err); } System.exit(0); }

JavaSpace Limitations Simplicity of or lack of security model Java RMI = performance bottleneck Currently only a specification exists, but no implementation

More Tuple Space Implemetations Java Messaging Service(JMS), a Message- Oriented Middleware (MOM) layer API, shares many of the same architectural strengths of JavaSpaces while offering some added benefits. Tspaces (IBM Almaden) PageSpace and JADA LIME XML Dataspaces Mobile Agent Reactive Space(MARS)

Conclusion "Space-based" architectures are extremely flexible, providing most of the core infrastructure necessary to support distributed, mobile, and intelligent software agents. The language is although intuitive, but minimal Security. Linda is not fault-tolerant