Index Service for Resolving Service Instance Handle

The Index Service of Globus Toolkit 3.0 is a helpful component for building grid applications. It can be used to index Service Data carrying state information from multiple grid service instances for use in resource discovery, selection and optimization. Here is an article that has explained how to set up the Index Service for static and dynamic indexing, and has presented a possible solution to achieve better reliability.

In CredentialManager, the Index Service is used for resolving service instance handle. Let's first look at why it is necessary to resolve service instance handle. In init command, user specifies user name and credential name, that will be used later to retrieve or destroy that credential. What really happens is that a service instance is created after executing init command, and the manipulation on the credential is done by invoking that service instance through service instance handle. Thus, we have to know how to obtain the service instance handle given the user name and credential name.

The grid services in CredentialManager factory register themselves periodically to the Index Service through the addSubscription interface. The concatenation of the user name and credential name is part of the service data and is used as the "key" in searching for the service instance handle. Once the user name and credential name are obtained from get or destroy command, they will be concatenated together as the search key. Then, the Index Service is queried and the service data obtained from the Index Service are searched. If the search is successful, the corresponding service instance handle is returned. Otherwise, an exception "Service does not exist" will be thrown. In our current implementation, the user is allowed to init multiple credentials using the same user name and credential name. However, when the user tried to get or destory that credential, an exception "there are multiple service instances" will be thrown.

There are performance issues to consider because it may result in many periodical resubscriptions and consume a significant amount of computing resource. There has to be a balance between the performance of the grid and the reliability of the indexing. Fortunately, the reliability issue of the Index Service is expected to be better addressed in new versions of Globus Toolkit.