JiniCaseStudy1-slides - Network and Systems Laboratory

Download Report

Transcript JiniCaseStudy1-slides - Network and Systems Laboratory

Case Study P
©2001 Patrick Ammann
([email protected])
Overview
• Using Jini in a Smart Home
–
–
–
–
UPnP
HAVi
Inferno
Jini
• Demo
– Remote/Local Execution
• Bridge
– Unicast/Multicast
– Reggie_ex
Smart Home ?
UPnP Example
UPnP (Universal Plug and Play)
•
•
•
•
•
•
•
Comes form the PC side
Peer-to-Peer
Uses Multicast to find new Services
There exists no LookupServer
Uses TCP/IP for Communication
Non UPnP Devices are integrated with Proxies
Native code
UPnP Proxy
HAVi Example
Firewire
Television
HAVi
• Comes from the Home Entertainment &
Multimedia side
• Peer-to-Peer
• Uses IEEE 1394 (i.LINK or FireWire) for
Communication
• Specified Devices
– Tuner, VCR, Clock, Camera, Amplifier,
Display, Modem, WebProxy
• Java Virtual Machine
Jini for a Smart Home (a)
Service 1A
Service 1C
LUS 1
Service 1B
Client 1
Jini for a Smart Home (b)
• Jini is not bound to one specific network
protocol, at the moment it works only with
RMI
• Jini can run over other protocols: Jini-HAVi,
Jini-UPnP
• Jini provides:
– LookupServers
– Leasing System
Jini PC Clustering (a)
execution slave:
- Super Computer
- Cheap PC's
Server B
Server A
Server C
get Job
LUS
register Job
Service A
local execution service:
- renderImage(Mesh)
- breakDES(Cipher, Range)
Jini PC Clustering (b)
• Easy to add a new PC into the cluster
• Easy to update program code
• Slow?
– Java is executed on a Virtual Machine
– Today there exists Java to Native Compiler
• Hardware independent solution, works on
every machine with a JVM
Using Remote Execution
• Server Side
– public class ServiceImpl
extends UnicastRemoteObject
implements ServiceInterface {…}
• Cient Side
– ServiceFinder sf = new
ServiceFinder(ServiceInterface.class);
ServiceInterface si = (ServiceInterface) sf.getObject();
Si.methodCall();
Using Local Execution
• Server Side
– public class ServiceImpl
implements ServiceInterface,
Serializable {…}
• Client Side
– No difference to remote execution
Demo
• Using Remote Execution
• Using Local Execution
Bridge
Service 2A
Service 1A
LUS 2
LUS 1
Service 2B
Client 1
Service 2C
Service 1B
Service 1C
multicast radius
Client 2
Service 2D
multicast radius
Bridge (a)
Service 2A
Service 1A
LUS 2
LUS 1
Client 1
Service 1B
Service 2B
unicast
Service 2C
Service 1C
multicast radius
Service 2D
Bridge (a)
• LookupDiscoveryManager
– Add LookupLocator for unicast
• Pro
– Farming: A Group of Computers that provide
something
• Contra
– Static host address
Bridge (b)
Service 1A
Service 2A
Service 2B
Service 1B
Service 1C
ex
LUS 1
ex
LUS 2
rmi
Service 2C
Bridge (b)
• Pro
– Event driven synchronization
• Contra
– New LUS Implementation
– 2 static host addresses
References (a)
• Jini(tm) Network Technology
– http://www.sun.com/jini/
• The Community Resource for Jini(tm)
Technology
– http://www.jini.org/
• Jini in a Nutshell
– http://www.oreilly.com/catalog/jininut/
References (b)
• Universal Plug and Play
– http://www.upnp.org
• HAVi
– http://www.havi.org
• Inferno
– http://www.vitanuova.com