CA341 - Comparative Programming Languages

Size: px
Start display at page:

Download "CA341 - Comparative Programming Languages"

Transcription

1 CA341 - Comparative Programming Languages David Sinclair There are 3 common memory models: RAM Random Access Memory is the most common memory model. In programming language terms, this means that variables are represented by an identifier that maps to the physical address of the variable in RAM. Stack All variables are held in the stack. Operators take their operands from the stack and push their result back onto the stack. For example, the ADD operator takes the top 2 items from the stack, adds them together and pushes the result into the stack. This model is used in the JVM.

2 (2) Associative This is also known as Content Addressable Memory. Typically data is stored in tuples (an ordered set of data items) and memory is addressed by the contents of the tuple. This form of memory is used in specific environments where memory is either outside the processor s address space or where the data is constantly being moved for optimisation purposes. Classic examples of this are databases and distributed processing. Associative Memory is also used in caches, artificial neural networks and data compression hardware. There are standards and hardware implementations of Content Addressable Memory. SQL An example of Associative Memory in Databases and the implications in terms of programming languages is SQL. In SQL, data is stored as tuples (rows) in relations (tables). For example, consider 2 relations, Student and Apply. The tuples in the Student relation contain the fields sname and sid. The tuples in the Apply relation contain the fields sid, degree and university. An SQL query to find the ID and name of the students who have applied for Computer Science ( CS ) but not Electronic Engineering ( EE ) is: select sid, sname from Student where sid in ( select sid from Apply where degree= CS ) and sid not in ( select sid from Apply where degree= EE );

3 SQL (2) The 2 subqueries retrieve the contents of the sid field based on the contents of the degree field in the Apply relation. The main query retrieves the sid and sname fields from the Student relation based on a subset of sid values from the Apply relation. By using Associative Memory, this allows the database engine to optimise the execution of a query by moving where data is stored. The order of the tuples in a relation, and the order of fields in the tuples can be modified at runtime without requiring the query to be changed. Tuple Spaces A tuple space is a logically shared, associatively addressed memory space into which tuples are placed and removed from. A tuple is simply an ordered collection of data elements. Tuple Spaces have been implemented in many programming languages. One of the most common implementation is Javaspaces. JavaSpaces is derived from the Linda system developed by David Gelernter. Linda is a machine independent concurrent programming concept. It, in itself, is not a language but an extension to existing sequential languages, which provides for concurrent processing. JavaSpaces extends the main ideas of Linda to the world of Java. The tuple space is replaced by a JavaSpace and the tuples are replaced by Java objects in the form of Entrys. One of the advantages of this is that the JavaSpace is aware of Java?s strong type system while retaining the associative addressing properties of Linda.

4 JavaSpaces Every object stored in a JavaSpace must implement the Entry interface and is a strongly typed collection of public, nonstatic, nonfinal, nontransient objects. An Entry is searched for using the same techniques and matching rules as used in the Jini lookup service. JavaSpaces is distributed with Jini development kit and is implemented by a fully-fledged service called outrigger. Since JavaSpaces uses transactions so we also have to run the transaction service mahalo. The Javaspace Interface The programming model for JavaSpaces follows a passive, type-aware version of the Linda programming model. package net. jini. space ; public interface JavaSpace public final long NO WAIT = 0; Lease write (Entry e, Transaction txn, long lease ) throws RemoteException, TransactionException ; Entry read (Entry tmpl, Transaction txn, long timeout) throws RemoteException, TransactionException, UnusableEntryException, InterruptedException ; Entry readifexists (Entry tmpl, Transaction txn, long timeout) throws RemoteException, TransactionException, UnusableEntryException, InterruptedException ; Entry take (Entry tmpl, Transaction txn, long timeout) throws RemoteException, TransactionException, UnusableEntryException, InterruptedException ;

5 The Javaspace Interface (2) The programming model for JavaSpaces follows a passive, type-aware version of the Linda programming model. Entry takeifexists (Entry tmpl, Transaction txn, long timeout) throws RemoteException, TransactionException, UnusableEntryException, InterruptedException ; EventRegistration notify (Entry tmpl, Transaction txn, RemoteEventListener l, long lease, MarshalledObject obj ) throws RemoteException, TransactionException ; Entry snapshot (Entry e) throws RemoteException; The write() method adds an Entry to the JavaSpace. It takes a parameter that specifies which Transaction the write() method is part of (this can be null if you do not wish the write() method to be part of any operation). The final argument specifies the requested lease duration (in milliseconds). The Javaspace Interface (3) The read() method is used to read an Entry from the JavaSpace. The read() method takes a template as an argument and returns an Entry in the JavaSpace that matches the template. If there is more than one Entry in the JavaSpace that matches the template then the JavaSpace is free to pick any matching Entry. If there is no Entry in the JavaSpace that matches the template then the read() method will wait for timeout milliseconds before returning. The readifexists() method is like the read() method except that it will block for timeout milliseconds if the only possible matching Entry is involved in a transaction, otherwise it returns immediately. The read() and readifexists() methods can also be part of a transaction.

6 The Javaspace Interface (4) The take() and takeifexists() methods are similar to the read() and readifexists() methods except that they remove the returned Entry from the JavaSpace. The notify() method is used to register an interest in an Entry that matches a specified template being entered into the JavaSpace. This method takes a template, a transaction, a RemoteEventListener, a requested lease duration and a MarshalledObject as arguments and returns an EventRegistration. If an Entry that matched the template is added to the JavaSpace while the lease is active then the notify() method in the RemoteEventListener is invoked. The Javaspace Interface (5) The snapshot() method provides an optimisation to improve the performance of JavaSpaces. Every time you pass an Entry as an argument of a JavaSpace method the Entry needs to be serialised. This can be a time consuming process. The snapshot() method takes an Entry and returns an Entry that can be used on future calls to the same JavaSpace. The advantage is that the returned Entry no longer needs to be serialised. This can result is a huge performance boost.

7 JavaSpace Diagram (c) Sun MicroSystems JavaSpaces Example import net. jini. core. entry. ; public class Message implements Entry public String content ; public Message () public Message( String content ) this. content = content ; public String tostring () return ( Message is : + content );

8 JavaSpaces Example (2) import net. jini. core. discovery. LookupLocator ; import net. jini. core. lookup. ; import net. jini. core. entry. Entry ; import net. jini. space. JavaSpace; import net. jini. lookup. entry. ; public class HelloWorld public static void main( String [] args ) try System. out. println ( Create Message entry ); Message msg = new Message( Hello World ); Class [] types = new Class [] JavaSpace. class ; ServiceTemplate template = new ServiceTemplate ( null, types, null ); JavaSpace space = (JavaSpace) registrar. lookup (template ); JavaSpaces Example (3) space. write (msg, null, Lease.FOREVER); Message template = new Message (); Message result = (Message) space. read(template, null,long.max VALUE); System. out. println ( result ); catch(exception e) e. printstacktrace (); System. exit (0);

9 Linda The original Linda programming model has operations equivalent to the JavaSpaces methods. JavaSpaces Linda write() out() read() rd() readifexists() rdp() take() in() takeifexists() inp() But Linda also has the concept of active tuples which are placed into a tuple space using the eval() operation. The eval() operation creates a thread in the tuple space that resolves the active tuple into a normal tuple. eval (find name(), calc score(), "CA341") Linda can be added to many languages; for example C-Linda is Linda implemented in a C language environment. Linda (2)

Distributed Systems/Middleware JavaSpaces

Distributed Systems/Middleware JavaSpaces Distributed Systems/Middleware JavaSpaces Alessandro Sivieri Dipartimento di Elettronica e Informazione Politecnico, Italy sivieri@elet.polimi.it http://corsi.dei.polimi.it/distsys Slides based on previous

More information

JavaSpaces Specification

JavaSpaces Specification JavaSpaces Specification The JavaSpaces technology package provides a distributed persistence and object exchange mechanism for code written in the Java programming language. Objects are written in entries

More information

Middleware-Konzepte. Tuple Spaces. Dr. Gero Mühl

Middleware-Konzepte. Tuple Spaces. Dr. Gero Mühl Middleware-Konzepte Tuple Spaces Dr. Gero Mühl Kommunikations- und Betriebssysteme Fakultät für Elektrotechnik und Informatik Technische Universität Berlin Agenda > Introduction > Linda Tuple Spaces >

More information

JavaSpaces technology for distributed communication and collaboration. Chih-Yao Hsieh

JavaSpaces technology for distributed communication and collaboration. Chih-Yao Hsieh JavaSpaces technology for distributed communication and collaboration Chih-Yao Hsieh Computer Science and Engineering University of Texas at Arlington chsieh@cse.uta.edu Abstract This paper will give an

More information

Linda, JavaSpaces & Jini

Linda, JavaSpaces & Jini ECE 451/566 - Introduction to Parallel and Distributed Computing Linda, JavaSpaces & Jini Manish Parashar parashar@ece.rutgers.edu Department of Electrical & Computer Engineering Rutgers University Linda

More information

COMP 4905 Honours Project Winter RSpace : A Tuple Space Implementation Using RESTful Web Services

COMP 4905 Honours Project Winter RSpace : A Tuple Space Implementation Using RESTful Web Services COMP 4905 Honours Project Winter 2014 RSpace : A Tuple Space Implementation Using RESTful Web Services Author: Paul Hayman Student #: 100797901 Project Supervisor : Professor Tony White 1 Abstract RSpace

More information

1 of 10 11/13/2007 7:35 AM CS 696 Emerging Technologies: Java Distributed Computing Spring Semester, 1999 Simple Jini Example Previous Lecture Notes Index Next 1999, All Rights Reserved, SDSU & Roger Whitney

More information

SFDV3006 Concurrent Programming

SFDV3006 Concurrent Programming SFDV3006 Concurrent Programming Lecture 6 Concurrent Architecture Concurrent Architectures Software architectures identify software components and their interaction Architectures are process structures

More information

Distributed Programming in Java

Distributed Programming in Java Distributed Programming in Java Distribution (5) RPC-style middleware Disadvantages: Strongly coupled Synchronous Limited extensibility Advantages: Transparency. Type safety 2/24 Space-based middleware

More information

Page 1. CS 194: Distributed Systems Distributed Coordination-based Systems. Coordination Systems. Taxonomy of Coordination Models

Page 1. CS 194: Distributed Systems Distributed Coordination-based Systems. Coordination Systems. Taxonomy of Coordination Models Coordination Systems CS 194: Distributed Systems Distributed Coordination-based Systems Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences

More information

Jini Connection Technology Architecture Overview

Jini Connection Technology Architecture Overview Jini Connection Technology Architecture Overview Bill Day bill.day@sun.com www.billday.com Technology Evangelist Sun Microsystems Agenda Why Jini? What is Jini? Jini Architecture Overview The Details Example

More information

Abstract Memory The TupleSpace

Abstract Memory The TupleSpace Abstract Memory The TupleSpace Linda, JavaSpaces, Tspaces and PastSet Tuple Space Main idea: Byte ordered memory is a product of hardware development, not programmers needs Remodel memory to support the

More information

Ubiquitous Computing Summer Supporting distributed applications. Distributed Application. Operating System. Computer Computer Computer.

Ubiquitous Computing Summer Supporting distributed applications. Distributed Application. Operating System. Computer Computer Computer. Episode 11: Middleware Hannes Frey and Peter Sturm University of Trier Middleware Supporting distributed applications Distributed Application Middleware Operating System Operating System Operating System

More information

New and Improved: Linda in Java

New and Improved: Linda in Java New and Improved: Linda in Java George C. Wells Department of Computer Science, Rhodes University, Grahamstown, 6140, South Africa G.Wells@ru.ac.za Abstract This paper discusses the current resurgence

More information

Info 408 Distributed Applications Programming Exercise sheet nb. 4

Info 408 Distributed Applications Programming Exercise sheet nb. 4 Lebanese University Info 408 Faculty of Science 2017-2018 Section I 1 Custom Connections Info 408 Distributed Applications Programming Exercise sheet nb. 4 When accessing a server represented by an RMI

More information

The Jini architecture. Johan Petrini and Henning Sundvall

The Jini architecture. Johan Petrini and Henning Sundvall The Jini architecture Johan Petrini and Henning Sundvall Distributed Systems Fall 2002 Abstract A technology has been developed that exemplifies a new approach to the architecture of computing systems.

More information

Implementing Jini Servers without Object Serialization Support

Implementing Jini Servers without Object Serialization Support Implementing Jini Servers without Object Serialization Support Tero Hasu Helsinki University of Technology Telecommunications Software and Multimedia Laboratory tero.hasu@hut.fi Abstract Jini is a technology

More information

Linda, FT-Linda, and Jini

Linda, FT-Linda, and Jini 1 Linda, FT-Linda, and Jini A concrete Example of CDKB5 Chapter 6: Indirect Communications Prof. Dave Bakken CptS 464/564 February 7, 2018 2 Outline of Lecture & Further Resources Linda TM http://www.cs.yale.edu/linda/linda.html

More information

Space Exploration EECS /25

Space Exploration EECS /25 1/25 Space Exploration EECS 4315 www.eecs.yorku.ca/course/4315/ Nondeterminism 2/25 Nondeterministic code is code that, even for the same input, can exhibit different behaviours on different runs, as opposed

More information

one.world Towards a System Architecture for Pervasive Computing

one.world Towards a System Architecture for Pervasive Computing Towards a System Architecture for Pervasive Computing Robert Grimm, Janet Davis, Ben Hendrickson, Eric Lemar, Tom Anderson, Brian Bershad, Gaetano Borriello, David Wetherall University of Washington Vision

More information

CS 351 Design of Large Programs Threads and Concurrency

CS 351 Design of Large Programs Threads and Concurrency CS 351 Design of Large Programs Threads and Concurrency Brooke Chenoweth University of New Mexico Spring 2018 Concurrency in Java Java has basic concurrency support built into the language. Also has high-level

More information

Screen Saver Science: Realizing Distributed Parallel Computing with Jini and JavaSpaces

Screen Saver Science: Realizing Distributed Parallel Computing with Jini and JavaSpaces Screen Saver Science: Realizing Distributed Parallel Computing with Jini and JavaSpaces William L. George and Jacob Scott National Institute of Standards and Technology Information Technology Laboratory

More information

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

DISTRIBUTED OBJECTS AND REMOTE INVOCATION DISTRIBUTED OBJECTS AND REMOTE INVOCATION Introduction This chapter is concerned with programming models for distributed applications... Familiar programming models have been extended to apply to distributed

More information

Using JavaSpaces to create adaptive distributed systems

Using JavaSpaces to create adaptive distributed systems Using JavaSpaces to create adaptive distributed systems Fritjof Boger Engelhardtsen Ph. D student, Agder University College, Faculty of Engineering and Science Tommy Gagnes Researcher, Norwegian defence

More information

Parsing Scheme (+ (* 2 3) 1) * 1

Parsing Scheme (+ (* 2 3) 1) * 1 Parsing Scheme + (+ (* 2 3) 1) * 1 2 3 Compiling Scheme frame + frame halt * 1 3 2 3 2 refer 1 apply * refer apply + Compiling Scheme make-return START make-test make-close make-assign make- pair? yes

More information

The security mechanisms of Java

The security mechanisms of Java The security mechanisms of Java Carlo U. Nicola, SGI FHNW With extracts from publications of : Sun developers' center documentation; David A. Wheeler, UC Berkeley; Klaus Ostermann, TH-Darmstadt. Topics

More information

CA341 - Comparative Programming Languages

CA341 - Comparative Programming Languages CA341 - Comparative Programming Languages David Sinclair Dynamic Data Structures Generally we do not know how much data a program will have to process. There are 2 ways to handle this: Create a fixed data

More information

CMSC 132: Object-Oriented Programming II

CMSC 132: Object-Oriented Programming II CMSC 132: Object-Oriented Programming II Synchronization in Java Department of Computer Science University of Maryland, College Park Multithreading Overview Motivation & background Threads Creating Java

More information

Inter-process communication (IPC)

Inter-process communication (IPC) Inter-process communication (IPC) We have studied IPC via shared data in main memory. Processes in separate address spaces also need to communicate. Consider system architecture both shared memory and

More information

Question Points Score

Question Points Score CS 453 Introduction to Compilers Midterm Examination Spring 2009 March 12, 2009 75 minutes (maximum) Closed Book You may use one side of one sheet (8.5x11) of paper with any notes you like. This exam has

More information

CS193k, Stanford Handout #12. Threads 4 / RMI

CS193k, Stanford Handout #12. Threads 4 / RMI CS193k, Stanford Handout #12 Spring, 99-00 Nick Parlante Threads 4 / RMI Semaphore1 Semaphore1 from last time uses the count in a precise way to know exactly how many threads are waiting. In this way,

More information

PARALLEL PROGRAM EXECUTION SUPPORT IN THE JGRID SYSTEM

PARALLEL PROGRAM EXECUTION SUPPORT IN THE JGRID SYSTEM PARALLEL PROGRAM EXECUTION SUPPORT IN THE JGRID SYSTEM Szabolcs Pota 1, Gergely Sipos 2, Zoltan Juhasz 1,3 and Peter Kacsuk 2 1 Department of Information Systems, University of Veszprem, Hungary 2 Laboratory

More information

Remote Method Invocation

Remote Method Invocation Non-101samples available here: https://github.com/101companies/101repo/tree/master/languages/aspectj/javarmisamples Remote Method Invocation Prof. Dr. Ralf Lämmel Universität Koblenz-Landau Software Languages

More information

Relational Algebra. Note: Slides are posted on the class website, protected by a password written on the board

Relational Algebra. Note: Slides are posted on the class website, protected by a password written on the board Note: Slides are posted on the class website, protected by a password written on the board Reading: see class home page www.cs.umb.edu/cs630. Relational Algebra CS430/630 Lecture 2 Slides based on Database

More information

A Model For Describing and Executing Test Cases Using XML and Jini/JavaSpaces

A Model For Describing and Executing Test Cases Using XML and Jini/JavaSpaces MASTER OF SCIENCE THESIS A Model For Describing and Executing Test Cases Using XML and Jini/JavaSpaces By Roland Ljungh Stockholm, November 2000 Examiner and Adviser: Björn Pehrson and Vladimir Vlassov

More information

Separating Access Control Policy, Enforcement, and Functionality in Extensible Systems. Robert Grimm University of Washington

Separating Access Control Policy, Enforcement, and Functionality in Extensible Systems. Robert Grimm University of Washington Separating Access Control Policy, Enforcement, and Functionality in Extensible Systems Robert Grimm University of Washington Extensions Added to running system Interact through low-latency interfaces Form

More information

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A Contents Java RMI G53ACC Chris Greenhalgh Java RMI overview A Java RMI example Overview Walk-through Implementation notes Argument passing File requirements RPC issues and RMI Other problems with RMI 1

More information

CS 3305 Intro to Threads. Lecture 6

CS 3305 Intro to Threads. Lecture 6 CS 3305 Intro to Threads Lecture 6 Introduction Multiple applications run concurrently! This means that there are multiple processes running on a computer Introduction Applications often need to perform

More information

Concurrent Programming using Threads

Concurrent Programming using Threads Concurrent Programming using Threads Threads are a control mechanism that enable you to write concurrent programs. You can think of a thread in an object-oriented language as a special kind of system object

More information

Run-time Program Management. Hwansoo Han

Run-time Program Management. Hwansoo Han Run-time Program Management Hwansoo Han Run-time System Run-time system refers to Set of libraries needed for correct operation of language implementation Some parts obtain all the information from subroutine

More information

Middleware-Integration of Small Devices

Middleware-Integration of Small Devices Middleware-Integration of Small Devices Michael Mock Fraunhofer-Institute Autonomous Intelligent Systems 53754 St. Augustin michael.mock@ais.fraunhofer.de Stefan Couturier B-IT Bonn-Aachen International

More information

02 B The Java Virtual Machine

02 B The Java Virtual Machine 02 B The Java Virtual Machine CS1102S: Data Structures and Algorithms Martin Henz January 22, 2010 Generated on Friday 22 nd January, 2010, 09:46 CS1102S: Data Structures and Algorithms 02 B The Java Virtual

More information

Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multit

Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multit Threads Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multitasking Thread-based multitasking Multitasking

More information

Introduction & RMI Basics. CS3524 Distributed Systems Lecture 01

Introduction & RMI Basics. CS3524 Distributed Systems Lecture 01 Introduction & RMI Basics CS3524 Distributed Systems Lecture 01 Distributed Information Systems Distributed System: A collection of autonomous computers linked by a network, with software to produce an

More information

Chapter 5 Distributed Objects and Remote Invocation

Chapter 5 Distributed Objects and Remote Invocation CSD511 Distributed Systems 分散式系統 Chapter 5 Distributed Objects and Remote Invocation 吳俊興 國立高雄大學資訊工程學系 Chapter 5 Distributed Objects and Remote Invocation 5.1 Introduction 5.2 Communication between distributed

More information

CS455: Introduction to Distributed Systems [Spring 2019] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2019] Dept. Of Computer Science, Colorado State University CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] The House of Heap and Stacks Stacks clean up after themselves But over deep recursions they fret The cheerful heap has nary a care Harboring memory

More information

Trading Services for Distributed Enterprise Communications. Dr. Jean-Claude Franchitti. Presentation Agenda

Trading Services for Distributed Enterprise Communications. Dr. Jean-Claude Franchitti. Presentation Agenda Page 1 Trading Services for Distributed Enterprise Communications Dr. Jean-Claude Franchitti Presentation Agenda Enterprise Systems Technology Classifications Naming, Directory, and Trading Services in

More information

read write take entries Space read(waiting) write

read write take entries Space read(waiting) write Formal specication of JavaSpaces TM architecture using CRL Jaco van de Pol Miguel Valero Espada Centrum voor Wiskunde en Informatica P.O. Box 94079, 1090 GB Amsterdam, The Netherlands Email: fjaco.van.de.pol,

More information

Final Score Name SOLUTION ID Extra Credit. 15% of course grade

Final Score Name SOLUTION ID Extra Credit. 15% of course grade Final Score Name SOLUTION ID Extra Credit Section (circle one): TTh 8:00-9:20 TTh 9:30-10:50 TTh 11:00-12:20 15% of course grade 1. Inheritance When Java was developed, it was scrutinized since it only

More information

CS 153 Lab4 and 5. Kishore Kumar Pusukuri. Kishore Kumar Pusukuri CS 153 Lab4 and 5

CS 153 Lab4 and 5. Kishore Kumar Pusukuri. Kishore Kumar Pusukuri CS 153 Lab4 and 5 CS 153 Lab4 and 5 Kishore Kumar Pusukuri Outline Introduction A thread is a straightforward concept : a single sequential flow of control. In traditional operating systems, each process has an address

More information

Distributed object component middleware I - Java RMI

Distributed object component middleware I - Java RMI Prof. Dr. Claudia Müller-Birn Institute for Computer Science, Networked Information Systems Distributed object component middleware I - Java RMI Nov 15th, 2011 Netzprogrammierung (Algorithmen und Programmierung

More information

CA Compiler Construction

CA Compiler Construction CA4003 - Compiler Construction David Sinclair When procedure A calls procedure B, we name procedure A the caller and procedure B the callee. A Runtime Environment, also called an Activation Record, is

More information

IBD Intergiciels et Bases de Données

IBD Intergiciels et Bases de Données IBD Intergiciels et Bases de Données RMI-based distributed systems Fabien Gaud, Fabien.Gaud@inrialpes.fr Overview of lectures and practical work Lectures Introduction to distributed systems and middleware

More information

Jini Technology Overview

Jini Technology Overview Jini Technology Overview Bob Scheifler Senior Staff Engineer Sun Microsystems, Inc Talk outline very brief Jini overview Jini lookup service in some depth service types and type matching attributes and

More information

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] Frequently asked questions from the previous class survey

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [THREADS] Shrideep Pallickara Computer Science Colorado State University L6.1 Frequently asked questions from the previous class survey L6.2 SLIDES CREATED BY:

More information

Distributed object component middleware I - Java RMI

Distributed object component middleware I - Java RMI Prof. Dr. Claudia Müller-Birn Institute for Computer Science, Networked Information Systems Distributed object component middleware I - Java RMI Nov 15th, 2011 Netzprogrammierung (Algorithmen und Programmierung

More information

Need for synchronization: If threads comprise parts of our software systems, then they must communicate.

Need for synchronization: If threads comprise parts of our software systems, then they must communicate. Thread communication and synchronization There are two main aspects to Outline for Lecture 19 multithreaded programming in Java: I. Thread synchronization. thread lifecycle, and thread synchronization.

More information

5 Distributed Objects: The Java Approach

5 Distributed Objects: The Java Approach 5 Distributed Objects: The Java Approach Main Points Why distributed objects Distributed Object design points Java RMI Dynamic Code Loading 5.1 What s an Object? An Object is an autonomous entity having

More information

Electronic Payment Systems (1) E-cash

Electronic Payment Systems (1) E-cash Electronic Payment Systems (1) Payment systems based on direct payment between customer and merchant. a) Paying in cash. b) Using a check. c) Using a credit card. Lecture 24, page 1 E-cash The principle

More information

Operating System Services

Operating System Services CSE325 Principles of Operating Systems Operating System Services David Duggan dduggan@sandia.gov January 22, 2013 Reading Assignment 3 Chapter 3, due 01/29 1/23/13 CSE325 - OS Services 2 What Categories

More information

Remote Method Invocation. Benoît Garbinato

Remote Method Invocation. Benoît Garbinato Remote Method Invocation Benoît Garbinato Fundamental idea (1) Rely on the same programming paradigm for distributed applications as for centralized applications In procedural languages, we will rely on

More information

Page 1. Extreme Java G Session 8 - Sub-Topic 2 OMA Trading Services

Page 1. Extreme Java G Session 8 - Sub-Topic 2 OMA Trading Services Extreme Java G22.3033-007 Session 8 - Sub-Topic 2 OMA Trading Services Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Trading Services

More information

Remote Method Invocation Benoît Garbinato

Remote Method Invocation Benoît Garbinato Remote Method Invocation Benoît Garbinato 1 Fundamental idea (1) Rely on the same programming paradigm for distributed applications as for centralized applications In procedural languages, we will rely

More information

AC61/AT61 DATABASE MANAGEMENT SYSTEMS DEC 2013

AC61/AT61 DATABASE MANAGEMENT SYSTEMS DEC 2013 Q.2 a. Define the following terms giving examples for each of them: Entity, attribute, role and relationship between the entities b. Describe any four main functions of a database administrator. c. What

More information

Object Interaction. Object Interaction. Introduction. Object Interaction vs. RPCs (2)

Object Interaction. Object Interaction. Introduction. Object Interaction vs. RPCs (2) Introduction Objective To support interoperability and portability of distributed OO applications by provision of enabling technology Object interaction vs RPC Java Remote Method Invocation (RMI) RMI Registry

More information

CS 11 java track: lecture 1

CS 11 java track: lecture 1 CS 11 java track: lecture 1 Administrivia need a CS cluster account http://www.cs.caltech.edu/ cgi-bin/sysadmin/account_request.cgi need to know UNIX www.its.caltech.edu/its/facilities/labsclusters/ unix/unixtutorial.shtml

More information

Philadelphia Area Java Users' Group December 12, 2001

Philadelphia Area Java Users' Group December 12, 2001 Jini: What it is, how we use it, and where it's going Philadelphia Area Java Users' Group December 12, 2001 Michael Ogg CTO, Valaran Corporation http://www.valaran.com ogg@valaran.com Jini Overview v1.0

More information

Arrays: Higher Dimensional Arrays. CS0007: Introduction to Computer Programming

Arrays: Higher Dimensional Arrays. CS0007: Introduction to Computer Programming Arrays: Higher Dimensional Arrays CS0007: Introduction to Computer Programming Review If the == operator has two array variable operands, what is being compared? The reference variables held in the variables.

More information

CMSC 433 Programming Language Technologies and Paradigms. Concurrency

CMSC 433 Programming Language Technologies and Paradigms. Concurrency CMSC 433 Programming Language Technologies and Paradigms Concurrency What is Concurrency? Simple definition Sequential programs have one thread of control Concurrent programs have many Concurrency vs.

More information

T NAF: Jini & EJB

T NAF: Jini & EJB T-110.453 NAF: Jini & EJB Dr. Pekka Nikander Chief Scientist, Ericsson Research NomadicLab Adjunct Professor (docent), Helsinki University of Technology Lecture outline Introduction Jini model Lookup Leases

More information

The Jini Architecture Bruno Souza Java Technologist, Sun Microsystems

The Jini Architecture Bruno Souza Java Technologist, Sun Microsystems The Jini Architecture Bruno Souza Java Technologist, Sun Microsystems J1-717, Jim Waldo 1 Why Jini Technology Network plug and work Enables a service-based architecture Spontaneous networking Erase the

More information

Distributed Databases

Distributed Databases Distributed Databases Chapter 22.6-22.14 Comp 521 Files and Databases Spring 2010 1 Final Exam When Monday, May 3, at 4pm Where, here FB007 What Open book, open notes, no computer 48-50 multiple choice

More information

Remote Procedure Call

Remote Procedure Call Remote Procedure Call Suited for Client-Server structure. Combines aspects of monitors and synchronous message passing: Module (remote object) exports operations, invoked with call. call blocks (delays

More information

Quiz on Tuesday April 13. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4. Java facts and questions. Things to try in Java

Quiz on Tuesday April 13. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4. Java facts and questions. Things to try in Java CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4 Bruce Char and Vera Zaychik. All rights reserved by the author. Permission is given to students enrolled in CS361 Fall 2004 to reproduce

More information

5.4. Events and notifications

5.4. Events and notifications 5.4. Events and notifications Distributed event-based systems extend local event model Allowing multiple objects at diff. locations to be notified of events taking place at an object Two characteristics:

More information

CS 556 Distributed Systems

CS 556 Distributed Systems CS 556 Distributed Systems Tutorial on 4 Oct 2002 Threads A thread is a lightweight process a single sequential flow of execution within a program Threads make possible the implementation of programs that

More information

2 Introduction to Java. Introduction to Programming 1 1

2 Introduction to Java. Introduction to Programming 1 1 2 Introduction to Java Introduction to Programming 1 1 Objectives At the end of the lesson, the student should be able to: Describe the features of Java technology such as the Java virtual machine, garbage

More information

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Garbage Collection Zoran Budimlić (Rice University) Adapted from Keith Cooper s 2014 lecture in COMP 215. Garbage Collection In Beverly Hills...

More information

Java RMI Activation: A running example We have the following classes: MyRemoteInterface: the remote interface. Client: the client that invokes a

Java RMI Activation: A running example We have the following classes: MyRemoteInterface: the remote interface. Client: the client that invokes a Java RMI Activation: A running example We have the following classes: MyRemoteInterface: the remote interface. Client: the client that invokes a method on the remote object. ActivableImplementation: the

More information

Jini Architecture Specification

Jini Architecture Specification Jini Architecture Specification A Jini system is a Java technology-centered, distributed system designed for simplicity, flexibility, and federation. The Jini architecture provides mechanisms for machines

More information

Thread Programming. Comp-303 : Programming Techniques Lecture 11. Alexandre Denault Computer Science McGill University Winter 2004

Thread Programming. Comp-303 : Programming Techniques Lecture 11. Alexandre Denault Computer Science McGill University Winter 2004 Thread Programming Comp-303 : Programming Techniques Lecture 11 Alexandre Denault Computer Science McGill University Winter 2004 February 16, 2004 Lecture 11 Comp 303 : Programming Techniques Page 1 Announcements

More information

Exceptions, try - catch - finally, throws keyword. JAVA Standard Edition

Exceptions, try - catch - finally, throws keyword. JAVA Standard Edition Exceptions, try - catch - finally, throws keyword JAVA Standard Edition Java - Exceptions An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception

More information

Java Threads. COMP 585 Noteset #2 1

Java Threads. COMP 585 Noteset #2 1 Java Threads The topic of threads overlaps the boundary between software development and operation systems. Words like process, task, and thread may mean different things depending on the author and the

More information

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University CS 555: DISTRIBUTED SYSTEMS [RMI] Frequently asked questions from the previous class survey Shrideep Pallickara Computer Science Colorado State University L21.1 L21.2 Topics covered in this lecture RMI

More information

ECE 587 Hardware/Software Co-Design Lecture 07 Concurrency in Practice Shared Memory I

ECE 587 Hardware/Software Co-Design Lecture 07 Concurrency in Practice Shared Memory I ECE 587 Hardware/Software Co-Design Spring 2018 1/15 ECE 587 Hardware/Software Co-Design Lecture 07 Concurrency in Practice Shared Memory I Professor Jia Wang Department of Electrical and Computer Engineering

More information

By: Abhishek Khare (SVIM - INDORE M.P)

By: Abhishek Khare (SVIM - INDORE M.P) By: Abhishek Khare (SVIM - INDORE M.P) MCA 405 Elective I (A) Java Programming & Technology UNIT-2 Interface,Multithreading,Exception Handling Interfaces : defining an interface, implementing & applying

More information

Dynamic Adaptability of Services in Enterprise JavaBeans Architecture

Dynamic Adaptability of Services in Enterprise JavaBeans Architecture 1. Introduction Dynamic Adaptability of Services in Enterprise JavaBeans Architecture Zahi Jarir *, Pierre-Charles David **, Thomas Ledoux ** zahijarir@ucam.ac.ma, {pcdavid, ledoux}@emn.fr (*) Faculté

More information

EXCEPTIONS. Objectives. The try and catch Statements. Define exceptions. Use try, catch and finally statements. Describe exception categories

EXCEPTIONS. Objectives. The try and catch Statements. Define exceptions. Use try, catch and finally statements. Describe exception categories Objectives Define exceptions 8 EXCEPTIONS Use try, catch and finally statements Describe exception categories Identify common exceptions Develop programs to handle your own exceptions 271 272 Exceptions

More information

CS18000: Programming I

CS18000: Programming I CS18000: Programming I Synchronization 22 February, 2010 Prof. Chris Clifton Concurrency Example: Banking class ATM { public void withdrawcash(acct a) { Scanner sc = new Scanner(System.in); int amount

More information

Exam Number/Code : 1Z Exam Name: Name: Java Standard Edition 6. Demo. Version : Programmer Certified Professional Exam.

Exam Number/Code : 1Z Exam Name: Name: Java Standard Edition 6. Demo. Version : Programmer Certified Professional Exam. Exam Number/Code : 1Z0-851 Exam Name: Name: Java Standard Edition 6 Programmer Certified Professional Exam Version : Demo http://it-shiken.jp/ QUESTION 1 public class Threads2 implements Runnable { public

More information

Threads SPL/2010 SPL/20 1

Threads SPL/2010 SPL/20 1 Threads 1 Today Processes and Scheduling Threads Abstract Object Models Computation Models Java Support for Threads 2 Process vs. Program processes as the basic unit of execution managed by OS OS as any

More information

Process. Program Vs. process. During execution, the process may be in one of the following states

Process. Program Vs. process. During execution, the process may be in one of the following states What is a process? What is process scheduling? What are the common operations on processes? How to conduct process-level communication? How to conduct client-server communication? Process is a program

More information

<Insert Picture Here>

<Insert Picture Here> Caching Schemes & Accessing Data Lesson 2 Objectives After completing this lesson, you should be able to: Describe the different caching schemes that Coherence

More information

EXCEPTIONS. Java Programming

EXCEPTIONS. Java Programming 8 EXCEPTIONS 271 Objectives Define exceptions Exceptions 8 Use try, catch and finally statements Describe exception categories Identify common exceptions Develop programs to handle your own exceptions

More information

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java)

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java) COMP 412 FALL 2017 Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java) Copyright 2017, Keith D. Cooper & Zoran Budimlić, all rights reserved. Students enrolled in Comp 412 at Rice

More information

CS159. Nathan Sprague

CS159. Nathan Sprague CS159 Nathan Sprague What s wrong with the following code? 1 /* ************************************************** 2 * Return the mean, or -1 if the array has length 0. 3 ***************************************************

More information

Introduction to Java Written by John Bell for CS 342, Spring 2018

Introduction to Java Written by John Bell for CS 342, Spring 2018 Introduction to Java Written by John Bell for CS 342, Spring 2018 Based on chapters 1 to 6 of Learning Java by Patrick Niemeyer and Daniel Leuck, with additional material from other sources. History I

More information

G51PGP Programming Paradigms. Lecture 009 Concurrency, exceptions

G51PGP Programming Paradigms. Lecture 009 Concurrency, exceptions G51PGP Programming Paradigms Lecture 009 Concurrency, exceptions 1 Reminder subtype polymorphism public class TestAnimals public static void main(string[] args) Animal[] animals = new Animal[6]; animals[0]

More information

Relational Query Languages. Preliminaries. Formal Relational Query Languages. Example Schema, with table contents. Relational Algebra

Relational Query Languages. Preliminaries. Formal Relational Query Languages. Example Schema, with table contents. Relational Algebra Note: Slides are posted on the class website, protected by a password written on the board Reading: see class home page www.cs.umb.edu/cs630. Relational Algebra CS430/630 Lecture 2 Relational Query Languages

More information

LINDA. The eval operation resembles out, except that it creates an active tuple. For example, if fcn is a function, then

LINDA. The eval operation resembles out, except that it creates an active tuple. For example, if fcn is a function, then LINDA Linda is different, which is why we've put it into a separate chapter. Linda is not a programming language, but a way of extending ( in principle ) any language to include parallelism IMP13, IMP14.

More information