SALSA: Language and Architecture for Widely Distributed Actor Systems. Carlos Varela, Abe Stephens, Department of.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

DISTRIBUTED COMPUTING PARADIGMS
Building Distributed Applications using JAVA - RMI
Agents & Mobile Agents.
DISTRIBUTED OBJECTS AND REMOTE INVOCATION
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Technical Architectures
Rheeve: A Plug-n-Play Peer- to-Peer Computing Platform Wang-kee Poon and Jiannong Cao Department of Computing, The Hong Kong Polytechnic University ICDCSW.
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.
DISTRIBUTED FILE SYSTEM USING RMI
Persistent State Service 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators.
Performance Management 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators.
1 © 2002 Alberto Montresor The Jgroup Project Alberto Montresor Ozalp Babaoglu University of Bologna - Italy Department of Computer Science.
Communication in Distributed Systems –Part 2
1 Programming systems for distributed applications Seif Haridi KTH/SICS.
.NET Mobile Application Development Remote Procedure Call.
A Framework for Smart Proxies and Interceptors in RMI Nuno Santos P. Marques, L. Silva CISUC, University of Coimbra, Portugal
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Jaeki Song ISQS6337 JAVA Lecture 16 Other Issues in Java.
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
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.
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.
Crossing The Line: Distributed Computing Across Network and Filesystem Boundaries.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
POS 406 Java Technology And Beginning Java Code
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
7/26/ Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
CS 4244: Internet Programming Network Programming in Java 1.0.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
C. Varela1 Distributed systems abstractions (PDCS 9, CPE 6*) Carlos Varela Rennselaer Polytechnic Institute October 20, 2015 * Concurrent Programming in.
Remote Method Invocation A Client Server Approach.
HParC language. Background Shared memory level –Multiple separated shared memory spaces Message passing level-1 –Fast level of k separate message passing.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Java Distributed Object System
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Chapter 5 Remote Procedure Call
Chapter No. : 1 Introduction to Java.
Distributed systems abstractions (PDCS 9, CPE 6*)
CGS 3763 Operating Systems Concepts Spring 2013
DISTRIBUTED COMPUTING
The command invocation protocol
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Distributed (Systems) Programming Universal Actors, SALSA, World-Wide Computer Carlos Varela RPI C. Varela.
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
WebServices Using JAX-RPC
Chapter 4: Threads & Concurrency
Introducing Java.
Concurrent Programming Actors, SALSA, Coordination Abstractions
Chap 1. Getting Started Objectives
Java Remote Method Invocation
Distributed System using Web Services
Presentation transcript:

SALSA: Language and Architecture for Widely Distributed Actor Systems. Carlos Varela, Abe Stephens, Department of Computer Science Rensselaer Polytechnic Institute Troy NY, USA AAMAS 2002, University of Bologna Italy.

Actor Fundamentals Introduced by C. Hewitt (77), further refined and developed by G. Agha et al (85-present) An Actor encapsulates a thread of execution with a collection of objects. Only the actor’s thread may access its objects directly and change their state. Provides for implicit object synchronization.

Actor Fundamentals Actors communicate by sending messages to each other. Messages are sent asynchronously. Messages are not necessarily processed in the order they are sent or received.

Actor Implementation collection of objects mailbox Thread

Worldwide Computing Distributed computing over the Internet. Access to large number of processors offsets slow communication and reliability issues. Seeks to create a platform for many applications.

World-Wide Computer Worldwide Computing platform implementation. Provides a runtime middleware for actors. Includes support for naming services. Message sending protocol. Support for actor migration.

Remote Message Sending Protocol Messages between actors are sent using RMSP. RMSP is implemented using Java Object Serialization. Protocol used for both message sending and actor migration. When an actor migrates, its location changes but its name does not.

WWC Theaters Theater programs provide execution location for actors. Provide a layer beneath actors for message passing. Example location: rmsp://wwc.cs.rpi.edu/calendarInstance10 Theater address and port. Actor location.

Environmental Actors Theaters may provide environmental actors. Perform actions specific to the theater and are not mobile. Include standard input and standard output actors.

Universal Naming Consists of human readable names. Provides location transparency to actors. Name to location mappings efficiently updated as actors migrate.

Universal Actor Naming UAN servers provide mapping between static names and dynamic locations. –Example: uan://wwc.cs.rpi.edu/stepha/calendar Name server address and port. Actor name.

Universal Actors Universal Actors extend the actor model by associating a location and a universal name with the actor. Universal Actors may migrate between theaters and update the name server.

Universal Actor Implementation collection of objects mailbox Thread UANUAL Theater

Simple Actor Language System and Architecture SALSA is an actor oriented programming language. Supports Universal Naming (UAN & UAL). Primitives for –Message sending. –Migration. –Coordination. Closely tied to WWC platform.

SALSA Basics Programmers define behaviors for actors. Messages are sent asynchronously. Messages are modeled as potential method invocations. Continuation primitives are used for coordination.

Message Sending TravelAgent a = new TravelAgent(); a<-book( flight );

Remote Message Sending Obtain a remote actor reference by name. TravelAgent a = new TravelAgent(); a<-printItinerary(); Obtain a remote actor reference by location. a<-printItinerary();

Migration Creating a new Actor an migrating it to a remote theater. TravelAgent a = new TravelAgent(); a<-bind( “uan://myhost/ta”, “rmsp://myhost/agent1” a<-book( flight ); Obtaining a remote actor reference and migrating it. a<-migrate( “rmsp://yourhost/travel” a<- printItinerary();

Token Passing Continuation Insures that each message in the expression is sent after the previous message has been processed. It also allows that the return value of one message invocation may be used as an argument for a later invocation in the expression. –Example: a2<-m2( token ); Send m1 to a1 and then after m1 finishes, send the result with m2 to a2.

Join Continuation Provides a mechanism for synchronizing the processing of a set of messages. Set of results is sent along as a token. –Example: Actor[] actors = { searcher0, searcher1, searcher2, searcher3 }; join( actors<-find( phrase ) resultActor<-output( token ); Send the find( phrase ) message to each actor in actors[] then after all have completed send the result to resultActor with an output( … ) message.

Acknowledged Multicast join( a1<-m1(), a2<-m2, a3<-m3(), … cust<-n(token);

Lines of Code Comparison JavaFoundrySALSA Acknowledged Multicast

First Class Continuation Enable actors to delegate computation of a third party independently of the processing context. Unimplemented in current release.

SALSA and Java SALSA source files are compiled into Java source files before being compiled into Java byte code. SALSA programs may take full advantage of Java API.

SALSA Language Package

Hello World Example module demo; behavior HelloWorld { void act( String[] argv ) { standardOutput<-print( "Hello" standardOutput<-print( "World!" ); }

Hello World Example The act( String[] args ) message handler is similar to the main(…) method in Java and is used to bootstrap SALSA programs.

Migration Example module demo; behavior Migrate { void print() { standardOutput<-println( "Migrate actor just migrated here." ); } void act( String[] args ) { if (args.length != 3) { standardOutput<-println( “Usage: java migration.Migrate “ + “ " ); return; } bind( args[0], args[1] migrate( args[2] print(); } };

Migration Example The program must be bound to a valid name and location. After binding the actor sends the print message to itself before migrating to the second theater and sending the message again.

Compilation $ java SALSACompiler demo/Migrate.SALSA SALSA Compiler Version 0.3: Reading from file demo/Migrate.SALSA... SALSA Compiler Version 0.3: SALSA program parsed successfully. SALSA Compiler Version 0.3: SALSA program compiled successfully. $ javac demo/Migrate.java $ java demo.Migrate Usage: java migration.Migrate $ Compile Migrate.SALSA file into Migrate.java. Compile Migrate.java file into Migrate.class. Execute Migrate

Migration Example theater 1theater 2 The actor will print "Migrate actor just migrated here." at theater 1 then theater 2. UAN Server

World Migrating Agent Example Local actor creation386us Local message sending LAN message sending WAN message sending 148 us ms 2-3 s LAN minimal actor migration LAN 100Kb actor migration WAN minimal actor migration WAN 100Kb actor migration ms ms 3-7 s s HostLocationOS/JVMProcessor yangtze.cs.uiuc.eduUrbana IL, USASolaris JDK 1.1.6Ultra 2 Vulcain.ecoledoc.lip6.frParis, FranceLinux JDK 1.2pre2 Pentium II 350Mhz Solar.isr.co.jpTokyo, JapanSolaris 2.6 JDK 1.1.6Sparc 20

Mean Calculation Example DataSource actor assigns tasks to Worker actors. Worker actors on remote theaters calculate result and send it to a Supervisor actor. Coordinates between many Worker actors.

Mean Calculation Example theater 1theater 2 UAN Server theater 3theater 4 DataSource Supervisor Worker

Web Search Example Manager actor multicasts search queries between distributed Indexer actors. Mobile Indexer actors create word lists from web sites.