Banner
Title: GT4 Practical
Subtitle: Menu Page
Tutor: Lisa Childers
Authors: GT4 Team
  • File Store Services

    A factory pattern which has a factory service and an instance is used to implement the file services functionality. There are two services: File Store Factory Service and File Service. The services allow for creation and deletion of files and the functionality to read/write data to the files and concatenate data from multiple files to one.

    • Functionality

      The File Store Factory Service is used to create files and allows for creating three types of file to store one dimensional, two dimensional or three dimensional data. An EPR the created file is returned to the client. The File Service is used to manage the created files and provides an interface with methods to store, fetch, and concatenate data.

    • Resource and Resource Home

      The File Store Factory Service has a resource per user and stores aggregated state information about the files on a per user basis. The first time a user creates a file, a resource on factory service is created for the user and quota values are initialized. The File Service is then accessed to create the actual file. On subsequent create calls, the quota per user is changed to reflect the new file size and the File Service is accessed to create the file.

      The File Service creates a resource per file that is created and stores a mapping from the resource id to the created resource object. The File Service resources are persisted, that is state is written out to file. This ensures that they are accessible even if the container is restarted.

    • Resource and Resource Home

      This service exposes the quota per user as resource property.

    • Security Aspects

      The File Store Factory Service and File Service require the client to have valid credentials to invoke some operations on the services.

      The File Store Factory Service requires that the client use one of the three authentication mechanisms supported by GT to create a file. GT supports three authentication methods, GSI Secure Conversation, GSI Secure Message and GSI Secure Transport. The service extracts the Distinguished Name from the credentials used by the client and is used to uniquely identify the client. If the client is creating a file for the first time, a new resource is created a mapping from the DN to the resource id is maintained. On subsequent calls, the resource id is retrieved from the map and quota for that client is updated.

      The File Service does not impose any security restrictions. If the EPR returned from the File Store Factory Service upon a createFile method invocation is used, any user can access the file.

    • Location of files

      ws-filestore/service/*/factory for File Store Factory and ws-filestore/service/*/service for File Store Service.

  • Sequence Generator Service

    • Functionality

      This service is used to generate a sequence of equally spaced read numbers within a given range. The input provided is the range within which the numbers should be the step increment to use. The generated numbers are written to a file whose EPR also provided as input to the service and created using the File Factory Service

    • Resource and Resource Home

      This service does not have any state and hence does not need any resource home or resource.

    • Resource Properties (RP)

      Since there is no state, there are no resource properties.

    • Location of files

      ws-seqgen

  • XProduct Service

    • Functionality

      This service is used to generate a cross product of one dimensional (1D) data. The service reads two sets of 1D points from files pointed to be EPRs and generates all possible pairs of 1D data. The resulting cross product is written out to a file using the File Service EPR. For example, say the range provided to the sequence generator is 1 to 5 and step is 2. Then the numbers generated would be (1, 3, 5). Say another set generated is (2, 4). If the two sets are provided as input to Xproduct Generator, then the output is a set of points with all possible cross products such as { (1, 2), (1, 4), (3, 2) ... } and so on.

    • Resource and Resource Home

      This service does not have any state and hence does not need any resource home or resource

    • Resource Properties (RP)

      This service does not have any state and hence does not need any resource home or resource

    • Location of files

      ws-xprod

  • Visualizer Service

    • Functionality

      This service is used to convert the results of a surface probe to a format that can be used to visualize the results using GNU Plot. The service reads the points from a file pointed to by an EPR (to a File Service resource) and converts the XML representation to format that can be interpreted by gnu plot. The output of the plot is returned as a string and can be stored as a ps file.

    • Resource and Resource Home

      This service does not have any state and hence does not need any resource home or resource

    • Resource Properties (RP)

      This service does not have any state and hence does not need any resource home or resource

    • Location of files

      ws-visualizer

  • Pillar Surface Service

    • Functionality

      This service exposes a surface with various pillars on it. Each pillar has a plque with some text written on it. It provides an interface with a method "probe" that can be used to query the height on the surface given a point (x, y). The points to probe are read from a file that was created and written to a file created using the File Store Service. To throttle the requests that come in, the services are defined to allow only a set number of points per probe. Another method allows to probe the service and get the data back over the wire, rather than store in a file.

    • Resource and Resource Home

      The state information that is service needs to store is configuration information and information about the surface being exposed as service. But only a single resource is required and hence this service has a singleton resource home

    • Resource Properties (RP)

      Two pieces of state information are exposed as resource property by this service. The maximum sample size of a probe, which limits the number of points that can be queried in one invocation by the client, is exposed as a resource property. The other piece of state exposed is the bounding box of the surface, which provides the outer limit within which the querying bounding box should be.

    • Location of files

      ws-surface

Top