A Jini Tutorial

Jan Newmarch

Version 0.08

4 June 1999

http://jan.newmarch.name/java/jini/tutorial/Jini.xml

1. Contents

  1. Overview
    1. Components
    2. Service Registration
    3. Client Lookup
    4. Proxies
    5. Server Structure
    6. Client Structure
    7. Summary
  2. Discovering a Lookup Service
    1. Lookup Service
    2. Unicast discovery
    3. Broadcast discovery
    4. ServiceRegistrar
    5. Summary
  3. Entry Objects
    1. Entry class
    2. Restrictions on entries
    3. Convenience Classes
    4. Summary
  4. Service Registration
    1. ServiceRegistrar
    2. ServiceItem
    3. Registration
    4. ServiceRegistration
    5. Entries
    6. Summary
  5. Client Search
    1. ServiceRegistrar
    2. ServiceMatches
    3. Matching
    4. Summary
  6. Leasing
    1. Leases
    2. LeaseRenewalManager
    3. Summary
  7. Simple Example
    1. Problem Description
    2. Client
    3. Server Design Options
    4. Option 2: Uploading a Complete Service
    5. Option 3: Uploading a Proxy
    6. Summary
  8. Join Manager
    1. Join Manager
    2. Getting information from JoinManager
    3. Summary
  9. Security
  10. More Complex Examples
    1. Where is the Code
    2. Running threads from discovery
    3. Re-using RMI Proxies
    4. Inexact Service Matching
    5. Matching using Local Services
  11. Lego MindStorms
    1. MindStorms
    2. MindStorms as a Jini Service
    3. RCXPort
    4. RCX Programs
    5. Jini classes
    6. Getting it running
    7. Entry objects for a robot
    8. Adding entries to a server
    9. A client-side RCX class
    10. Higher level mechanisms: Not Quite C
  12. Architecture
    1. Threads
  13. Remote Events, Using Threads, Groups, Re-using RMI proxies (to come)
  14. etc (to come :-)

2. Files

The programs are available as a zip file programs.zip.

The documentation files are also available as a zip file docs.zip. You might not like what you get from this doc file - I am using XML as document format, using a mishmash of the DocBook DTD with extra tags and HTML thrown in. A Perl program, xml_handler.pl, is a handler called by my Apache Web server to deliver XML files as HTML. Another perl program, docbook2html.pl, will convert them standalone, but it will leave the hypertext links pointing to the XML files.

3. Update Information

This tutorial will be updated on a regular basis, maybe several times a week. If you want to receive an email announcement of each version release, send email to jan@newmarch.name with subject ``Jini tutorial update''

4. Feedback

I would appreciate any feedback on this tutorial, to ensure that it is correct and meets the needs of readers. The feedback that I have already received has been very valuable. Please send comments/corrections/requests, etc, to jan@newmarch.name

5. Other Resources

  1. The Jini FAQ at http://www.artima.com/jini/faq.html
  2. Noel Enete's ``Nuggets'' tutorial at www.enete.com/download/#_nuggets_
  3. Eran Davidov's timeservice example at www.artima.com/jini/resources/timeservice.html
  4. Roger Whitney's lecture notes on ``Java Distributed Computing'' at http://www.eli.sdsu.edu/courses/spring99/cs696/notes/
  5. Jini Home page http://www.sun.com/jini/index.html
  6. RMI Home page http://java.sun.com/products/jdk/rmi/index.html
  7. Jini mailing list jini-users@java.sun.com
  8. Jini mailing list archives http://archives.java.sun.com/archives/jini-users.html
  9. RMI mailing list rmi-users@java.sun.com
  10. RMI mailing list archives http://archives.java.sun.com/archives/rmi-users.html
  11. Jini Interface Repository for standardised service interfaces (empty at present) http://www.artima.com/jini/interrepo/

6. Changes

See the file Changes for the list of version releases and changes made between versions.

7. Copyright Information

This tutorial (and the pages it contains) are covered by the OpenContent license. This basically gives you freedom to do what you want with the document in a similar way to the GNU license for software. Any changes or additions that you make to this set of pages as a Web document must be made publically available, and may be folded into later versions of this tutorial. Any such inclusions will of course be credited with your copyright, under the OpenContent license.

On the other hand, the programs that this tutorial references are also available unbundled from the tutorial, and do not have the restriction that source derived from them must be made publically available. So you can derive your own source code from them, without having to make it public. I'm not sure what suitable license will do this...

And, of course, there is no warranty...

8. Acknowledgements

The author is grateful for comments on this tutorial from

  1. Brian Jeltema, jeltema@richdist.east.sun.com
  2. Roger Whitney, whitney@cs.sdsu.edu
  3. Robbert van den Beld, rbe@mms-dresden.de
  4. Chitrarasu Muthaiyan, chitrarasu@cswl.com
  5. Stuart Remphrey, Stuart.Remphrey@Aus.Sun.COM
  6. JJ Larrea, jlarrea@redtop.com

The author is currently on a sabbatical program at the CRC for Distributed Systems Technology, http://www.dstc.edu.au and the work reported in this tutorial has been funded in part by the Co-operative Research Centre Program through the Department of Industry, Science and Tourism of the Commonwealth Government of Australia.

This file is Copyright ©Jan Newmarch (http://jan.newmarch.name) jan@newmarch.name

The copyright is the OpenContent License (http://www.opencontent.org/opl.shtml), which is the ``document'' version of the GNU OpenSource license.