- Vision and Goals for Jini
- System Assumptions
- System Architecture
- System Components
- System Service Architecture
- Summing Up
System Service Architecture
Let us now look at the way that Jini components work together to provide a dynamic distributed service network (see Figure 28).
Figure 28 Technology at work.
Following is a walk-through of the steps that occur when a service provider registers with a Jini community, and when a service requester requests service.
Service Provider Registering within Jini Community
When a service is initiated into the network, it drops a discovery packet on the network, with a reference back to itself. The goal is to find one or more lookup services.
Any lookup service within the Jini community listens on a well-known port for the discovery packet and appropriately responds to the service provider.
When a lookup service within a network is discovered, the service joins the network by uploading all its characteristics into the lookup service. The service characteristics, its description, and its type are encapsulated as a proxy (Java) object, which is uploaded into the lookup service. This service is now available to any network citizen joining the community using the discovery and join protocol.
Service Requester Requesting Service within Jini Community
Any client (service requester) needing a service joins the community using the discovery protocol. In that process it locates one or more lookup services within the community.
After locating a lookup service, the client looks for the service in the lookup service based on its service type (Java interfaces).
Once the service is found, the client invokes the service, which involves moving the proxy code on to the client. Now the client can perform any operation on the service by calling its methods. This movement of the code between the lookup service and the client gives the service provider greater freedom in the communication pattern and makes it possible to maintain the integrity of the proxy code as it is supplied by the service provider.
Once the service proxy is downloaded, a service requester, depending upon its requirements, creates, negotiates, or terminates its lease with the service provider.