January 26, 1999--Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.

Slides:



Advertisements
Similar presentations
- 1 - Jini in the Enterprise O'Reilly Conference on Java Scott Oaks Sun Microsystems
Advertisements

An Introduction of Jini Technology Presenter: Carfield Yim, Gary Lam Date: 31-Jul-2002 How can JINI Technology Boost Our Business.
The Jini Technology Lookup Service. How Does It Work Services and clients find a lookup service using the discovery protocol Services advertise themselves.
JavaSpaces and TSpaces Theresa Tamash CDA 5937 November 4, 2002.
JINI Shashwat Shriparv InfinitySoft.
Introduction to Jini & JavaSpaces
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
DISTRIBUTED FILE SYSTEM USING RMI
Java RMI. What is RMI? RMI is an RPC system for an object based language. Objects provide a natural granularity for the binding of functions. –RMI allows.
Enterprise Java Beans Welcome to the world of “Distributed System” Presented By: Sameer Nanda Date: 12/17/03.
Tuple Spaces and JavaSpaces CS 614 Bill McCloskey.
Component-Based Software Engineering Introducing the Bank Example Paul Krause.
Overview of a Simple Development Method. Background Before discussing some specific methods we will consider a simple method that doesn’t have a name.
Parallel Computing using JavaSpaces -Presented by Shilpi Basak Advisor: Prof: Dick Steflik.
490dp Prelude I: Group Membership Prelude II: Team Presentations Tuples Robert Grimm.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
TupleSpaces Revisited: Linda to TSpaces Ben Y. Zhao 13 July, 1998 UC Berkeley Computer Science Division.
EJB. Component Characteristics An enterprise Bean typically contains business logic that operates on the enterprise’s data. An enterprise Bean’s instances.
Presented by Mark Miyashita
Introduction - What is Jini Technology?
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
1 Stateful Session Beans Stateless Session Beans Michael Brockway Sajjad Shami Northumbria University School of Computing, Engineering & Information Sciences.
JavaSpaces Prabhaker Mateti Wright State University.
January 26, Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
January 26, Bob Scheifler Copyright 1999 Sun Microsystems, Inc., all rights reserved. Jini™ Lookup Service Bob Scheifler Senior Staff Engineer Sun.
Sun’s Jini Lab 2 Service Registration Client Lookup.
ClientPoint ™ Data Entry Workflow. ClientPoint “The filing cabinet!” Search for existing clients, or add clients.
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.
MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 6 - Tutorial Guided Tutorial.
Jini tm NetworkingTechnology Directions Jim Waldo Jini Architect Sun Microsystems, Inc.
Distributed Systems Principles and Paradigms Chapter 12 Distributed Coordination-Based Systems 01 Introduction 02 Communication 03 Processes 04 Naming.
Darkstar. Darkstar is a Sun research project on massively parallel online games The objective (not yet demonstrated!) is to supply a framework for massively.
Copyright 2005 by Codemesh, Inc. All Rights Reserved 1 Welcome Jini and JavaSpaces in an SOA World by Alexander Krapf WebTech Meeting July 19 th, 2005.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Office Server Specific Web content management –Page structure, layouts, and controls –Publishing.
Distributed Coordination-Based Systems Adapted from: "Distributed Systems", Tanenbaum & van Steen, course slides.
Google App Engine MemCache ae-09-session
JavaSpaces ™ Nati Shalom CTO GigaSpaces Technologies.
JINI Coordination-Based System By Anthony Friel * David Kiernan * Jasper Wood.
Jini Architecture Introduction System Overview An Example.
Jini Architectural Overview Li Ping
Advanced Java Session 4 New York University School of Continuing and Professional Studies.
IBM TSpaces Lab 2 Customizing tuples and fields. Summary Blocking commands Tuple Expiration Extending Tuples (The SubclassableTuple) Reading/writing user.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Enterprise Computing with Jini Technology Mark Stang and Stephen Whinston Jan / Feb 2001, IT Pro presented by Alex Kotchnev.
1 Jini Transaction Part II Daniel Müller Marcel Ziswiler Seminar Informations- & Kommunikationssysteme.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Managing multiple projects or services? Have a mix of Microsoft Project and more simple tasks? Need better visibility and control?
A service Oriented Architecture & Web Service Technology.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Distributed and Parallel Processing George Wells.
January 26, Ann Wollrath Copyright 1999 Sun Microsystems, Inc., all rights reserved. Java ™ RMI Overview Ann Wollrath Senior Staff Engineer Sun Microsystems,
Java Distributed Object System
11. Jini What is Jini? A "network technology that provides a simple (?) infrastructure for delivering services in a network and for creating interactions.
Object Spaces 9/22/2018.
Concurrency without Locks
The Jini Technology: An overview
7.1. CONSISTENCY AND REPLICATION INTRODUCTION
An Introduction of Jini Technology
CSE 486/586 Distributed Systems Concurrency Control --- 3
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
My Requisition Process
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Java Remote Method Invocation
CSE 486/586 Distributed Systems Concurrency Control --- 3
Presentation transcript:

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.

JavaSpaces™: A Service for Collaborative Distributed Applications Ken Arnold Senior Staff Engineer Sun Microsystems, Inc.

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. What Is a JavaSpace? A simple service for cooperative computing An object repository that has –Persistence –Template Matching lookup –Transactions (multi-space) Stores entries –Distributed (RMI-based) –Concurrent

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. What A JavaSpace is not A relational database An object-oriented database

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. JavaSpaces in Jini JavaSpaces are the first Jini service JavaSpaces entries are Lookup service entries JavaSpaces use the Jini programming models: –Transactions –Leases –Events

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. The Model Four simple operations: –write: put an entry into the space –read: return a matching entry from the space –take: remove a matching entry from the space –notify: send event if matching entry is written Build cooperative protocols Protocols are loosely coupled –writer doesn’t know who will read or take

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. JavaSpaces simplicity Why only four operations? It’s all you need Simplicity lets us help you –Transactions –Scalability –Replication Multiple implementations to choose

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. A Simple Example Animator needs to render movie frames –Writes “request for rendering” entries –Takes rendered results written back Server processes tasks –Takes generic “do a task” entries –Executes each task, writing back results

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. What is an Entry? An object that implements Entry –All fields must be public –Fields may be of any kind of object –Must have a public, no-arg constructor Added to a space using write

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Entry Matching Matching requires a template entry Each field in a template is either –a value to be matched exactly –a wildcard: “I don’t care” The space is searched for any entry that –Is at least the template’s type –Has all values matching

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. The JavaSpace Interface public interface JavaSpace { Lease write(Entry entry, Transaction txn, long lease) throws TransactionException, RemoteException; Entry read(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException; Entry readIfExists(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException; Entry take(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException; Entry takeIfExists(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException; EventRegistration notify(Entry tmpl, Transaction txn, RemoteEventListener ln, long lease, MarshalledObject handback) throws TransactionException, RemoteException; Entry snapshot(Entry e) throws RemoteException; }

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. A simple example expounded The animator’s program –Writes RenderTask entries –Reads RenderResult entries A server process –Takes Task entries –Writes resulting entries

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. A Task Entry public class TaskEntry implements Entry { /** * Execute whatever task the entry requires. If an entry is * returned, it is written back into the space. */ public Entry execute() { throw new RuntimeException("execute() not implemented"); } public long leaseTime() { return 10 * 60 * 1000; // ten minutes } //... server code... TaskEntry tmpl = new TaskEntry(); for (;;) { TaskEntry task = space.take(tmpl, null, Long.MAX_VALUE); Entry result = task.execute(); if (result != null) // write any results back space.write(result, null, task.leaseTime()); }

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. A RenderTask Entry /** * Render a frame in a movie. */ public class RenderTask extends TaskEntry { public Long renderID; // which rendering is this? public FrameDesc frame; // the frame to render public Entry execute() { RenderResult result = new RenderResult(); result.image = frame.render(); // do the real work result.renderID = renderID; // the rendering ID return result; }

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Let’s walk this through Client writes RenderTask Client blocks taking RenderResult Server takes Task, finds RenderTask –RenderTask not known? RMI downloads it Server invokes execute, renders frame Server writes resulting entry Repeat ad infinitum Client takes RenderResult Repeat until done

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Scale it up Add more servers Add more animators

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. …And up Add lots more servers Add new kinds of clients with new types of tasks

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Why use JavaSpaces? To build an RPC-based system: –Design the actors, protocols, and interfaces –Implement the clients and servers To build a JavaSpaces-based system: –Design the actors, protocols, and entries –Implement the clients –(the server is done for you) Loosely-coupled systems scale well What’s wrong with simple?

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Possible uses Work flow –You write an expense report –Your manager, looking for unsigned expense reports, takes it out, signs it, writes it back –Accounting, looking for signed expense reports, takes it out approves it, writes it back –Check writer, looking for approved expense reports, takes it out, cuts the check, marks it “paid”, writes it back

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Possible Uses (continued) Groupware/Version control –Each version of a JavaBean is an entry –A token for each bean contains its version number –To edit a bean, take its token, take the bean, write back new bean and new token with new version number Trading systems –Commodities, bids, prices, are entries in a space

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Possible uses (expanded) If you can model your protocol as an exchange of objects, you can leverage the simplicity of JavaSpaces

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved. Availability Evaluation copy available –JSTK: JavaSpaces Technology Kit – cts/jini/ –Runs as a Jini service

January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.