GRSF-services

From Gcube Wiki
Revision as of 11:19, 25 November 2016 by Yannis.marketakis (Talk | contribs) (grsf-services-updater)

Jump to: navigation, search

GRSF-services

In this page we describe the components that are responsible for interacting with the gCube infrastructure for performing various activities about GRSF records. GRSF records are handled as dataset resources and are stored in the data catalogue. The following image depicts a high level view of the architecture of components that are exploited for constructing the GRSF KB, publishing GRSF records and updating them. In the sequel we will focus and describe the components grsf-services-core and grsf-services-updater.

GRSF-components.png

grsf-services-core

This component is responsible for retrieving individual records from the GRSF KB and publish them in the GRSF data catalogue. For this reason it uses the particular service (which is described at GCube_Data_Catalogue_for_GRSF). Since the service is accepting incoming records (either for stocks or fisheries) as JSON objects, the main functionality of the grsf-services-core component is to act a a bridge between the GRSF KB and the GRSF data catalogue. The corresponding steps for publishing a set of records is described below (and in the corresponding sequence diagram).

  1. The grsf-services-core component fetches all the GRSF records and their corresponding information from the GRSF KB. Since the GRSF KB is a semantic warehouse, its contents are stored as a set of RDF triples; therefore in order to fetch them a particular SPARQL query has to be formulated and submitted to the GRSF KB.
  2. After fetching all the GRSF records (in terms of RDF triples), they have to be transformed so that they can be published through the publishing service of the GRSF data catalogue. The services accepts JSON object, therefore the RDF triples are transformed accordingly with respect to the expected metadata (which are described here).
  3. The grsf-services-core component publishes the transformed JSON objects and retrieves the results.

GRSF-records-publishing.png

The component is being delivered as a software library. It is being triggered from MatWare after the construction of the GRSF KB.

grsf-services-updater

This component is responsible for updating the status of a record, when the users requires so. More specifically the component is delivered as a service, that accepts incoming requests containing the record that will be updated, with its accompanying information (the new status, a narrative text describing the status update). Once a request has been received the service will update the contents in the GRSF KB, and return a response message information the caller for the results. The communication messages for the service are formulated JSON objects. The steps that are followed are described in detail below (with the corresponding part of the sequence diagram).

  1. a new incoming request for a record status update is being received from the grsf-services-updater.
  2. grsf-services-updater validates that the request contains valid data
  3. grsf-services-updater updates the corresponding component in the GRSF KB. For this reason the appropriate SPARQL update query is being formulated and submitted to GRSF KB
  4. grsf-services-updater returns a response (as a JSON object) with the result of the update process.

GRSF-records-updating.png

//TO-ADD

  • signature of the service
  • HTTP response codes and response messages

Links

//TO-ADD

  • Links to SVN
  • Links to corresponding tickets