Title: Jini
1Jini
- Rashad Oreifej
- and
- Christopher Stricklan
2Introduction
- Pronounced GEE-nee
- Stands for (Java INference engine and networked
Interactor)? - Loosely derived from the Arabic for magician?
- Some said it stands for Jini Is Not Initials ?
- Nobody really knows..
- An open Java technology-based architecture
enables organizations to build adaptive
network-centric systems to allow services to be
added, upgraded or removed dynamically, whilst
the network remains up and running - Plug and Work network
3History
- Developed by Sun MicroSystems
- The idea started by Sun cofounder Bill Joy at Sun
Aspen Smallworks RD lab in 1994 - Under the leadership of Bill Joy and Jim Waldo
- Ann Wollrath
- Ken Arnold
- Bob Scheifler
4History
- Based on the unique distributed computing
characteristics of Java technology and the RMI - Introduced in January, 1999 by providing the
first Jini Technology Starter Kit - Sun currently has agreement with a wide range of
technology companies to develop Jini technology
services, both hardware and software. - Includes Axis, Canon, Datek, Epson, FedEx,
Mitsubishi, Norwest Mortgage, Novell, ODI,
Quantum, Seagate, Toshiba, Computer Associates,
Oki, Salomon Brothers
5Benefits
- Provides the infrastructure for creating
dynamically networked components (SW/HW),
applications, and services - No configuration overhead and device drivers
- Extends the Java programming model to the network
(moves data and executables via a Java object
over a network) - Consistent access to local and remote devices
6Benefits
- Network self-healing and self-configuration
(Leasing) - Networks adapt to changes in the computing
environment - Allows fast, easy incorporation of legacy,
current, and future network components - Jini is available free of charge
- Enables computer networks to resemble phone
networks in graceful connection/disconnection and
scalability - Enables all types of digital devices to work
together in a community put together without
extensive planning, installation, or human
intervention
7Limitations
- Sun Community Source License (SCSL) licensing
model - Lookup criteria that include ranges of values to
match or sets of values to match, cannot be
expressed with a single ServiceTemplate - Low-resource clients
8Success Stories
- Orange API 2 incorporates Jini technology as one
of the first implementations of Jini in telephony
network Web services environment - RFID networks enable and support new business
processes. Such a distributed network benefits
from Jinis robust self-managing and self-healing
capabilities - U.S. Army developed a battlefield-ready solution
based on Jini connection technology that allows
computers and other devices to interoperate
immediately after being connected. - Other many success stories http//www.sun.com/sof
tware/jini/news/success.xml
9Jini Logical Architecture
10Jini Technology Flow Diagram
11Jini Flow Example
1
2
4
3
12Jini Architecture Diagrams
13Implementation Components
- jini-core
- jini-ext
- Reggie - LUS Implementation
- jsk-policy - Security Implementation
- Many others
Discovery, Lookup, Lease, Implementations
14Lookup Discovery Service (LDS)
- Unicast Discovery Protocol (Locator)
- For LUS outside the LAN
- Address is already known
- Multicast Discovery Protocol (Group)
- LUS within the LAN
- Address in not known.
15Unicast Discovery Protocol
- Package net.jini.core.discovery
- Client/service sends a unicast request (packet)
using the TCP protocol Unicast TCP - LUS unicast announcement reply Unicast TCP
- Client/Service downloads the LUS proxy
- Join (Send proxy class, Service ID, Attributes)
Unicast TCP - Lookup (Obtain RMI interface to service) Unicast
TCP
16Multicast Discovery Protocol
- Package net.jini.discovery
- Client/service sends a multicast request (packet)
that contains the groups of interest Multicast
UDP - LUS multicast announcement reply Multicast UDP
- Client/Service downloads the LUS proxy
- Join (Send proxy class, Service ID, Attributes)
Unicast TCP - Lookup (Obtain RMI interface to service) Unicast
TCP
17Jini Lookup
- Lookup types Templates rather than names
- Lookup by a class type Super and Sub classes can
be included - Lookup by multiple types (AND/OR operators)
- Lookup by specific attributes
- Lookup by Service ID
18Lease Service
- Leasing concept is introduced to recover from the
loss of services - Prevents resource starving at the LUS due to
allocations for dead services - Each service is registered in the LUS for a
certain time Lease - Upon expiry either renew, or be removed
- Lease requester can cancel the lease any time
19Distributed Events
20Distributed Events
21Distributed Events
- Discover an instance of a LUS
- Register with the LUS in order to be notified
when a specific service (template) joins and
leaves the Jini network - Catch the join and leave remote notifications
from the LUS
22Code Snippet Examples
- Unicast Lookup
- import net.jini.core.discovery.LookupLocator
- public class Locator
- public Locator
- LookupLocator lookup
-
- try
- lookup new LookupLocator(jini//localhos
t) - catch(java.net.MalformedURLException e)
-
-
23Code Snippet Examples
- Get Registrar
- // Other imported packages
- import net.jini.core.lookup.ServiceRegistrar
- public class UnicastRegister
- public UnicastRegister
- LookupLocator lookup null
- ServiceRegistrar registrar null
- // Lookup Service code here
- try
- registrar lookup.getRegistrar()
- catch()
-
-
24Code Snippet Examples
- Register a Service
- // Other imported packages
- import net.jini.core.lookup.ServiceItem
- import net.jini.core.lookup.ServiceRegistration
- Public class SimpleService implements
Serializable - public SimpleService()
- //Lookup Service Code
- // Registrar Code
- ServiceItem item new ServiceItem(null, this,
null) - ServiceRegistration reg null
- try
- reg registrar.register(item, 10000) //
Registers for 10 seconds - catch(jama.rmi.RemoteException e)
-
-
25Code Snippet Examples
- Consume a Service
- // First we need an Interface
- public interface Toaster extends
java.io.Serializable - public void setDarkness(int dark)
- public void startToasting()
-
- // The actual also needs to be implemented
- public class MySuperToaster implements Toaster
- public void setDarkness(int dark)
- // do something here
-
- public void startToasting()
- // Lets make the toast yummy
-
26Code Snippet Examples
- Consume a Service contd.
- // Set a security manager otherwise we cant load
the codebase - System.setSecurityManager(new RMISecurityManager()
) - Class toasterClasses new Class1
- toasterClasses0 Toaster.class
- // Do the usual Lookup and Registrar Creation
- // Prepare a seach template of serviceID, classes
and entries - ServiceTemplate template new ServiceTemplate(nul
l, toaterClasses, null) - // Let us find the Toaster
- Toaster toaster null
- try
- toater (Toaster) registrar.lookup(template)
- catch(javam.rmi.RemoteException e)
27JINI Framework-based Services
- JavaSpaces
- based on Tuple-Spaces
- Provides a reliable distributed storage system
for objects - Supports atomic access to objects
- Built-in transactional mechanism
- Object Leases
- Events
28JINI Framework-based Services
- Rio
- Dynamically instantiate service component
- Monitor service component
- Manage service component
- Pluggable load distribution and resource
utilization analysis
29JINI Framework-based Services
- Seven
- Eases the development and deployment of Jini
services - Administration interfaces for life-cycle and join
management - Role based access control for remote method
invocations - Security is dynamically configurable/reconfigurabl
e - Resource efficiency by reducing the number of
threads that are used by the Jini classes
30JINI Framework-based Services
- Harvester
- Claims to simplify Jini application development
- Build services using a servlet-like API
- Help manages codebase
- Provides an HTTP server for codebase downloads
- Supports writing Jini services with Python
through a wrapper class called Jython
31JINI Framework-based Services
- Newton
- Moves code around the network installing on
demand - Removes the code when no longer in use
- Dynamically wires up runtime service dependencies
- Rewires dependencies as services come and go.
32Applications
- Distributed File System
- Directory Service
- Mobile Networks
- Auto Printer Configuration
- RFID
- Agent Implementations
- Grid Computing
33Apache River
- Moved Jini from SCSL to Apache License v2.0
(ALv2) - Occurred March 2005
- Why Apache?
- It was a community decision
- Extensive, open, and collaborative discussions
- ALv2 was determined to best meet the licensing
requirements most important to Sun and the Jini
Community.
34Apache River
- Motivation
- Allow Broader Adoption
- Technical Advancement
- Meet needs of expanding Jini community
35Apache River
- Benefits
- Develops a richer ecosystem for Jini technology
users to operate within - Freely license, use and distribute Jini
technology - Simplify prospective users license review process
- Simplify the introduction of Jini technology into
many companies
36Other SOAs
- Zero Configuration Networking (Zeroconf)
- Created by The Engineering Task Force
- IPv4 Link-Local Addressing Based
- Allocate addresses without a DHCP server
- Translate between names and IP addresses without
a DNS server - Find services, like printers, without a directory
server
37Other SOAs
- Bonjour
- Created by Apple
- Based off of ZeroConf
- Open Source
- Creates dynamic network of computers
- JAVA library, MAC OS, and Windows Compatible
- IP Based through UDP Port 5353
- Allows discovery of services through web browser
38Other SOAs
- UPnP
- Created by Microsoft
- Supports zero-cofiguration
- Media and Device Independent
- Platform Independence
- Built on internet-based technologies (IP, TCP,
UDP, HTTP, XML, etc.) - Extendable
39Conclusions
- Jini
- Developed by SUN
- Dynamic Networking Architecture
- Zero Configuration
- Remote Method Invocation
40Conclusions
- Pros
- Create a Dynamic Environment
- Open Source
- Cross-Platform Support
- Mobility of Code
- Protocol Agnostic
- Network Self-Healing
- Network Self-Configuration
41Conclusions
- Cons
- Lookup Criteria
- Limited Debugging Support
- Type conflicts when mixing objects from different
code bases - Changes in codebase may fail to reach client
42References
- http//www.jini.org
- Jini and JavaSpaces Application Development,
Robert Flenner. SAMS Publishing, 2002 - The Power and Limitations of the ServiceRegistrar
Interface, Bill Venners. Published in JavaWorld,
2000 - http//www.sun.com/software/jini/news/success.xml
- www.assuredtech.com/papers/jini/embedded.pdf
- www.sun.com/software/jini/whitepapers/jini-datashe
et0601.pdf - http//www.javacoffeebreak.com/books/samples/profe
ssionaljini/3552_Chap7_idx.pdf
43References
- http//developer.apple.com/opensource/internet/bon
jour.html - http//www.apple.com/support/downloads/bonjourforw
indows.html - http//www.zeroconf.org/
- http//msdn2.microsoft.com/en-us/library/aa382261.
aspx - http//www.sun.com/software/jini/index.xml
- A Programmers Guide to Jini Technology, Jan
Newmarch, Apress, 2000 - Class Loading Issues in Java RMI and Jini
Network Technology, Michael Warres, Sun
Microsystems, 2006
44References
- https//rio.dev.java.net/overview.html
- http//www.cheiron.org/seven/
- https//harvester.dev.java.net/
- http//newton.codecauldron.org/
- https//rio.dev.java.net/