UMass Lowell Computer Science 91.460 Java and Distributed Computing Prof. Karen Daniels Fall, 2000 - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

UMass Lowell Computer Science 91.460 Java and Distributed Computing Prof. Karen Daniels Fall, 2000

Description:

'socket-based communications that enable applications to view networking as ... jTV. Video Tuner. jCable box. Digital Storage. jVCR. jStereo. jComputer ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 29
Provided by: murrayd
Learn more at: http://www.cs.uml.edu
Category:

less

Transcript and Presenter's Notes

Title: UMass Lowell Computer Science 91.460 Java and Distributed Computing Prof. Karen Daniels Fall, 2000


1
UMass Lowell Computer Science 91.460 Java and
Distributed Computing Prof. Karen Daniels Fall,
2000
  • Lecture 3
  • HW1
  • Jini Overview
  • C Diagnostic Results
  • Mon. 9/11/00

2
Web Page
Web Page
new
http//www.cs.uml.edu/kdaniels/courses/java2000.
html
3
Question from Last Lecture...
  • What is socket-based communication?
  • In a Java context, Deitel answers this on p. 936
    in introduction to Servlets. Java has networking
    support for
  • socket-based communications that enable
    applications to view networking as streams of
    data - a program can read from a socket or write
    to a socket as simply as reading or writing to a
    file.
  • packet-based communications that enable
    individual packets of information to be
    transmitted - commonly used to transmit audio and
    video over the Internet.
  • Chapter 21 of Deitel treats Java networking

4
Homework 1
5
Homework 1
Assigned Due Content
  • Wed, 9/6 Fri, 9/8 Read Ch 1
    (Deitel)
  • Fri, 9/8 Mon, 9/11 Read Ch 1, 2
    (Edwards)
  • Fri, 9/15 Read Ch 2, 3 (Deitel)
  • Fri, 9/15 Assignment 1, Part 1
  • short-answer questions
  • Mon, 9/18 Assignment 1, Part 2
    Hello World programming
  • (application and applet)

Homework is due at the start of lecture on the
due date.
6
Introduction to Java Applications
  • Java application is executed using the Java
    interpreter (but not inside browser like an
    applet)
  • Application begins execution in main()
  • main() is static method inside class

javac Welcome1.java java Welcome1
Welcome1.java
// Save this in file Welcome1.java public class
Welcome1 public static void main( String
args ) System.out.println( "Java is
fun!" )
Welcome1.class
Similar application code is on p.36 of Deitel,
Chapter 2
7
HW1 HelloWorld Application
  • Refer to p. 36 of Deitel, Chapter 2 for their
    Welcome1.java application
  • Modify
  • System.out.println( ) statement
  • Change name of class and file

8
Compiling and Running on a PC
9
Introduction to Java Applets
  • Java applet is executed inside a WWW browser (or
    appletviewer) using a Java interpreter that is
    inside the browser.

javac Welcome1Applet.java appletviewer
Welcome1Applet.html
// Save this file in Welcome1Applet.java import
java.applet. import java.awt. public class
Welcome1Applet extends Applet public void
paint(Graphics g) g.drawString( "Java
is fun!, 25, 50 )
Welcome1Applet.java
Welcome1Applet.class
Welcome1Applet.html
Save this file in Welcome1Applet.html
ltAPPLET codeWelcome1Applet.class width150
height100gt lt/APPLETgt
10
HW1 HelloWorld Applet
  • Refer to p. 86 and p. 90 of Deitel, Chapter 3 for
    their WelcomeApplet.java applet
  • Modify
  • .java file
  • g.drawString( ) statement
  • Change name of class and file
  • Extend Applet instead of JApplet unless you want
    to use Swing here. If extending Applet, import
    java.applet.
  • .html file
  • Change name of class and file

11
Compiling and Running on a PC
12
Appletviewer on a PC
13
Browser on a PC
14
Computing Environment
  • Java 2 platform Java 2 SDK v. 1.2.1
  • http//www.javasoft.com/products/jdk/1.2
  • Jini v. 1.1
  • http//www.javasoft.com/products/jini
  • UML CS UNIX environment
  • Optional
  • PC environment (code must also run on UNIX)
  • Java integrated development environment
  • 2 are on disk with Deitel textbook (NetBeans
    caveat)

Make sure you have a UML CS UNIX account
15
Jini Overview
16
What is Jini?
Jini Is Not Initials
But seriously...
portions of this slide contributed by Ayal Spitz
17
Suns Jini Vision
  • Initial Sun marketing focused on hardware
  • Appliances in a home or office connecting to a
    network
  • Jinis goal is to make it possible for all of
    these appliances to seamlessly detect and
    communicate with one another
  • Technology can also support software services

portions of this slide contributed by Ayal Spitz
18
What is Jini?
  • Java-based connection framework developed by Sun
    Microsystems
  • Philosophy
  • plug n play network
  • blur distinction between hardware and software
  • self-healing
  • Elements discovery, lookup, leasing, remote
    events, transactions, JavaSpaces

19
Background on Jini Technology
Assumes Java and network
Consists of Java classes Works at application
level
proxy manages service interaction
20
5 Key Concepts
  • Discovery find communities on a network and join
    them
  • Lookup use Lookup Service(s) to find services
    and use them
  • Leasing resource is loaned to some consumer
    for fixed time period
  • Remote Events allow services to notify others of
    their state changes
  • Transactions protocol to support multiple
    services moving to safe state

21
Some Jini Definitions
  • Service an entity on the network (e.g. hardware
    device or software module) that can be used by
    other Jini participants
  • Community a group of Jini services that are
    aware of each other (typically workgroup size)
  • Group used by Jini APIs to specify and represent
    a community
  • But, due to network separation, different
    communities may have same group name
  • Federation a collection of communities that are
    aware of each other

22
Discovery Example Multiple Community
23
Requirements for Service, Client
  • Participate in discovery to find a Lookup Service
  • Communicate with a Lookup Service to receive
    service proxy

To be a Jini Service
To be a Jini Client
  • Either you or a delegate must be able to
  • Connect to a TCP/IP network ( )
  • Participate in discovery to find a Lookup Service
  • Register with a Lookup Service to provide proxy
  • Keep leases current

Extra machinery needed - http server(s) for
each machine to offer up downloadable code - RMI
activation daemon
24
Hello World in a Jini Setting...
25
Who Else is in the Game?(other providers of
coordination frameworks/connection
technologies/service architectures for
distributed computing)
  • HAVi
  • Sony, Sharp, Toshiba, Philips, RCA, Matsushita,
    Hitachi, Grundig
  • Microsoft HP
  • ChaiAppliance Plug and Play
  • eSpeak
  • Universal Plug and Play
  • Network protocol level
  • XML device description
  • Salutation Framework

26
Further Information Jini
  • Sun web sites
  • http//www.javasoft.com/jini
  • http//www.jini.org
  • Development Books
  • Core Jini by W. Keith Edwards
  • The Jini Specification by Arnold, OSullivan,
    Scheifler, Waldo, and Wollrath
  • Gartner Advisory
  • Java Jini A Killer-App Enabler for Network
    Computing? http//gartner.jmu.edu/research/ras/830
    00/83044/83044.html

portions of this slide contributed by Ayal Spitz
27
C Diagnostic
28
C Diagnostic
  • Assess C background
  • Will not contribute to the course grade
  • Answers on the way out of class
  • Name is optional
  • Provide code snippets, not entire programs
  • Leave unknowns blank

Well summarize results of the diagnostic in
lecture.
Write a Comment
User Comments (0)
About PowerShow.com