Difference between revisions of "Developing a Service"

From Gcube Wiki
Jump to: navigation, search
(GAR ID)
(NAL)
Line 39: Line 39:
  
 
=== NAL ===
 
=== NAL ===
 
+
The Node Access Library is a Java library available on each DHN allowing services to access to the local DHN configuration. Via this library, a DILIGENT service can understand its context. A number of methods here allow to retrieve RI, DHN and DL information.
 
+
For further details about the NAL libray, see ...
  
 
=== Configure the HNMService ===
 
=== Configure the HNMService ===

Revision as of 19:13, 19 March 2007

How to develop a WSRF service that works in DILIGENT

Preliminary definitions

Service files and rules

A DILIGENT service is primarly a WSRF service runnable on Java WS Core v4.0.4, therefore it must follow the packaging rules to build a GT4 Deployable GAR file. In addition to such rules, others are required by the Collective Layer to correctly manage the services.

WSDD files

A service could be deployed in a secure or a non secure DL. In the latter case, the CL layer deploys the service without the security enabled on its operation. In order to do that, two Web Service Deployment Descriptor (WSDD) files must be provided, one that declares the Security Descriptor and another one without such a declaration. These two files must per placed in the root folder included in the GAR and must be named as follows:

  • deploy-server.wsdd (security enabled)
  • deploy-server.wsdd_NOSEC (security disabled)

For further details about how to declare the Security Descriptor in the WSDD file, see ...

Service Stubs

The service stub classes have to be placed in a separate JAR file, not included in the GAR file. This is because of the CL layer needs a full controll on the undeploy the stubs by assuring that they are undeployed only if and when they are no longer used by other services.

GAR ID

When a GAR file is deployed on a Java WS Core container, it is labelled with a GAR ID. Such GAR ID is used at undeployment time to remove the package. Since it is not so simple to programmatically detect the assigned ID, the following rule has been fixed: the GAR ID is the gar filename without the .gar extension.

Example: if the GAR filename of my service is org_diligentproject_class_service.gar the GAR ID will be org_diligentproject_class_service

This rule has, of course, an impact on the service code because it has to be taken into account for example when the service tries to access to its etc/gar.id folder.

Service profile

A service profile is an XML file that describes a Service Archive. How to write a service profile is explained in the Profile Specification section of this manual.

Putting all together: the service Archive on ETICS

Integrating DHN's Collective Layer components

DIS-HLSClient

DIS-HLSClient

DIS-IP

DIS-IP

DILIGENTProvider

DILIGENT Provider

NAL

The Node Access Library is a Java library available on each DHN allowing services to access to the local DHN configuration. Via this library, a DILIGENT service can understand its context. A number of methods here allow to retrieve RI, DHN and DL information. For further details about the NAL libray, see ...

Configure the HNMService

The HNMService is the service in charge of the management of a DHN. It is able to detect most of the characteristics of the node, but, some of them have to be configured manually. After the DHN installation, the HNM configuration is located in the $GLOBUS_LOCATION/etc/org_diligentproject_keeperservice_hnm/jndi-config.xml under the HNMConfiguration resource. The parameters to configure are:

  • country: two letter code of the country (e.g. IT)
  • location: a freetext placeholder (e.g. Pisa)
  • latitude: the latitude of your DHN to correctly place it on a Google Map
  • longitude: the longitude of your DHN to correctly place it on a Google Map

The latter two parameters (latitude and longitude) for the DILIGENT partner DHNs can be found here

Integrating the Security

Obtain valid credentials

The Delegation Service...

The DL context

Identify your DL

  • when the Security is enabled
  • when the Security is not enabled

Identify the resource belonging to your DL

Describe the HLSClient and IP segnatures...

How to contact the resource belonging to your DL

Secure and non secure invocations...