160 likes | 241 Views
Jini Technology Basics. Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University email: cheng@cse.ttu.edu.tw http://www.cse.ttu.edu.tw/~cheng. This lecture is based on. Noel Enete’s note See http://www.enete.com/download/# nuggets.
E N D
Jini Technology Basics Instructors: Fu-Chiung Cheng (鄭福炯) Associate Professor Computer Science & Engineering Tatung University email: cheng@cse.ttu.edu.tw http://www.cse.ttu.edu.tw/~cheng
This lecture is based on • Noel Enete’s note • See http://www.enete.com/download/# nuggets
What is Jini? • Jini is Sun's distributed processing infrastructure for consumer devices. • It has the special ability to "recognize" devices that have just been plugged into the network without prior knowledge of the device.
What is Jini? • Jini is an approach to distributed processing that is known for its dynamic configuration. • Sun says Jini provides the equivalent to a "dial tone" on a computer network. • A device can plug into a Jini network and become immediately available to other devices on the network without manual configuration.
What is Jini? • Jini consists of class libraries and a few server programs. • It makes use of Java's version of remote procedure call called remote method invocation or RMI. • Jini takes up 400K which includes the class libraries, the server programs, and the virtual machine. • Sun is pursuing a strategic initiative to help OEM clients make their smart devices "Jini compliant."
What is Jini? • Service Registration • It makes use of Java's version of remote procedure call called remote method invocation or RMI. • Jini takes up 400K which includes the class libraries, the server programs, and the virtual machine. • Sun is pursuing a strategic initiative to help OEM clients make their smart devices "Jini compliant."
Service Registration • An active Jini network uses a server known as the Jini Lookup Service
Service Registration • When a device is plugged into a Jini network, it uses the Jini class libraries to "discover" the lookup service. • If the device has any services to contribute to the network, it registers them with the lookup service (see fig in next page) • As part of registration, the device copies the class required to use its service to the lookup service.
Service Registration • The lookup service, not only has knowledge that a service is available, it also has the executable class through which the service is invoked • A service bearing device might be a sharable DVD drive, a VCR, a microwave, a television, or even an automated sprinkler system. • Any device that has a service to contribute can offer its service over a Jini network.
Service Registration • Two services register in Lookup service (server)
Service Lookup • Client can perform service lookup to find and make use of the existing Jini services. • The new device uses the Jini class libraries to discover the lookup service, then asks for all of its services. • As a part of the reply, the lookup service sends the user interface class for each service back to the new device. • The user of the new device can select any of these classes and interact with the GUI they present.
Service Lookup • When the user interface class decides that the user has made a service request, it contacts the service from which it came and invokes the service, receives the reply, and renders it for the user.
Service Lookup • Client uses services
Moving Code • The special part about Jini is that the executable that is needed to use a service is passed to the requester. • Clients do not need advanced knowledge of the service because the service provides the class to use when accessing it. • This is a clever use of mobile code.
Moving Code • The serving devices do not need to be consumer devices. • They could be server programs running in regular computers or coke machines publishing their current contents. • A server program that participates in a Jini network is known as a Jini service rather than a Jini server. • Jini is moving from the paradigm of client/server to client/client. • Every computing device is given the option of providing service and requesting service.