JINI Spontaneous Networking in Java - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

JINI Spontaneous Networking in Java

Description:

You can participate at the meeting, write articles, expose your doubts, ask for support etc etc ... computational power (such as phones, PDAs or laptops) ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 35
Provided by: jugto
Category:

less

Transcript and Presenter's Notes

Title: JINI Spontaneous Networking in Java


1
Java User Group Torino
JINISpontaneous Networking in Java
Second Part JINI Concepts
JUG_at_Webbit, Padova 9-10-11 Maggio 2003
2
Topics
  • The state of the art
  • JINI ideas
  • Possible scenarios
  • JINI concepts and terminology

3
Objectives
  • Understand the value of Ubiquitous Computing
  • Understand the fallacies of classical distributed
    computing
  • Understand the key JINI concepts

4
About the JUG
  • The JUG was born in February 2002 by the idea of
    some Java fans in the Torino area
  • The aim of the group is to promote the knowledge
    exchange between members and to create an
    important community in the landscape of Italian
    Java programmers
  • Participating is free and voluntary
  • You can participate at the meeting, write
    articles, expose your doubts, ask for support etc
    etc .... .... ....

5
Who am I?
  • Renzo Borgatti is a Java developer since 2000
  • I was involved in several projects during my
    activity mainly focused on server side Java and
    J2EE
  • I spend the rest of my time (too short!) playing
    piano, running and, of course, partecipating at
    the JUG activities!
  • Feel free to contact me at renzo.borgatti_at_jugtorin
    o.it

6
Distribuited ApplicationsThe State Of The Art
7
WW-What?
The State Of The Art
  • The first distributed applications built, used to
    live inside a very constrained network space
  • There were few subnetworks in the world that
    couldn't talk to each other
  • No browsers or world wide TCP/IP connections were
    available to access services from home

8
No micro-devices
The State Of The Art
  • Computers were huge and unmovable
  • Few years later the Home Computer appears
    smaller but not enough
  • No other devices with computational power (such
    as phones, PDAs or laptops)

9
Some years later...
The State Of The Art
  • Laptops
  • World Wide Web
  • Widely adopted communication protocol (TCP/IP)
  • HTTP and browsers
  • Electronic wearable devices
  • ... but still the same old-fashioned distributed
    programming model.

10
Old-Fashioned?
The State Of The Art
  • Http programming
  • Text oriented vs Object Oriented
  • No services on the browser side
  • Well known addresses
  • Distributed applications
  • 7 fallacies

11
The Seven Fallacies of Distribuited System
The State Of The Art
  • The network is reliable
  • Latency is zero
  • Bandwith is infinite
  • The network is secure
  • Topology doesnt change
  • There is one administrator
  • Transport cost is zero
  • By Peter Deutsch

12
The JINI idea
13
The vision
The JINI idea
  • Every processing capable hardware is potentially
    a platform to run a JVM
  • Java interfaces expose remote services in the JVM
  • Sometimes the platform stands still sometimes it
    moves network changes but applications don't
    break
  • The infrastructure should be built using existing
    technologies and connections
  • Networked applications should be reliable and
    self-repairing

14
Why not using CORBA-RMI?
The JINI idea
  • They can't run on a PDA the next network they
    reach, where's the registry? And on what port the
    ORB is listening to?
  • With CORBA no code mobility
  • Remember the seven fallacies?
  • To be reliable an application should use many
    tricks heartbeats, callbacks, multicasting

15
Home automation scenarios
The JINI idea
  • Appliances that maintain themselves through
    remote diagnostics and repair procedures
  • Water heaters that adjust temperature and water
    pressure to compensate for someone turning on the
    dishwasher while you're taking a shower
  • Use the TV remote as a control for your home
    security system, or to turn off the ringer on the
    telephone.

16
In the car scenario
The JINI idea
  • You enter a car (not necessarily yours)
  • When a call arrives, the phone knows you are
    driving, turn down the radio volume and display
    caller information on the GPS screen
  • The phone use the car speakers as an hands-free
    system
  • If an SMS arrives, the phone use TFT screen of
    the GPS system to display it
  • If the call is important, you might decide to
    register it on your PDA as an MP3 file for later
    use

17
At the airport scenario
The JINI idea
  • Imagine arriving at an airport, suitcase in one
    hand, Palm PDA in the other.
  • The airport has a radio-based proximity-specific
    communications network, which your Palm PDA, with
    the aid of Jini technology, spontaneously
    discovers and joins.
  • You are instantly notified of your flight's
    departure gate, and your name is added to the
    list of checked-in passengers--no waiting in line.

18
Other scenarios
The JINI idea
  • Clustering adding computing power without
    changes to the existing configuration at run-time
  • JMX manageable applications become available at
    startup

19
JINI Concept
20
Services
JINI CONCEPT
  • Services participate in a JINI community exposing
    functionalities
  • Their initial target is to register themselves to
    be publicly available
  • They could be remote services (RMI or whatever)
    or they can use clients CPU

21
Clients
JINI CONCEPT
  • Clients participate in a JINI community searching
    and using services
  • Their initial target is to find a lookup service

22
Lookup Service
JINI CONCEPT
  • A lookup service is a kind of RMI registry with
    more powerful capabilities
  • It partecipates in discovery to find services and
    other lookup services
  • Is itself a JINI service (without the need to
    register itself)

23
Discovery
JINI CONCEPT
  • Discovery is the early part of the JINI protocol
  • It defines how clients, services and lookup
    services behave to find each other
  • Addresses and ports
  • Structure of bytes to be sent
  • Network protocols
  • Interfaces involved

24
Join
JINI CONCEPT
  • Join follows the discovery phase and defines
  • How a client can find services using a lookup
    service
  • How a service can register to a lookup service

25
JINI Groups
JINI CONCEPT
  • JINI Community the group of services registered
    with a lookup services at a given time
  • JINI Federation a group of interconnected JINI
    community obtained by registering a lookup
    service as a normal service into another lookup
    service

26
Lookup by Interfaces
JINI CONCEPT
  • Clients lookup services using Java interfaces,
    ServiceID and Attributes as opposed to String in
    RMI
  • Strings can be easily changed in different
    deploys
  • Interface uniqueness is guarantee at compile
    time. No doubled-registration
  • Powerful queries via Attributes

27
Leasing
JINI CONCEPT
  • Clients and services that want to use JINI
    resources must explicitly declare how many time
    they intend to use them
  • When the time expires, all resources are freed
  • To continue using the resource, the lease must be
    renewed before it expires

28
Remote events
JINI CONCEPT
  • JINI gives the community an asynchronous message
    notification system
  • Components may register to receive remote events
  • No temporal dependencies between parties
  • Events participate in the leasing model of using
    resources

29
Transaction
JINI CONCEPT
  • JINI supports the two phase commit transaction
    model
  • There are helper and libraries to coordinate
    transaction participants which could be
    potentially remote

30
JINI Services standardization
  • JINI services, to be effective, must agree on a
    well defined operational interaction. Similar
    services should always
  • Have the same interface (and Java interfaces
    guarantee it)
  • Have the same exceptions meaning, pre and
    post-conditions rules ecc
  • Efforts have been made for banking, insourance
    and automotive industries
  • Different vendors must agree on interfaces and
    business behaviors producing JINI services
    accordingly

31
JINI and heuristics
  • What if you dont know exactly the service you
    are looking for? You dont have the interface but
    you know the description of the service
  • You should use some kind of heuristic to find a
    best fit
  • The client tries to find the best service

32
Service Interface Registry 1/2
  • A JINI service whose responsibility is to find
    the best interface for a service given some
    parameters
  • The client downloads a general class, with a
    single invoke(String methodName) method
  • The client invoke a method using an
    approximation something starting with Y,
    containing the word X or whatever. If a match
    is found then that method is called. Otherwise
    there is a collision (or not methods at all that
    match the criteria)

33
Service Interface Registry 2/2
  • The principle here is a kind of human reasoning
    approximation
  • The algorithm search for a best fit given the
    name of an interface and then the name of a
    method to call on that interface
  • The result is a standard Field wrapping

34
Resources
Write a Comment
User Comments (0)
About PowerShow.com