Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

System Service Architecture

Let us now look at the way that Jini components work together to provide a dynamic distributed service network (see Figure 2–8).

Figure 2-8Figure 2–8 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

  1. 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.

  2. Any lookup service within the Jini community listens on a well-known port for the discovery packet and appropriately responds to the service provider.

  3. 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

  1. 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.

  2. After locating a lookup service, the client looks for the service in the lookup service based on its service type (Java interfaces).

  3. 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.

  4. Once the service proxy is downloaded, a service requester, depending upon its requirements, creates, negotiates, or terminates its lease with the service provider.

  • + Share This
  • 🔖 Save To Your Account