DIS-Registry

From Gcube Wiki
Jump to: navigation, search


Introduction

The DIS-Registry service manages DILIGENT Resource profiles for each DILIGENT Resource by providing registration and unregistration facilities for the DILIGENT resources as well as their storage, preservation and publication in the DIS-IC. Regarding the DILIGENT Resource registration, the service:

  • validates profiles against DILIGENT resource profiles schema;
  • assigns UniqueIds to profiles that don’t have it;
  • manages Profiles DL context ( Authorization Policies element )

Implementation Overview

DIS-Registry

The DILIGENTResource class models the stateful part of the DIS-Registry’s WS-Resources. A resource is created each time a new DILIGENT Resource is registered. At creation time, a UniqueID is assigned to the DILIGENT Resource if it is not present yet. A Profile is composed by four fixed elements: UniqueID, ResourceType, AuthorizationPolicies, and Profile. The UniqueID identifies the resource unambiguously. The ResourceType discriminates among the different resource types. It is possible to have 12 different resource types:

  • DHN (Diligent Hosting Node)
  • gLiteResource
  • Collection
  • Service
  • RunningInstance
  • ExternalRunningInstance
  • CS (Compound Service)
  • CSInstance (Compound Service Instance)
  • Metadata Collection
  • Transformation Program
  • Generic Resource

The AuthorizationPolicies part contains the profile DL context:

<AuthorizationPolicies>
        <DLs>
            <DL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">/diligent/ImpECt</DL>
        </DLs>
    </AuthorizationPolicies>

The Profile part identifies a resource-specific section.

The class exposes the “RP_PROFILE” resource property corresponding to the whole resource profile. It QName is the following: {http://www.diligentproject.org/namespaces/informationservice/disregistry/DISRegistryService}Profile;

DISRegistryFactoryService

The DISRegistryFactoryService is implemented as a singleton WSRF service with a stateful WS-Resource (named DISRegistryFactoryServiceResource). The resource maintains the mapping between DILIGENT IDs and DISRegistryService’s WS-Resource EPRs. The resource exposes 15 WS-Resource Properties of type RegistryProperty:

  • RP_RICOUNTERRP;
  • RP_EXTERNALRICOUNTERRP;
  • RP_SERVICECOUNTERRP;
  • RP_COLLECTIONCOUNTERRP;
  • RP_DHNCOUNTERRP;
  • RP_CSCOUNTERRP;
  • RP_CSINSTANCECOUNTERRP;
  • RP_GLITESECOUNTERRP;
  • RP_GLITECECOUNTERRP;
  • RP_GLITESITECOUNTERRP;
  • RP_GLITESERVICECOUNTERRP;
  • RP_METACOLLRP;
  • RP_TRANSPROGRAMRP;
  • RP_GENERICRP:
  • RP_VDLRP.

These properties are updated at profile creation/update/removal time. Each of them maintains information about DILIGENT Resources of the corresponding type currently registered by the DIS-Registry:

  • the last operation performed
  • the related UniqueID,
  • the last modified time.

The properties are also registered as Topics in the DIS-Broker, so clients can subscribe to particular events related to DILIGENT Resources (e.g. the death of a Running Instance with a given ID) and receive from the DIS-Registry the appropriate notification.


The DISRegistryFactoryService and the DISRegistryService classes implement the operations globally provided by the DIS-Registry. DISRegistryFactoryService


  • createResource (CreateResourceMessage)-> String

It allows creating DISRegistryService resources, specifying as parameter (serialized as a String) the resource profile. It returns the whole Profile of the resource containing a generated UniqueID (or the UniqueID pre-specified in the resource profile). This method updates the state of the DISRegistryFactoryService, creating a mapping between the DILIGENT UniqueID and the DISRegistryService WS-Resource EPR. The CreateResourceMessage parameter contains:

  • String Profile: the String serialization of a DILIGENTResource profile;
  • String RegistrationMode: it can assume one of the following values: AUTOMATIC_REGISTRATION_MODE or REQUEST_REGISTRATION_MODE. In the first case, the registration ends with the actual modification of the interested VO. In the latter case, the registration ends with a notification to VO managers. In the implementation the DIS-Registry prepared for the alpha prototype, the DISRegistryFactoryService still does not deal with the VOs authorization policies since the integration with the Authorization Service is not yet completed. This feature will be provided with the Final release.
  • VO[] suggestedVO: an Array of VOs to register the DILIGENT Resource to. This functionality will be provided with the DILIGENT Final prototype release.
  • String [] DLs: a List of DLs that are inserted in the AuhorizationPolicies part of the Profile.


  • updateResource (UpdateProfileMessage)

It allows updating an existing DILIGENT Resource profile. In the case that the given resource ID is not present in the DIS, the operation uses the createResource operation in order to create a new resource. The UpdateProfileMessage parameter contains:

  • String diligentID: the DILIGENT ID of the profile to update,
  • String xmlProfile: the serialised string representation of the profile.
  • removeResource (RemoveResourceMessage)

This method allows removing an existing DILIGENT Resource. The removal of an existing resource implies: (i) removing of the mapping information maintained as state of the service, (ii) destroying of the DILIGENTResource that exposes the related profile, and (iii) calling the remove method of the DIS-IC service. The RemoveResourceMessage contains:

  • String diligentID: the DILIGENT ID of the profile to delete.
  • String unregistrationMode: this parameter can assume one of the following constant: AUTOMATIC_UNREGISTRATION_MODE or REQUEST_UNREGISTRATION_MODE. In the first case, the unregistration ends with the actual modification of the interested VO. In the latter case, the registration ends with the notification of the appropriate VO managers. In the implementation the DIS-Registry prepared for the alpha prototype, the DISRegistryFactoryService service still does not deal with the VOs authorization policies since the integration with the Authorization Service is not yet completed. This feature will be provided with the Final release.


  • updateProfileWithDL(UpdateProfileMessage)-> String

This method updates the profile corresponding to the given ID adding to the AuthorizationPolicies part the given list of DLs. It simply returns the updated profile.

  • removeProfileWithDL(RemoveProfileDLMessage)-> String

This method removes from the AuthorizationProfile part if the profile corresponding to the given ID the given DL. It simply returns the updated profile.


  • updateState(UpdateStateMessage)-> String

This method updates the State section of the RunningInstance Profile corresponding to the given UniqueID. Admissible values for the state section are (as declared into the Running Instance Profile schema):

<xs:simpleType name="RIStateEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="Deployed"/>
			<xs:enumeration value="Startup"/>
			<xs:enumeration value="Ready"/>
			<xs:enumeration value="Disabled"/>
			<xs:enumeration value="Unreachable"/>
		</xs:restriction>
	</xs:simpleType>

This functionality is not currently exploited in the DILIGENT Infrastructure, and will be fully integrated in the DILIGENT Final release.

  • validateProfile(Profile)

This method performs validation of the given profile against the DILIGENT Profiles Schemas.It simply throws a SchemaValidationException if the profile is not valid.


The Push modality has been also implemented: in that way the DIS-IC doesn’t pull the DIS-Registry to get profiles but the DIS-Registry notifies the DIS-IC with the updated profile. This heavy reduces both DIS-Registry and DIS-IC nodes network and memory load. The two modalities (push & pull) can be selected after the deployment phase modifying the Service JNDI file. The JNDI global section contains the DISRegistryConfiguration resource with three parameters that can be customized:

<parameter>
				<name>profilesBase</name>
				<value>@config.dir@/DILResourceSchemas</value>
			</parameter>
			<parameter>
				<name>propertiesFile</name>
				<value>@config.dir@/registration.properties</value>
			</parameter>
			<parameter>
				<name>registrationType</name>
				<value>Pull</value>
			</parameter>

Dependencies

The DIS-Registry Service depends on the following software components:

  • DIS-IP library for resource Profiles and WS-Resource-Properties registration;
  • DIS-HLSClient library for DIS-IC querying support;
  • DVOS-Common library;
  • DILIGENT Provider;
  • DVOS Delegation Service;
  • DVOS Authentication API Library;
  • DIS-Util Library;
  • Profile Manager Library;
  • Jaxb 2.0

Usage Examples

DIS-Registry functionalities may be used only by services entitled to register new DILIGENT Resources, i.e. the following DILIGENT components:

  • HNM service (Keeper) in order to create/update DHN profiles and Running Instances profiles;
  • DLManagement service (Keeper) in order to remove DHN profiles, create/update/delete Running instance profiles and managed also VDL Profiles.
  • DIS-BDIIClient service (Information System) in order to create/update/remove gLiteResource profiles;
  • CSEngine service and CS Design portlet (Process Management) in order to create/update/remove CS definition profiles and CS instance profiles;
  • Collection Management Service( Content Management) in order to create/update/remove Collection profiles;
  • Medatata Catalog Service (Content Management) in order to create/update/remove Medatada Collection Profiles
  • Medatata Broker Service (Content Management) in order to create/update/remove TransformationProgram Profiles
  • Personalization Service and portles (Personalization) in order to create/update/remove Generic Resource Profiles

A DIS-Registry UI has been implemented to simplify, by means of a command line interface, the add/remove/update profile operations:

To add a profile:

java DISRegistryUI -factoryUrl:<factoryUrl> -insert -type:<resource_type> -mode:<reg_mode> -profile:<xmlFile>  [-vo:<vo_id>] 

To update a profile:

java DISRegistryUI -factoryUrl:<factoryUrl> -update -id:<resource_id> -profile:<xmlFile>

Known Bugs and Limitations

The DIS-Registry Service is a VO Mandatory Service, and has to be deployed (together with DIS-IC and DIS-Broker) before all other services at VO deployment time. Due to synchronization problem, the registration of the DIS-Registry Running Instance profile (made by HNM Service) is not working for the Beta Release. This limitation (that is one of the issues that limits the automatic VO deployment) will be removed in the Final release of the software.

--Andrea 12:17, 1 June 2007 (EEST)