Process Management
The Process Management class of services is dedicated to the management of gCube Compound Services (CS), i.e. complex services obtained by composing other simpler services through an appropriate workflow management language. The components in this family cover all aspects related to CS management. In particular, they allow to design via a dedicated user interface the services and perform various validation activities related to CS design, to manage CS definitions, to execute instances of the services and control in various ways the execution. Finally, a component in this family allows interacting with gLite jobs seeing them as another flavour of gCube service.
Reference Architecture
The Process Management components are:
- The Process Design and Monitoring Portlet - responsible for providing a user interface for viewing, editing and managing compound service definitions in a gCube based infrastructure, and for triggering the execution of existing/new processes;
- The CSValidator service - responsible for the validation of the new processes;
- The CSEngine service- dedicated to the orchestration of the distributed execution of a compound service;
- The CSResourceManager service - which provides common operations required by other Process Management components and by Process Optimization; in particular operations for handling (registering, un-registering) process resources, i.e. Process specifications and process instances, on the gCube Information System and to issue complex process-related queries against the gCube Information System;
- The gLiteJobWrapper service- that allows to invoke gLite jobs in the same way as any other gCube service, and therefore provides the means to integrate them into the (service-oriented) workflows that the process management class of service handles.
Resource Manager Service/Library
The CSResourceManager Service/library provides operations for storing (registering) and removing Process definitions and Running Process Instances, thereby acting as a proxy to the resource-related functionality of the gCube Information System. It also provides an abstraction layer for queries directed to the IS, in order to have a simple and tailored interface which can be used from all of the Process Management components and for the Process Optimization components: while all the “depending” components could, in theory, use the IS Client directly, the same (complicated) queries would have to be used in multiple places; therefore, the decision was basically to outsource the queries into a common location where they can be used in a uniform way, and duplication of effort is avoided.
Functions
All operations are implemented as static methods, called “lib<...>”, e.g. “libSaveSpecs”. This allows for also directly invoking the Java methods locally (from services installed on the same GHN), bypassing the overhead otherwise introduced by the GT4 infrastructure. All operations which are not static (“<...>”, e.g. “saveSpecs”) are available as WS operations and are merely wrapping the static methods.
- libSaveSpec() – which takes as input parameter a message containing a process specification and returns the Resource ID resulting from the publishing of such a resource in the IS;
- saveSpec() – the WS version of the above function;
- libSaveSpecs() – which takes as input parameter a message containing a list of process specification and returns the list of Resource ID resulting from the publishing of such resources in the IS;
- saveSpecs() – the WS version of the above function;
- libSaveInstance() – which takes as input parameter a message containing the process ID of the running instance it is running and returns the process instance ID resulting from the publishing of such resources in the IS;
- saveInstance() – the WS version of the above function;
- libUpdateInstance() – which takes as input parameter a message containing the process ID of the running instance it is running, the profile running instance ID and the new profile and returns the process running instance ID resulting from the publishing of such resources in the IS;
- updateInstance() – the WS version of the above function;
- libRemoveSpec() – which takes as input parameter a message containing the process ID and returns a Boolean value indicating whether the process has been successfully un-registered from the IS or not;
- removeSpec() – the WS version of the above function;
- libRemoveInstance() – which takes as input parameter a message containing the process running instance ID and returns a Boolean value indicating whether the process has been successfully un-registered from the IS or not;
- removeInstance() – the WS version of the above function;
- libGetProcessDefinition() – which takes as input parameter a message containing the process ID and returns the process definition of such a process;
- getProcessDefinition() – the WS version of the above function;
- libSearchForProcessDefinitionsByRegex() – which takes as input parameter a message containing a processing filtering condition and returns the list of process definition registered in the IS that matches the specified criteria;
- searchForProcessDefinitionsByRegex() – the WS version of the above function;
- libGetServicesOnGHN() – which takes as input parameter a message containing a GHN ID and returns the list of running instances currently hosted on the specified GHN by providing the GHN ID, the porttype univocally identifying the service, and the EPR the running instance can be reached;
- getServicesOnGHN() – the WS version of the above function;
- libGetCSInstances() – which takes as input parameter a message containing a process ID, the status of the running instance and returns the list of the current process running instances matching such criteria by providing the process ID, the process running instance ID and the operational status;
- getCSInstances() – the WS version of the above function;
- libGetRunningGCubeInstances() – which takes as input parameter a message containing a porttype univocally identifying a gCube service and, optionally, a gHN ID and returns an array of running instances matching such criteria by providing the gHN ID, the porttype and the EPR;
- getRunningGCubeInstances () – the WS version of the above function;
- libSearchForGCubeServicesByAnyText() – which takes as input parameter a message containing search criteria (specifying descriptive aspects like service class, service name, package name, entry name, porttype namespace and local name) and returns the list of the gCube service resources matching such criteria by providing the the service class, the service name, the package name, the entry name and the porttype;
- searchForGCubeServicesByAnyText() – the WS version of the above function;
- libSearchForGCubeServicesByFilters() – which takes as input parameter a message containing search criteria (specifying descriptive aspects like service class, service name, package name, entry name, porttype namespace and local name) and returns the list of the gCube service resources matching these criteria (logical AND) by providing the the service class, the service name, the package name, the entry name and the porttype;
- searchForGCubeServicesByFilters() – the WS version of the above function;
- libGetGHNInfo() – which takes as input parameter a message containing a GHN ID and returns the list of existing GHNs by providing their ID, hostname, IP address, the site name, the site country and other information maintained in the GHN profile like the RAM size;
- getGHNInfo() – the WS version of the above function;
- isEndpointReachable() – which takes as input parameter a message containing the EPR of a Running Instance and returns a Boolean value indicating whether the running instance has to be considered reachable or not by trying to establish a socket connection.