Deployer

The Purpose

A Deployer provides Semantic Turkey with the ability to export data to some destination other than merely support its download. Different implementations of this extension point allow to target different types of destination.

The Model

A Deployer (it.uniroma2.art.semanticturkey.extension.extpts.deployer.Deployer) is fed with a Source (it.uniroma2.art.semanticturkey.extension.extpts.deployer.Source) object, which encapsulates the data to be deployed. Source is in fact an abstract class with two concrete subclasses corresponding to different types of sources:

Correspondingly, the extension point Deployer is specialized as follows:

Extension Point Details

The tables below summarizes the details of the Deployer extension point.

Name Deployer
Description A Deployer can export data to some kind of destination. It can be placed at the end of an export chain, when the goal is not to merely download the data.
Identifier it.uniroma2.art.semanticturkey.extension.extpts.deployer.Deployer
Configuration n/a
Settings n/a

Refined by:

Name Stream-sourced Deployer
Description A Stream-sourced Deployer can deploy data (stored in a file) to some stream-oriented destination. An implementation of this extension point may support exporting data to an SFTP server.
Identifier it.uniroma2.art.semanticturkey.extension.extpts.deployer.StreamSourcedDeployer
Configuration n/a
Settings n/a

and

Name Repository-sourced Deployer
Description A Repository-sourced Deployer can deploy data (fetched from a triple repository) to some triple-oriented destination (e.g. a triple store). An implementation of this extension point may support exporting data to a remote triple store using the SPARQL 1.1 Graph Store HTTP Protocol.
Identifier it.uniroma2.art.semanticturkey.extension.extpts.deployer.RepositorySourcedDeployer
Configuration n/a
Settings n/a

Interfaces

The following interface defines the contract for the Deployer extension point.


/*
* Extension point for deployers. They are placed at the end of an export process to deploy the exported data
* somewhere, e.g. a server conforming to the Graph Store API, an FTP server etc...
*/
public interface Deployer extends Extension {
	/**
	* Deploys the provided resource. The default implementation of this operation delegates the deployment of
	* specific resource types to known subclasses.
	* 
	* @param source
	* @throws IOException
	*/
	default void deploy(Source source) throws IOException {
		// omitted default implementation
	}
}	

The following interface defines the contract for the RepositorySourcedDeployer extension point.


/**
* A {@link Deployer} which can deploy a {@link RepositoryConnection}.
*/
public interface RepositorySourcedDeployer extends Deployer {
	void deploy(RepositorySource source) throws IOException;
}

The following interface defines the contract for the StreamSourcedDeloyer extension point.


/**
* A {@link Deployer} which can deploy a {@link FormattedResourceSource}.
*/
public interface StreamSourcedDeployer extends Deployer {
	void deploy(FormattedResourceSource source) throws IOException;
}	   

Choosing and Configuring a Deployer

Deployers can be created on demand by the system as they are needed to export data to the destination they support. Nonetheless, they are usually configurable components, the configurations of which can be stored according to the standard configuration/settings mechanism.

Deployer Implementations

Graph Store HTTP Deployer

Name Graph Store HTTP Deployer
Description A RepositorySourcedDeployer that deploys RDF data to a destination complying to the SPARQL 1.1 Graph Store HTTP Protocol
Identifier it.uniroma2.art.semanticturkey.extension.impl.deployer.sparql.GraphStoreHTTPDeployer
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

Graph Store HTTP Deployer Configuration (it.uniroma2.art.semanticturkey.extension.impl.deployer.sparql.GraphStoreHTTPDeployerConfiguration)
Either "graphStoreHTTPEndpoint" or "destinationGraph" shall be set.The credentials are stored without encryption on the server. Be aware that the system administration could be able to see them.
Graph Store HTTP endpoint (graphStoreHTTPEndpoint)
The address of the endpoint conforming to the HTTP Graph Store protocol. If not provided, it is assumed that the destination graph is identified directly
URL
Optional
Destination graph (destinationGraph)
The graph where data should be deployed. If not provided, the default graph is used
IRI
Optional
Clear first (clearFirst)
Tells if already existing data should be cleared fist
boolean
Required
Username (username)
Username
java.lang.String
Optional
Password (password)
Password
java.lang.String
Optional
Settings n/a

HTTP Deployer

Name HTTP Deployer
Description A StreamSourcedDeployer that uses the HTTP protocol
Identifier it.uniroma2.art.semanticturkey.extension.impl.deployer.http.HTTPDeployer
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

HTTP Deployer Configuration (it.uniroma2.art.semanticturkey.extension.impl.deployer.http.HTTPDeployerConfiguration)
The credentials are stored without encryption on the server. Be aware that the system administration could be able to see them.
Endpoint (endpoint)
The address of the endpoint where data will be deployed onto
URL
Required
HTTP Verb (httpVerb)
HTTP verb to use
java.lang.String (either PUT or POST)
Required
Query Parameters (queryParameters)
Additional query parameters
Map<java.lang.String, java.lang.String>
Optional
Request Headers (requestHeaders)
Additional request headers
Map<java.lang.String, java.lang.String>
Optional
Username (username)
Username
java.lang.String
Optional
Password (password)
Password
java.lang.String
Optional
Settings n/a

SFTP Deployer

Name SFTP Deployer
Description A StreamSourcedDeployer that uses the SFTP protocol
Identifier it.uniroma2.art.semanticturkey.extension.impl.deployer.sftp.SFTPDeployerConfiguration
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

SFTP Deployer Configuration (it.uniroma2.art.semanticturkey.extension.impl.deployer.sftp.SFTPDeployerConfiguration)
The credentials are stored without encryption on the server. Be aware that the system administration could be able to see them.
Host (host)
The target host name/address
URL
Required
Port (port)
The target port
integer (default: 21)
Required
Server key fingerprint (serverKeyFingerprint)
The fingerprint of the target server. The allowed forms are (MD5:)?[\\dA-F][\\dA-F](:[\\dA-F][\\dA-F]){15} and SHA(1|224|256|384|512):[Base64 encoding without trailing =]
java.lang.String
Required
Username (username)
Username
java.lang.String
Required
Password (password)
Password
java.lang.String
Optional
Destination name (destinationPath)
The path on the remote host where data will be deployed onto
java.lang.String
Required
Timeout (ms) (timeout)
Timeout in milliseconds
long (default: 300000)
Required
Settings n/a