Difference between revisions of "Facet Based Resource Model"
Luca.frosini (Talk | contribs) (→Relation Property) |
Luca.frosini (Talk | contribs) (→Dataset) |
||
Line 1,041: | Line 1,041: | ||
| [[#Identifier_Facet|Identifier]] | | [[#Identifier_Facet|Identifier]] | ||
| '''TBD''' | | '''TBD''' | ||
+ | |- | ||
+ | | [[#Dataset|Dataset]] | ||
+ | | [[#Contact_Relation|Contact Relation]] | ||
+ | | align=center|1..n | ||
+ | | [[#Contact_Facet|Contact Facet]] | ||
+ | | ... | ||
|- | |- | ||
| [[#Dataset|Dataset]] | | [[#Dataset|Dataset]] |
Revision as of 11:15, 21 July 2016
Basic Concepts
- Two typologies of entities are envisaged:
- Resources, i.e. entities representing a description of "thing" to be managed;
- Every Resource is characterised by a number of Facets.
- 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 properties;
- Resources, i.e. entities representing a description of "thing" to be managed;
- 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.
Property
Any Property can be enriched with the following attributes:
- Name : Property Name
- Type : The Type of the Property (e.g. String, Integer, ...). See Property Type
- 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
Property Type
Basic Property Type
Type | Description | Java type |
---|---|---|
Boolean | Handles only the values True or False | java.lang.Boolean or boolean
|
Integer | 32-bit signed Integers | java.lang.Integer or int
|
Short | Small 16-bit signed integers | java.lang.Short or short
|
Long | Big 64-bit signed integers | java.lang.Long or long
|
Float | Decimal numbers | java.lang.Float or float
|
Double | Decimal numbers with high precision | java.lang.Double or double
|
Datetime | Any date with the precision up to milliseconds. | java.util.Date
|
String | Any string as alphanumeric sequence of chars | java.lang.String
|
Binary | Can contain any value as byte array | byte[]
|
Embedded | The Record is contained inside the owner. The contained Record has no <a href="http://orientdb.com/docs/2.1/Concepts.html#recordid">RecordId</a> | org.gcube.informationsystem.model.embedded.Embedded
|
Embedded list | The Records are contained inside the owner. The contained records have no <a href="http://orientdb.com/docs/2.1/Concepts.html#recordid">RecordIds</a> and are reachable only by navigating the owner record | List<? extends Embeddedgt;
|
Embedded set | The Records are contained inside the owner. The contained Records have no <a href="http://orientdb.com/docs/2.1/Concepts.html#recordid">RecordId</a> and are reachable only by navigating the owner record | Set<? extends Embedded>
|
Embedded map | The Records are contained inside the owner as values of the entries, while the keys can only be Strings. The contained records are reachable only by navigating the owner Record | Map<String, ? extends Embedded>
|
Link | Link to another Entity. | UUID
|
Byte | Single byte. Useful to store small 8-bit signed integers | java.lang.Byte or byte
|
Date | Any date as year, month and day. To know more about it, look at <a href="http://orientdb.com/docs/2.1/Managing-Dates.html">Managing Dates</a> | java.util.Date
|
Any | Not determinated type, used to specify Collections of mixed type, and null |
Derived Property Type
The following are obtained using a String as real type and adding a validation regex.
Type | Description | Java type |
---|---|---|
Enum | String representation of the Enum. The check enumeration is obtained creating an ad-hoc Regular Expression in the form (FIRST-ENUM-STRING_REPRESENTATION|SECOND-ENUM-STRING_REPRESENTATION|...|LAST_ENUM_STRING_REPRESENTATION) .
|
java.lang.Enum or enum
|
UUID | String representation of the UUID. The check is obtained using the regular expression ([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}
|
java.util.UUID
|
URL | String representation of the URL. The check is obtained using a regex available at https://mathiasbynens.be/demo/url-regex (see diegoperini one). | java.net.URL
|
URI | String representation of the URI. The check is obtained using . | java.net.URI
|
Header
Every Entity and Relation has an Header automatically filled by the System. The Header has the following properties:
Name | Type | Description | Attributes |
---|---|---|---|
uuid | UUID | This uuid can be used to univocally identify the Entity or the Relation | Mandatory=true NotNull=true ReadOnly=true
|
creator | String | Filled at creation time. The creator is retrieved using the authorization token | Mandatory=true NotNull=true ReadOnly=true
|
creationTime | Long | Creation time in milliseconds. Represent the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970 UTC | Mandatory=true NotNull=true ReadOnly=true
|
lastUpdateTime | Long | Last Update time in milliseconds. Represent the difference, measured in milliseconds, between the last update time and midnight, January 1, 1970 UTC | Mandatory=true NotNull=true
|
Facets
Early ideas and thinking on facets were documented at 2nd Generation Resource Model : Facets
Facets Specification
Every Facet has:
- An Header
- Zero or more properties. Some of the properties are predefined, but any other property can be added.
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 |
---|---|---|---|
title | String | e.g. Dr., Mrs, Mr, | Mandatory=false
|
name | String | First Name | Mandatory=true NotNull=true
|
middleName | String | Middle Name | Mandatory=false
|
surname | String | Surname | Mandatory=true NotNull=true
|
An RFC‑822 compliant email address. | Mandatory=true NotNull=true Regex see http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
| ||
website | URL | The main website | |
address | String | A physical address | |
phone | String | A phone number |
Coverage Facet
The goal of this facet is to collect any extent-related information.
Name | Type | Description | Attributes |
---|---|---|---|
value | String | ... | Mandatory=true NotNull=true
|
schema | URI | ... | Mandatory=true NotNull=true
|
CPU Facet
The goal of this facet is to describe CPU information.
Name | Type | Description | Attributes |
---|---|---|---|
model | String | ... | Mandatory=true NotNull=true
|
vendor | String | ... | Mandatory=true NotNull=true
|
clockSpeed | String | ... | Mandatory=true NotNull=true
|
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 | Mandatory=true NotNull=true
|
schema | URI | ... | Mandatory=true NotNull=true
|
Event Facet
The goal of this facet is to collect any descriptive metadata about the resource.
Name | Type | Description | Attributes |
---|---|---|---|
value | String | ... | Mandatory=true NotNull=true
|
schema | URI | ... | Mandatory=true NotNull=true
|
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 | ... |
Identifier 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 | Mandatory=true NotNull=true
|
type | Enumeration | The typology of identifier. I.e. URI, DOI, IRI, URL, URN, UUID; | Mandatory=true NotNull=true
|
isPersistent | boolean | To indicate if the Identifier is persistent or not. | Mandatory=true NotNull=true
|
Location Facet
The goal of this facet is to collect information about Location
Name | Type | Description | Attributes |
---|---|---|---|
Country | String | ... | |
Location | String | ... | |
Latitude | String | ... | |
Longitude | String | ... |
Network Address Facet
The goal of this facet is to capture IP information
Name | Type | Description | Attributes |
---|---|---|---|
hostName | String | ... | |
domainName | String | ... | |
IPAddress | String | ... | Mandatory=true NotNull=true
|
mask | String | ... | |
broadcastAddress | String | ... |
Regular expression to validate different IPv4 addresses are available at:
Both IPv4 and IPv6: http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
License Facet
Name | Type | Description | Attributes |
---|---|---|---|
name | String | E.g. EUPL 1.1, GPLv2, BSD, ... | Mandatory=true NotNull=true
|
text | URL | Licence URL | Mandatory=true NotNull=true
|
Memory Facet
The goal of this facet is to .....
Name | Type | Description | Attributes |
---|---|---|---|
size | Long | ... | Mandatory=true NotNull=true
|
used | Long | ... | Mandatory=true NotNull=true
|
unit | String | ... | Mandatory=true NotNull=true
|
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 |
---|---|---|---|
name | String | ... | Mandatory=true NotNull=true
|
value | String | ... | Mandatory=true NotNull=true
|
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. | |
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
|
Service State Facet
Name | Type | Description | Attributes |
---|---|---|---|
value | String | The value of the state | Mandatory=true NotNull=true Regex=(STARTED|ready|down|failed)
|
Container State Facet
Name | Type | Description | Attributes |
---|---|---|---|
value | String | The value of the state | Mandatory=true NotNull=true Regex=(started|ready|certified|down|failed)
|
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
|
Relation
Every Facet has:
- An Header
- A Relation Property
- Zero or More properties (not necessarily predefined) similarly to facet.
Relation Property
Name | Type | Description |
---|---|---|
referentialIntegrity | Enum | I.e. onDeleteCascadeWhenOrphan, onDeleteCascade, onDeleteKeep. The meaning is related to the relation direction. |
accessPolicy | Embedded (i.e. AccessPolicy) | A policy is characterized by a name, a description, and the period ([start], [end]) when the policies apply |
expiryTime | Long | The expiry date can be used to model the time until the relationship is valid, Expiry time in milliseconds. Represent the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970 UTC |
RelatedTo
The following relations have been identified and defined:
CallFor
ConfiguredBy
PartOf
CustomizedBy
Demand
DependOn
PluginOf
Discover
Host
Manage
ManagedBy
Hosting Node to Site
PoweredBy
Require
Run
Use
ConsistOf
The following relations (extending the ConsistOf) have been identified and defined:
Identify
Coverage Relation
Temporal
Spatial
Memory Relation
Persistent
Volatile
Contact Relation
Contributor
Creator
Curator
Developer
Manager
Owner
Resources
Every Resource has:
A class can be identified as Abstract
. This means that cannot be instantiated. Use specialization instead.
It is not required that an Abstract class establish an Identify relation with a Facet.
Resource
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 | 0..n | Facet | Any Resource consist of zero 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 following Resources have been identified:
Actor
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Actor | Identify | 1..n | Contact | An Actor has at least a Contact Facet which permit to identify the Actor per se. |
Actor | ConsistOf | 0..n | Contact | An Actor can have other Contact Facets which provide secondary contact information. |
Resources | ||||
Actor | RelatedTo | 0..n | TBD | TBD |
Configuration
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Configuration | Identify | 1..n | Simple Property | TBD |
Configuration | ConsistOf | 0..n | Facet | TBD |
Resources | ||||
Software | ConfiguredBy | 0..n | Configuration | TBD |
Service | CustomizedBy | 0..n | Configuration | TBD |
Dataset
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Dataset | Identify | 1..n | Identifier | TBD |
Dataset | Contact Relation | 1..n | Contact Facet | ... |
Dataset | Curator | 0..n | Contact Facet | Is he the curator |
Dataset | Owner | 0..n | Contact Facet | Is he the owner |
Dataset | Creator | 0..n | Contact Facet | Is he the creator |
Dataset | Contributor | 0..n | Contact Facet | Is he the contributor |
Dataset | Maintainer | 0..n | Contact Facet | Is he the maintainer |
Dataset | ConsistOf | 0..n | Access Point Facet | The embargoState can be modeled through the access policy defined in the ConsistOf relation |
Dataset | ConsistOf | 0..n | License Facet | The duration of license if any can can be modeled through the expiry date defined in the ConsistOf relation |
Dataset | ConsistOf | 0..n | Event Facet | TBD |
Dataset | ConsistOf | 0..n | Provenance Facet | TBD |
Dataset | Temporal | 0..n | Coverage | TBD |
Dataset | Spatial | 0..n | Coverage | TBD |
Dataset | ConsistOf | 0..n | Descriptive Metadata | TBD |
Dataset | ConsistOf | 0..n | Subject | TBD |
Resources | ||||
Service | Manage | 0..n | Dataset | TBD |
Dataset | CorrelatedTo | 0..n | Dataset | TBD |
Concrete Dataset | PartOf | 0..n | Dataset | TBD |
Concrete Dataset
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Concrete Dataset | Maintainer | 1..n | Contact Facet | Is he the maintainer |
Concrete Dataset | ConsistOf | 1..n | Access Point Facet | The embargoState can be modeled through the access policy defined in the ConsistOf relation |
Resources | ||||
Concrete Dataset | PartOf | 0..n | Dataset | TBD |
Service
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Service | ConsistOf | 0..n | Contact Facet | TBD |
Resources | ||||
Software | Require | 0..n | Service | TBD |
Service | CallFor | 0..n | Service | TBD |
Service | CustomizedBy | 0..n | Configuration | TBD |
Service | Manage | 0..n | Dataset | TBD |
Abstract Service
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Abstract Service | Identify | 1..n | TBD | TBD |
Abstract Service | ConsistOf | 0..n | TBD | TBD |
Resources | ||||
Abstract Service | Demand | 0..n | Software | TBD |
E-Service
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
E-Service | Identify | 1..1 | Software | TBD |
E-Service | ConsistOf | 1..n | Access Point | Identify the endpoints of the E-Service |
E-Service | ConsistOf | 1..n | Event | E.g. ActivationTime,DeploymenTime) |
E-Service | ConsistOf | 1..1 | Service State | I.e. STARTED, ready, down, failed |
Resources | ||||
E-Service | Run | 0..n | Software | TBD |
E-Service | Use | 0..n | E-Service | A reference to any other E-Service, the E-Service instance is invoking. |
E-Service | Discover | 0..n | E-Service | A reference to any other E-Service, the E-Service instance is discovering through query on IS. |
Hosting Node | Host | 0..n | E-Service | TBD |
Hosting Node
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Hosting Node | ConsistOf | 1..n | CPU Facet | CPU Information |
Hosting Node | ConsistOf | 1..n | Persistent Memory Facet | Disk Space TBD Specialize ConsistOf |
Hosting Node | ConsistOf | 1..n | Volatile Memory Facet | RAM TBD Specialize ConsistOf |
Hosting Node | ConsistOf | 1..n | Network Address | Network address |
Hosting Node | ConsistOf | 1..n | Event | TBD |
Hosting Node | ConsistOf | 1..n | Container State | I.e. started, ready, certified, down, failed |
Hosting Node | ConsistOf | 1..n | Simple Property | E.g. Environment Variables |
Resources | ||||
Hosting Node | Host | 0..n | E-Service | A reference to any E-Service instance, the Hosting Node instance is hosting. |
Hosting Node | ManagedBy | 0..n | Site | TBD |
Hosting Node | PoweredBy | 0..n | Software | TBD |
Schema
TBD
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Schema | Identify | 1..n | Identification | TBD |
Schema | ConsistOf | 1..n | TBD | TBD |
Resources | ||||
Schema | TBD | 0..n | TBD | TBD |
Site
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Site | Identify | 1..n | Identification | TBD |
Site | ConsistOf | 1..n | Contact Facet | TBD |
Site | ConsistOf | 1..n | Location Facet | TBD |
Hosting Node | ConsistOf | 1..n | Network Address | Network address TBD |
Resources | ||||
Hosting Node | ManagedBy | 0..n | Site | TBD |
Software
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Software | Identify | 1..n | Software | Software coordinates which identify the Software per se. |
Software | ConsistOf | 1..n | Software | Apart the one connected with Identify relation (gCube coordinates) the others identify the sw in other way e.g. (Maven coordinates) |
Software | ConsistOf | 0..n TBD | Access Point | Links to maven artifact on nexus, javadoc, wiki, svn ... |
Software | ConsistOf | 0..n TBD | License | TBD |
Software | ConsistOf | 1..n | State | TBD |
Resources | ||||
Software | ConfiguredBy | 0..n | Configuration | TBD |
Software | DependOn | 0..n | Software | TBD |
Software | Require | 0..n | Service | TBD |
Plugin | PluginOf | 0..n | Software | TBD |
Abstract Service | Demand | 0..n | Software | An inverse reference stemming from the Abstract Service that is ... |
E-Service | Run | 0..n | Software | An inverse reference stemming from the E-Service that is running this Software |
Hosting Node | PoweredBy | 0..n | Software | An inverse reference stemming from the Hosting Node that is ... |
Plugin
Source | Relation | Multiplicity | Target | Description |
---|---|---|---|---|
Facets | ||||
Plugin | TBD | TBD | TBD | TBD |
Resources | ||||
Plugin | PluginOf | 1..n | Software | A reference to the Software this Plugin extends capabilities. |
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.
Internal Entity and Relation
For internal use only are defined the following entity and relation:
Context
Model a Context (aka scope)
ParentOf
A relation beetween two Context