Facet Based Resource Model

From Gcube Wiki
Revision as of 15:25, 18 July 2016 by Luca.frosini (Talk | contribs) (Site)

Jump to: navigation, search

Basic Concepts

  • Two typologies of entities are envisaged:
    • Resources, i.e. entities representing a description of "thing" to be managed;
    • Facets, i.e. entities contributing to "build" a description of a Resource. Every facet, once attached to a Resource profile captures a certain aspect / characterization of the resource;
      • Every facet is characterised by a number of fields / attributed;
  • Two typologies of relations are envisaged:
  • Entities and relations can be specialized.
    • A number of specializations are identified below. Such specializations are managed by the gCube Core services, i.e. Core services builds upon these specialization to realize its management tasks;
    • Other specializations can be defined by clients, the system make it possible to store these additional typologies of relations and facets and to discover them.
  • On relations:
    • Any relation has a direction, i.e. a "source" and a "target". Anyway the relation can be also navigated in the opposite direction;
    • It is not permitted to define a Relation having a Facet as "source".
      • It is not permitted to define a Relation connecting a Facet with another one;
      • It is not permitted to define a Relation connecting a Facet with a Resource;
    • A Facet instance can be linked (by ConsistOf or any specialization of it) from different Resources.

Facets

Early ideas and thinking on facets were documented at 2nd Generation Resource Model : Facets

Facets Specification

Every Facet has:

Any property can be enriched with the following attributes:

  • Name : Property Name
  • Type : The Type of the Property (e.g. String, Integer, ...).
  • Description : The description of the property. default=null.
  • Mandatory (M): Indicate if the Property is Mandatory. default=false.
  • ReadOnly (RO): The property cannot change its value. default=false.
  • NotNull (NN): default=false
  • Max (Max): default=null
  • Min (Min): default=null
  • Regexpr (Reg)): A Regular Expression to validate the property value.default=null


Access Point Facet

The goal of this facet is expected to capture information on “access points” for a resource, i.e. any endpoint to interact with the resource via a known protocol.

Name Type Description Attributes
entryName String An unique identifier
endpoint URI The URI which identify the endpoint of a resource Mandatory=true ReadOnly=true NotNull=true
protocol String The high-level protocol used by the access point. The String could contains the version if needed.

E.g. WMS not http which is already contained in URI.

description String .....
authorization String Contains authorization information. E.g: a token, username:password. By relying on schema it should be sufficient to capture also whether the content is encrypted or not
authorizationSchema URI ....
properties String This can be an arbitrarily complex element whose "structure" is defined by the associated schema
propertiesSchema URI ....

Contact Facet

The goal of this facet is expected to capture contact information.

Name Type Description Attributes
name String TBD Contains Name and Surname maybe also middle name and title (Dr. Mr.) or we add a new fields Mandatory=true NotNull=true
eMail String An RFC‑822 compliant email address. Mandatory=true NotNull=true Regex see http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
website URL ...
address String ...
phone String ...

Coverage Facet

The goal of this facet is to collect any extent-related information.

Name Type Description Attributes
spatialSchema URI ...
temporal String ...
temporalSchema URI .....

CPU Facet

The goal of this facet is to describe CPU information.

TODO to be reviewed

Name Type Description Attributes
model String ...
vendor String ...
clockSpeed String ...

Descriptive Metadata Facet

The goal of this facet is to collect any descriptive metadata about the resource.

Name Type Description Attributes
value String Inherited. E.g. XML Blob
schema URI ...

Event Facet

The goal of this facet is to collect any descriptive metadata about the resource.

Name Type Description Attributes
type String ...
typeSchema URI ...
date String ...
dateSchema URI ...

Functionality Related Facet

The goal of this facet is to capture what are the facilities supported (Challenging because of the different audiences) Something very "poor" ... we can have a look at WPS spec

Name Type Description Attributes
name String ...
description String ...
input String ...
output String ...

Identification Facet

The goal of this facet is to collect information on Identifiers that can be attached to a resource.

Name Type Description Attributes
value String The identifier. E.g. http://fr.dbpedia.org/resource/Thunnus de305d54-75b4-431b-adb2-eb6b9e546014
type Enumeration The typology of identifier. E.g. URI, DOI, IRI, URL, URN, UUID;
isPersistent boolean To indicate if the Identifier is persistent or not.

Network Address Facet

The goal of this facet is to capture IP information

Name Type Description Attributes
hostName String ...
domainName String ...
IPAddress String ...
mask String ...
broadcastAddress String ...

Regular expression to validate different IPv4 addresses are available at:

http://www.regextester.com/22

https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html

Both IPv4 and IPv6: http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses

License Facet

The goal of this facet is to .....

Name Type Description Attributes
value String ...
schema URI Licence URI

Memory Facet

The goal of this facet is to .....

Name Type Description Attributes
size Long ...
used Long ...
unit String ...
Persistent Memory Facet

Specialization of Memory Facet

TBD if instead of subclassing is better subclassing ConsistOf relation of reintroduce purpose in relation or header

Volatile Memory Facet

Specialization of Memory Facet

TBD if instead of subclassing is better subclassing ConsistOf relation of reintroduce purpose in relation or header

Peripheral Facet

The goal of this facet is to .....

Name Type Description Attributes
model String ...
vendor String ...

Provenance Facet

The goal of this facet is to collect information related with resource lineage/provenance

Name Type Description Attributes
relationship Enum wasGeneratedBy | ...
reference String resourceID (a reference to the "originator" Resource associated to the resource the facet is attached to by the relationship)
provenanceDocument String ... E.g. the xml format
provenanceDocumentSchema String ... E.g. a reference to the format

Simple Property Facet

The goal of this facet is the base class for all facets described by a value and the schema of the value

Name Type Description Attributes
value String ...
schema URI ...

Software Facet

The goal of this facet is to capture SW related features"

Name Type Description Attributes
name String The name of the software artefact being described. E.g. artifactId in maven, Service Name in gCube software, the software name for retail software Microsoft Office 2013-SP2.
group String The name of "group" the software artefact belongs to. E.g. groupId in Maven, ServiceClass in gCube software, company name for retail software Microsoft Office 2013-SP2.
version String The particular release of the software artefact. E.g. maven version, Service Version in gCube software, artifactId in maven, the software version for retail software Microsoft Office 2013-SP2.
description String A human oriented description of the software artefact being described.
qualifier String E.g. packaging or scope in maven, scope level or sharable level in gCube software, target architecture for retail software x86 or amd64.
role TO BE REMOVED String Identify the role of this facet. E.g. dependency.
optional boolean .... Used in maven and in gcube

State Facet

The goal of this facet is to ...

Name Type Description Attributes
value String The value of the state. Must be compliant with schema. Mandatory=true NotNull=true
schema URI The URI of the schema. It is only an informative field. It is not used for validation from IS part. Mandatory=true NotNull=true
Service State Facet
Name Type Description Attributes
value String The value of the state Mandatory=true NotNull=true Regex=(STARTED|ready|down|failed)
schema URI Always has the value https://data.d4science.org/schema/ServiceStateFacet Mandatory=true ReadOnly=true NotNull=true Regex=(https://data.d4science.org/schema/ServiceStateFacet)
Container State Facet
Name Type Description Attributes
value String The value of the state Mandatory=true NotNull=true Regex=(started|ready|certified|down|failed)
schema URI Always has the value https://data.d4science.org/schema/ContainerStateFacet Mandatory=true ReadOnly=true NotNull=true Regex=(https://data.d4science.org/schema/ContainerStateFacet)

Subject Facet

The goal of this facet is to ...

Name Type Description Attributes
value String The value of the state. Must be compliant with schema. Mandatory=true NotNull=true
schema URI The URI of the schema. It is only an informative field. It is not used for validation from IS part. Mandatory=true NotNull=true

Type Facet

The goal of this facet is to ...

Name Type Description Attributes
value String The value of the state. Must be compliant with schema. Mandatory=true NotNull=true
schema URI The URI of the schema. It is only an informative field. It is not used for validation from IS part. Mandatory=true NotNull=true

Relation

RelatedTo

The following relations (extending the RelatedTo) have been identified and defined:

ConsistOf

The following relations (extending the ConsistOf) have been identified and defined:

Resources

......

Resource

Resource Profile
This entity is conceived to describe every "main thing" to be registered and discovered by the Information System.
Source Relation Multiplicity Target Description
Facets
Resource Identify 1..n Facet Any Resource has at least one Facet which in some way allow to identify the Resource per se.
Resource ConsistOf 1..n Facet Any Resource consist of one or more facets which describes the different aspects of the facet.
Resources
Resource RelatedTo 0..n Resource Any Resource can be related to any other resource. The Resource can be the source or the target of the relation. Please remind that the relation has a direction which provides the semantic of the relation. Anyway the relation can be also navigated in the opposite direction.


The following Resources have been identified:

Actor

Actor Profile
Source Relation Multiplicity Target Description
Facets
Actor Identify 1..n Contact ...
Actor ConsistOf 1..n Contact ...
Resources
Actor ... 1..n ... ...

Configuration

Configuration Profile
Source Relation Multiplicity Target Description
Facets
... Identify 1..n Identification ...
... ConsistOf 0..n ... ...
Resources
Software ConfiguredBy 0..n Configuration ...
Service CustomizedBy 0..n Configuration ...

Dataset

Dataset Profile
Facets
Name Multiplicity Description
Identification 1..n TBD
Contact Facet 1..n Missing is role: Is he the curator, owner, creator, contributor? This is an attribute of the relation
Access Point Facet ... Missing embargoState to the attached access policy
License Facet ... Missing duration of the license applied e.g. 15 years
Event Facet ... ...
Provenance Facet ... ...
ConsistOf Relations
... ... ...
RelatedTo Relations
... ... ...
Concrete Dataset
Concrete Dataset Profile extends Dataset Profile
Facets
Name Multiplicity Description
... ... ...
ConsistOf Relations
... ... ...
RelatedTo Relations
... ... ...

Service

Service Profile
Facets
Name Multiplicity Description
Identification 1..n TBD
Contact Facet 1..n ...
ConsistOf Relations
... ... ...
RelatedTo Relations
... ... ...
Abstract Service
Abstract Service Profile extends Service Profile
Facets
Name Multiplicity Description
... ... ...
ConsistOf Relations
... ... ...
RelatedTo Relations
DemandsFor (out) 0..n A reference to the Software ....
E-Service
E-Service Profile extends Service Profile
Facets
Name Multiplicity Description
Software 1..1 Related with #Identify ConsistOf Relation
Access Point 1..n Identify the endpoints.
Event 1..n E.g. ActivationTime,DeploymenTime)
State 1..1 I.e. STARTED, ready, certified, down, failed.
Relations
Run (out) 0..n A reference to the Software artifact the E-Service results from.
Use (out,in) 0..n A reference to any other E-Service, the E-Service instance is invoking.
Host (in) 1 An inverse reference stemming from the Hosting Node that is operating the E-Service.
Hosting Node
Hosting Node Profile extends Service Profile
Facets
Name Multiplicity Description
CPU Facet 1..n CPU Information
Persistent Memory Facet 1..n Disk Space
Volatile Memory Facet 1..n RAM
IP Info Facet 1..n IP address
Event 1..n ...
State 1..1 I.e. start, activation, stop, failure.
Simple Property 1..n E.g. Environment Variables
ConsistOf Relations
... ... ...
RelatedTo Relations
PoweredBy (out) 1..n A reference to the Software ....

Schema

Schema Profile
Source Relation Multiplicity Target Description
Facets
Schema Identify 1..n Identification ...
Schema ConsistOf 1..n SimpleValue ...
Resources
Schema ... 1..n ... ...


Site

Site Profile
Facets
Name Multiplicity Description
Contact Facet 1..n ...
Location Facet 1..n ...
ConsistOf Relations
... ... ...
RelatedTo Relations
... ... ...

Software

Software Profile
Facets
Name Multiplicity Description
Software 1..n Apart the one connected with #Identify relation (gCube coordinates) the others identify the sw in other way e.g. (Maven coordinates)
Access Point 1..n links to maven artifact on nexus, javadoc, wiki, svn ...
License 1..n ...
State 1..n ...
Relations
DependsOn (out) 0..n A reference to the Software
Require (out) 0..n A reference to the Service
Run (in) 0..n An inverse reference stemming from the E-Service that is running this Software
DemandsFor (in) 0..n An inverse reference stemming from the Abstract Service that is
PoweredBy (in) 0..n An inverse reference stemming from the Hosting Node that is

Best practices and guidelines

  • On Facet instances "reuse" across Resource Profiles:
    • This can be guaranteed automatically by the system, if and just in the case the system want to avoid duplication of information. It is based on a configuration policy;
    • This MUST be done only when a change in a facet instance MUST affect a change in all Resources connected to such a Facet.