Difference between revisions of "Edge Server Publication"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Downloading Edge Content)
(Generating Edge Content - Status)
Line 137: Line 137:
  
 
== Downloading Edge Content ==
 
== Downloading Edge Content ==
== Generating Edge Content - Status ==
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-

Revision as of 01:40, 11 February 2020


Overview

By design, the Fusion Registry does not diretly integrate with the Fusion Edge server, instead it is capable of generating content that can be published to it. The genearted content consists of a single zip file, as required by the Fusion Edge Server for ingestion.

Edge Server 'environments' can be described in the Fusion Registry, the puspose for describing an environment is to enable the Fusion Registry to know what content is should include/exclude from the published content. There is no direct or indirect relationship between the Fusion Registry and the Fusion Edge Server, so the 'environment' definition is simply to help administrators maintain a packaging definition.

The Fusion Registry User Interface supports the creation of an environment definition, and can be used to generate the publication file for the Fusion Edge Server. It is also possible to drive both processes using the Fusion Registry web services.

The process of publishing the generated content to the Fusion Edge server is beyond the remit of the Fusion Registry, and therefore is either a manual process, or an automated task using scripts which are external to, and not goverened by, the Fusion Registry

Environment Definition

The Fusion Edge Server Environment Definition consists of the following properties

Property Purpose
Id Unique Identifier. This is used when performing operations such as changing definitions, or generating a publication
Description Human readable description of the environment
Include Data whether to include datasets in the publication (or structural metadata only) (yes/no/or a specific list)
Include Reference Metadata true/false - whether to include reference metadata in the publication
Include Provisions true/false - related to the inclusion of data, whether to include Provision Agreements in the publication, or just the Dataflows
Edge Organisation optional. This can be set to any Data Provider,Data Consumer, or Agency in the Fusion Registry. When generating content for the Fusion Edge Server, the environment will be treated as a user, with the same security rules applied as if the linked Organisation were requesting structures or data. The default setting is anonymous user.
Enforce Embargo if set to true, then an Embargo date/time must be set when generating the Edge Server content


Generating Edge Content

The generation of Edge content requires the following information

Property Purpose
Publication Type
  • Full Replace - this is the default behaviour. The generated zip file contains the full contents (data/structures/reference metadata) for the Fusion Edge Server. When loading this zip to the Fusion Edge Server all existing content will be replaced.
  • Delta - only relevant for datasets. The generated zip file contains only datasets that have changed since the last publication. Only the data that has been changed will be included. When loading the file to the Fusion Edge Server, all existing content will be preserved, and the new data will be merged into the existing datasets
Embargo Optional. If an embargo time is supplied, this information is put into the zip's file name as a timestamp. The Fusion Edge Server uses the file name to determine if there is an embargo time, and will not publish the environment until the embargo time has passed

The generation of Edge conent is a request which is processed asyncronously, and as such a status report is maintained by the Fusion Registry so that the progress can be tracked. Once the edge content is ready, it can be downloaded via a sererate call.

Download Edge Content

Once the Fusion Registry has generated a Fusion Edge Server publication, it can be downloaded. The download is available up until such time that the Fusion Registry is asked to generate a new Fusion Edge Server publication for the same environment.


Web Service

Generating Edge Content

Entry Point /ws/secure/edge/buildEdgeServerPublication
Access Private (admin only)
Http Method POST
Content-Type application/json
Response Format application/json
Response Statuses

200 - Request accepted

400 - Posted content invalid

401 - Unauthorized (if access has been restricted)

500 - Server Error

The POST JSON should look as follows:

{
  "Id" : "EdgeEnvironmentId",
  "PublicationType" : "FullReplace",  
  "EmbargoDate" : 1581353225818,
}

PublicationType of Replace is used to indicate that it is a delta

The Embargo Date is optional, and measured in Epoc Timestamp milliseconds (number of milliseconds since 1970)


Generating Edge Content - Status

Entry Point /environment/status/{environmentID}
Access Private (admin only)
Http Method GET
Response Format application/json
Response Statuses

200 - Request accepted

401 - Unauthorized (if access has been restricted)

500 - Server Error

The reponse looks as follows:

{
 "id" : 1
 "environmentId" : "PROD"
 "processStartDate" : 1581353225818
 "processEndDate" : 1581353233333
 "status" : "PROCESSING"|"ERRORED"|"SUCCESSFUL"|"CANCELLED"|"WRITING_DATA"|"WRITING_STRUCTURES"
 "auditTxId" : "cd82166a-fe31-4870-8307-c0f8d00d3eb3",
 "totalDatasets" : 10,
 "processedDatasets" : 8
 "error" : ""
}
Property Description
id Unique identifier for this status
environmentId The Id of the environment that the status is for
processStartDate The end date of the Edge Server zip generation process, in epoch time milliseconds
processEndDate The end date of the Edge Server zip generation process, in epoch time milliseconds
status The current status of the Edge Server zip generation
auditTxId The audit transaction id
totalDatasets Total number of datasets that will be included in the output
processedDatasets Total number of datasets that have been written to the output so far
error Optional. Provided if the status is ERRORED.
Example

Downloading Edge Content

Entry Point /environment/export/{environmentID}
Access Private (admin only)
Http Method GET
Response Format application/octet-stream
Response Statuses

200 - Request accepted

401 - Unauthorized (if access has been restricted)

500 - Server Error

A call to this web service results in a file download which can be published to the Fusion Edge Server. The name of the file is important as it is used to tell the Fusion Edge Server what the contents are and how to treat the information. The following table describes the various names the file can take

File Name Description
node.zip Full Replace
node_1581353225818.zip Full Replace with an embargo time of 1581353225818 milliseconds since 1970. This timestamp relates to 10-Feb-2020, 16:47:05 GMT
delta.zip Contains only datasets to be merged with existing datasets in the Fusion Edge Server
delta_1581353225818.zip.zip Contains only datasets to be merged with existing datasets in the Fusion Edge Server - with an embargo time provided of 1581353225818 milliseconds since 1970.