1 / 44

Jini™

Jini™. Rashad Oreifej and Christopher Stricklan. Introduction. 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..

nascha
Download Presentation

Jini™

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jini™ Rashad Oreifej and Christopher Stricklan

  2. Introduction • 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

  3. History • Developed by Sun MicroSystems • The idea started by Sun cofounder Bill Joy at Sun Aspen Smallworks R&D lab in 1994 • Under the leadership of Bill Joy and Jim Waldo: • Ann Wollrath • Ken Arnold • Bob Scheifler

  4. History • 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

  5. Benefits • 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

  6. Benefits • 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

  7. Limitations • 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

  8. Success 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 Jini’s 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/software/jini/news/success.xml

  9. Jini Logical Architecture

  10. Jini Technology Flow Diagram

  11. Jini Flow Example 1 2 3 4

  12. Jini Architecture Diagrams

  13. Implementation Components • jini-core • jini-ext • Reggie - LUS Implementation • jsk-policy - Security Implementation • Many others… } Discovery, Lookup, Lease, … Implementations

  14. Lookup 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.

  15. Unicast 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

  16. Multicast 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

  17. Jini 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

  18. Lease 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

  19. Distributed Events

  20. Distributed Events

  21. Distributed 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

  22. Code Snippet Examples • Unicast Lookup import net.jini.core.discovery.LookupLocator; public class Locator{ public Locator{ LookupLocator lookup; try{ lookup = new LookupLocator(“jini://localhost”); }catch(java.net.MalformedURLException e){ } } }

  23. Code 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(){} } }

  24. Code 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){} } }

  25. Code 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 } }

  26. Code Snippet Examples • Consume a Service contd. // Set a security manager otherwise we can’t load the codebase System.setSecurityManager(new RMISecurityManager()); Class[] toasterClasses = new Class[1]; toasterClasses[0] = Toaster.class; … // Do the usual Lookup and Registrar Creation // Prepare a seach template of serviceID, classes and entries ServiceTemplate template = new ServiceTemplate(null, toaterClasses, null); // Let us find the Toaster Toaster toaster = null; try{ toater = (Toaster) registrar.lookup(template); }catch(javam.rmi.RemoteException e){}

  27. JINI 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

  28. JINI Framework-based Services • Rio • Dynamically instantiate service component • Monitor service component • Manage service component • Pluggable load distribution and resource utilization analysis

  29. JINI 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/reconfigurable • Resource efficiency by reducing the number of threads that are used by the Jini classes

  30. JINI 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

  31. JINI 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.

  32. Applications • Distributed File System • Directory Service • Mobile Networks • Auto Printer Configuration • RFID • Agent Implementations • Grid Computing

  33. Apache 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.

  34. Apache River • Motivation • Allow Broader Adoption • Technical Advancement • Meet needs of expanding Jini community

  35. Apache 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

  36. Other 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

  37. Other 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

  38. Other 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

  39. Conclusions • Jini • Developed by SUN • Dynamic Networking Architecture • Zero Configuration • Remote Method Invocation

  40. Conclusions • Pros • Create a Dynamic Environment • Open Source • Cross-Platform Support • Mobility of Code • Protocol Agnostic • Network Self-Healing • Network Self-Configuration

  41. Conclusions • Cons • Lookup Criteria • Limited Debugging Support • Type conflicts when mixing objects from different code bases • Changes in codebase may fail to reach client

  42. References • 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-datasheet0601.pdf • http://www.javacoffeebreak.com/books/samples/professionaljini/3552_Chap7_idx.pdf

  43. References • http://developer.apple.com/opensource/internet/bonjour.html • http://www.apple.com/support/downloads/bonjourforwindows.html • http://www.zeroconf.org/ • http://msdn2.microsoft.com/en-us/library/aa382261.aspx • http://www.sun.com/software/jini/index.xml • A Programmer’s Guide to Jini Technology, Jan Newmarch, Apress, 2000 • Class Loading Issues in Java™ RMI and Jini™ Network Technology, Michael Warres, Sun Microsystems, 2006

  44. References • 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/

More Related