Difference between revisions of "Information System Resource Registry"

From Gcube Wiki
Jump to: navigation, search
(Resource Registry Service)
(Resource Registry Query Template Client)
 
(25 intermediate revisions by the same user not shown)
Line 57: Line 57:
 
=== Resource Registry Service ===
 
=== Resource Registry Service ===
  
Resource Registry Service is the key component of the [[Information System]]. It is a web service running on [[SmartGears]] responsible to store information regarding the Infrastructure, in particular the global and partial view of:
+
'''Resource Registry Service''' is the key component of the Information System.  
 +
It is a web service running on [[SmartGears]] responsible for storing information regarding the Infrastructure, in particular, the global and partial view of:
 
* the resources (e.g. computing, storage, services, software, datasets);  
 
* the resources (e.g. computing, storage, services, software, datasets);  
 
* their current status (e.g. up and running, available);  
 
* their current status (e.g. up and running, available);  
Line 65: Line 66:
 
Resource Registry is developed only by using the concepts defined in the [[Facet_Based_Resource_Model#IS_Model|IS Model]] and it provides the capabilities to enrich its knowledge by creating new types of [[Facet_Based_Resource_Model#Entity|entities]] and [[Facet_Based_Resource_Model#Relation|relations]] and their schemas.
 
Resource Registry is developed only by using the concepts defined in the [[Facet_Based_Resource_Model#IS_Model|IS Model]] and it provides the capabilities to enrich its knowledge by creating new types of [[Facet_Based_Resource_Model#Entity|entities]] and [[Facet_Based_Resource_Model#Relation|relations]] and their schemas.
  
Resource Registry is capable of serving different applications domains (i.e. Context). To achieve this goal the Resource Registry provides capabilities to manage Contexts (the contexts are hierarchical) and associate the entities and relations to one or more of the Contexts as requested by the different clients.
+
Resource Registry is capable of serving different applications domains (i.e. Context). To achieve this goal, the Resource Registry provides capabilities to manage Contexts (the contexts are hierarchical) and associate the entities and relations to one or more of the Contexts as requested by the different clients.
  
The Resource registry is also responsible to notify any update or creation of any entity or relation to [[Information System Subscription Notification Service]].
+
The Resource registry is also responsible for notifying any update or creation of any entity or relation to [[Information System Subscription Notification Service]].
  
To reach its goals Resource Registry offers 5 port types.
+
Maven coordinates are:
* [[Interacting_with_Resource_Registry_Service_-_Context_and_Schema_Port_Type#Context_Management|Context Port Type]] : manage hierarchical Context;
+
* [[Interacting_with_Resource_Registry_Service_-_Context_and_Schema_Port_Type#Schema_Management|Schema Port Type]] : register and define Entities and Relations schema;
+
* [[Interacting_with_Resource_Registry_Service_-_Entities_and_Relations_Management|Instances Port Type]] : manage instances of registered Entity and Relation type;
+
* [[Interacting_with_Resource_Registry_Service_-_Entities_and_Relations_Management|Instances Sharing Port Type]] : allow to share instances accross contexts;
+
* [[Interacting_with_Resource_Registry_Service_-_Query_&_Access|Query & Access Port Type]] : query instances and get the schema definition of registered types.
+
  
Every Port type is exposed as [https://en.wikipedia.org/wiki/Representational_state_transfer REST] API.
+
<source lang="xml">
 +
<dependency>
 +
<groupId>org.gcube.information-system</groupId>
 +
<artifactId>resource-registry</artifactId>
 +
<version>[4.0.0,5.0.0-SNAPSHOT)</version>
 +
<dependency>
 +
</source>
  
Every REST API is [https://en.wikipedia.org/wiki/JSON JSON] based. This means that any content present in an HTTP request is formatted by using JSON standard.
 
  
 +
To reach its goals Resource Registry offers 5 port types:
 +
* [[Resource Registry_Service - Context Management|Context Management]] : it manages hierarchical contexts;
 +
* [[Resource Registry Service - Type Management|Type Management]] : it manages the definition of entities and relations types and their schema;
 +
* [[Resource Registry Service - Instances Management|Instances Management]] : it manages entities and relations instances;
 +
* [[Resource Registry Service - Instances Sharing Management|Instances Sharing Management]] : it manages instances sharing across different contexts;
 +
* [[Resource Registry Service - Query Templates Management|Query Templates Management]] : it manages query templates;
 +
* [[Resource Registry Service - Query & Access|Query & Access]] : it supports the discovery of instances through access patterns and queries.
  
The following tables summarise the APIs exposed by Resource Registry Service
+
Every Port type is exposed as [https://en.wikipedia.org/wiki/Representational_state_transfer REST] API.
 
+
'''Context Collection'''
+
  
{| class="wikitable"
+
Every REST API is [https://en.wikipedia.org/wiki/JSON JSON] based. In other words, any content of an HTTP request is represented in JSON.
! Operation || HTTP Method || URL
+
|-
+
| List || GET || <code>/contexts</code>
+
|-
+
| Create || PUT || <code>/contexts/{UUID}</code>
+
|-
+
| Read || GET || <code>/contexts/{UUID}</code>
+
|-
+
| Update || PUT || <code>/contexts/{UUID}</code>
+
|-
+
| Delete || DELETE || <code>/contexts/{UUID}</code>
+
|}
+
 
+
'''Type Collection'''
+
 
+
{| class="wikitable"
+
! Operation || HTTP Method || URL
+
|-
+
| Create || PUT || <code>/types/{TYPE_NAME}</code>
+
|-
+
| Read || GET || <code>/types/{TYPE_NAME}[?polymorphic=true]</code>
+
|}
+
 
+
'''Instances Collection'''
+
 
+
{| class="wikitable"
+
! Operation || HTTP Method || URL
+
|-
+
| List || GET || <code>/instances/{TYPE_NAME}[?polymorphic=true]</code>
+
|-
+
| Create || PUT || <code>/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Exists || GET || <code>/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Read || GET || <code>/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Update || PUT || <code>/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Delete || DELETE || <code>/instances/{TYPE_NAME}/{UUID}</code>
+
|}
+
 
+
 
+
'''Instances Sharing Collection'''
+
 
+
{| class="wikitable"
+
! Operation || HTTP Method || URL
+
|-
+
| Get Instance Contexts || GET || <code>/sharing/{TYPE_NAME}/{UUID}/contexts</code>
+
|-
+
| Add Instance To Context || PUT || <code>/sharing/{TYPE_NAME}/{UUID}/contexts/{CONTEXT_UUID}</code>
+
|-
+
| Remove Instance From Context || DELETE || <code>/sharing/{TYPE_NAME}/{UUID}/contexts/{CONTEXT_UUID}</code>
+
|}
+
 
+
 
+
'''Query & Access Collection'''
+
 
+
{| class="wikitable"
+
! Operation || HTTP Method || URL
+
|-
+
| List Contexts || GET || <code>/access/contexts</code>
+
|-
+
| Read Context || GET || <code>/access/contexts/{UUID}</code>
+
|-
+
| Read Type || GET || <code>/access/types/{TYPE_NAME}[?polymorphic=true]</code>
+
|-
+
| List Instances || GET || <code>/access/instances/{TYPE_NAME}[?polymorphic=true]</code>
+
|-
+
| Exists Instance || GET || <code>/access/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Read Instace || GET || <code>/access/instances/{TYPE_NAME}/{UUID}</code>
+
|-
+
| Get Instace Contexts || GET || <code>/access/instances/{TYPE_NAME}/{UUID}/contexts</code>
+
|-
+
| Query || GET || <code>/access/query?q=SELECT FROM EntityV&limit=20&fetchPlan=*:-1</code>
+
|-
+
| Prepared Query || GET || <code>/access/query/{RESOURCE_TYPE_NAME}/{RELATION_TYPE_NAME}/{ENTITY_TYPE_NAME}[?reference={REFERENCE_ENTITY_UUID}&polymorphic=true&direction=out]</code>
+
|-
+
|}
+
  
 
=== Resource Registry Context Client ===
 
=== Resource Registry Context Client ===
  
Resource Registry Schema is a java library providing RPC facilities to interact with [[Interacting_with_Resource_Registry_Service_-_Context_and_Schema_Port_Type#Context_Management|Context Management]] port type.
+
Resource Registry Schema is a java library providing RPC facilities to interact with [[Resource Registry Service - Context Management|Context Management]].
The library hides all the complexity of marshalling and unmarshalling of requests and result.  
+
The library hides all the complexity of marshalling and unmarshalling of requests and results.  
By using this library any client is able to manage java classes instead of json object.
+
By using this library any client is able to manage java classes instead of JSON objects.
  
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
Line 184: Line 111:
 
=== Resource Registry Schema Client ===
 
=== Resource Registry Schema Client ===
  
Resource Registry Schema is a java library providing RPC facilities to interact with [[Interacting_with_Resource_Registry_Service_-_Context_and_Schema_Port_Type#Schema_Management|Schema Management]] port type.
+
Resource Registry Schema is a java library providing RPC facilities to interact with [[Resource Registry Service - Type Management|Type Management]].
The library hides all the complexity of marshalling and unmarshalling of requests and result.  
+
The library hides all the complexity of marshalling and unmarshalling of requests and results.  
By using this library any client is able to manage java classes instead of json object.
+
By using this library any client is able to manage java classes instead of JSON objects.
  
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
Line 200: Line 127:
 
=== Resource Registry Publisher ===
 
=== Resource Registry Publisher ===
  
Resource Registry Publisher is a java library providing RPC facilities to interact with [[Interacting_with_Resource_Registry_Service_-_Entities_and_Relations_Management|ER Management]] port type.
+
Resource Registry Publisher is a java library providing RPC facilities to interact with [[Resource Registry Service - Instances Management | Instances Management]] and [[Resource Registry Service - Instances Sharing Management | Instances Sharing Management]].
The library hides all the complexity of marshalling and unmarshalling of requests and result.  
+
The library hides all the complexity of marshalling and unmarshalling of requests and results.  
By using this library any client is able to manage java classes instead of json object.
+
By using this library any client is able to manage java classes instead of JSON objects.
  
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
Line 211: Line 138:
 
<artifactId>resource-registry-publisher</artifactId>
 
<artifactId>resource-registry-publisher</artifactId>
 
<version>[4.0.0,5.0.0-SNAPSHOT)</version>
 
<version>[4.0.0,5.0.0-SNAPSHOT)</version>
 +
<dependency>
 +
</source>
 +
 +
 +
=== Resource Registry Query Template Client ===
 +
 +
Resource Registry Query Template Client is a java library providing RPC facilities to interact with [[Resource Registry Service - Query Templates Management | Query Templates Management]].
 +
 +
To use the Java library to interact with Query Template collection declare the following dependency in your pom.xml file.
 +
 +
<source lang="xml">
 +
<dependency>
 +
<groupId>org.gcube.information-system</groupId>
 +
<artifactId>resource-registry-query-template-client</artifactId>
 +
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
 
<dependency>
 
<dependency>
 
</source>
 
</source>
Line 216: Line 158:
 
=== Resource Registry Client ===
 
=== Resource Registry Client ===
  
Resource Registry Client is a java library providing RPC facilities to interact with [[Interacting_with_Resource_Registry_Service_-_Query_&_Access|Query & Access]] port type.
+
Resource Registry Client is a java library providing RPC facilities to interact with [[Resource Registry Service - Query & Access|Query & Access]].
The library hides all the complexity of marshalling and unmarshalling of requests and result.  
+
The library hides all the complexity of marshalling and unmarshalling of requests and results.  
By using this library any client is able to manage java classes instead of json object.
+
By using this library any client is able to manage java classes instead of JSON objects.
  
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.
 
To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.

Latest revision as of 17:16, 1 February 2022

The Resource Registry is the core component of the gCube Information System designed to support the operation of a hybrid cloud-based infrastructure:

  • To capture, transmit, store, retrieve and manipulate data from any software system enabled on the infrastructure
    • Location and properties
    • Status, load, exploitation usage, and accounting data
  • To provide access to information, organized to enable
    • Monitoring, validation, and reporting
    • Elasticity and pooling of resources
  • To support any software system to
    • Discover services and infrastructure resources

The Resource Registry - core of a SOA within the complexities of a hybrid cloud-based infrastructure – must enable

  • a set of resource management functions
    • enabling functions
      • publication, discovery
      • monitoring, deployment
      • contextualization, security, execution
    • data management functions
      • access, store
      • index, search
      • transfer, transform
  • plus, a set of applications
    • built against those functions
  • Resource types: abstract view over functions
    • defined by specifications
    • multiple implementations, over time / concurrently
  • different implementations, different information
    • system cannot globally define them
    • implementations produce/consume different facets, independently
  • resource semantics dynamic
    • no longer predefined in class hierarchies
    • implicitly captured by current facets
    • changes over time / across “similar” resources

Architecture

The constituent components are:

Resource Registry Service

Resource Registry Service is the key component of the Information System. It is a web service running on SmartGears responsible for storing information regarding the Infrastructure, in particular, the global and partial view of:

  • the resources (e.g. computing, storage, services, software, datasets);
  • their current status (e.g. up and running, available);
  • their relationships with other resources.
  • the policies governing their exploitation.

Resource Registry is developed only by using the concepts defined in the IS Model and it provides the capabilities to enrich its knowledge by creating new types of entities and relations and their schemas.

Resource Registry is capable of serving different applications domains (i.e. Context). To achieve this goal, the Resource Registry provides capabilities to manage Contexts (the contexts are hierarchical) and associate the entities and relations to one or more of the Contexts as requested by the different clients.

The Resource registry is also responsible for notifying any update or creation of any entity or relation to Information System Subscription Notification Service.

Maven coordinates are:

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry</artifactId>
	<version>[4.0.0,5.0.0-SNAPSHOT)</version>
<dependency>


To reach its goals Resource Registry offers 5 port types:

Every Port type is exposed as REST API.

Every REST API is JSON based. In other words, any content of an HTTP request is represented in JSON.

Resource Registry Context Client

Resource Registry Schema is a java library providing RPC facilities to interact with Context Management. The library hides all the complexity of marshalling and unmarshalling of requests and results. By using this library any client is able to manage java classes instead of JSON objects.

To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-context-client</artifactId>
	<version>[4.0.0,5.0.0-SNAPSHOT)</version>
<dependency>

Resource Registry Schema Client

Resource Registry Schema is a java library providing RPC facilities to interact with Type Management. The library hides all the complexity of marshalling and unmarshalling of requests and results. By using this library any client is able to manage java classes instead of JSON objects.

To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-schema-client</artifactId>
	<version>[4.0.0,5.0.0-SNAPSHOT)</version>
<dependency>

Resource Registry Publisher

Resource Registry Publisher is a java library providing RPC facilities to interact with Instances Management and Instances Sharing Management. The library hides all the complexity of marshalling and unmarshalling of requests and results. By using this library any client is able to manage java classes instead of JSON objects.

To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-publisher</artifactId>
	<version>[4.0.0,5.0.0-SNAPSHOT)</version>
<dependency>


Resource Registry Query Template Client

Resource Registry Query Template Client is a java library providing RPC facilities to interact with Query Templates Management.

To use the Java library to interact with Query Template collection declare the following dependency in your pom.xml file.

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-query-template-client</artifactId>
	<version>[1.0.0,2.0.0-SNAPSHOT)</version>
<dependency>

Resource Registry Client

Resource Registry Client is a java library providing RPC facilities to interact with Query & Access. The library hides all the complexity of marshalling and unmarshalling of requests and results. By using this library any client is able to manage java classes instead of JSON objects.

To use the Java library to interact with Context Collection declare the following dependency in your pom.xml file.

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-client</artifactId>
	<version>[4.0.0,5.0.0-SNAPSHOT)</version>
<dependency>