Distributed Lookup Server

New network and system services may be introduced by a sensor node for use by other nodes as the sensor network self-organizes. A sensor node that provides a service is called a service provider and a node that uses the service is called a service client. A sensor node may register a resource that it maintains or service that it can perform with a lookup server (Figure 33.2). A lookup server may contain information on services or resources at multiple clusters. Other nodes requiring the service may request it through a lookup server. If the service is recorded in the lookup server, it will return the location to the requesting node. Otherwise, a discovery protocol is used to locate the service through other lookup servers.

Applications use the lookup service through the following API for registering, finding, and calling a service. Sensor nodes that receive the service provider information can make service calls through a reliable remote execution method. The following describes the purposes and side effects of these lookup service function calls.

• service_register(). This function allows a service provider to register its service with a lookup server in the region. Services will remain in the lookup server for the lifetime specified by the service provider. The information supplied by the service provider ó service name, service type, location or address, interface definition, and mobile code ó is stored in the lookup server. Lookup servers for different regions may coordinate with each other to update their lists of service information.

• service_deregister(). This function allows a service provider to remove its service from the lookup server registry.

• lookup_service(). This function allows a service client to find the location or address of a service provider and/or the interface for using the service. Service lookup can also be based on cluster or predicate matching.

• service_exec(). This function allows a sensor node to request the service and obtain the results from the service provider. The service provider performs the requested service or remote procedure call and returns the results.

• service_call(). This function allows a service client to find and make a call for a service when the service client does not know the location or address of the service provider and/or the interface for using the service. It is implemented as a combination of the lookup_service() and service_exec() calls described next.

To search multiple lookup servers, a request message is propagated to all the lookup servers; the server that contains the service registration information will return the reply with the service location. It may also return the cluster name of that service. The lookup server that made the request will then cache that service location and cluster name information in its local registration cache. At regular frequency, service and resource registration information may be disseminated from one lookup server to others in the agile sensor network.

0 0

Post a comment