Difference between revisions of "Resource Model (2nd generation)"

From Gcube Wiki
Jump to: navigation, search
(Glossary)
(Glossary)
Line 188: Line 188:
 
→ '''resource facet''': information that, at any point in time, implementation components have independently attached to the resource in order to manage it
 
→ '''resource facet''': information that, at any point in time, implementation components have independently attached to the resource in order to manage it
  
→ '''resource keeper''': a producer operating non-interactively, which synthesizes resource descriptions from configuration files and invokes a set of delegates to distribute the task of description building
+
→ '''resource keeper''': a non-interactive producer which synthesizes resource descriptions from configuration files and invokes a set of delegates to distribute the task of description building
  
 
→ '''resource semantics''': the collection of its current facets
 
→ '''resource semantics''': the collection of its current facets
  
 
→ '''type interfaces''': interfaces common to all resources of a given resource type/subtype
 
→ '''type interfaces''': interfaces common to all resources of a given resource type/subtype

Revision as of 20:40, 2 June 2012

Introduction

At its core, the system provides a set of management functions over broad classes of computational resources. Functions include:

  • lifetime management
  • deployment
  • monitoring
  • reporting
  • security
  • and process execution.

Resources include:

  • software services
  • the hardware on which the services run
  • and the data the services produce and consume.

Each management function targets one or more resource classes. Its implementation encompasses one or more components that consume or produce information about resources in the target classes.

The system defines a descriptive resource model that regulates the representation and exchange of this information and, based on the model, offers directory services that allow components to publish it and discover it. This documents overviews the resource model adopted by the latest version of the system and the new vision of resource management which underlies its design.

Figure 1

Rationale and Overview

Previous Resource Model's View

At its inception, the system took a fairly static view over its management functions and equated them with their latest implementations. Resource classes were thus pre-defined and the model of resources within each class was centrally and fully prescribed. It simply collected the information required or produced by all the functions defined over that class. Semantic variations within classes were modelled with hierarchies, insofar as the variations could be anticipated. Classes and subclasses had their own XML bindings, the bindings were defined by schemas, and the schemas were used to validate the publication and discovery of resource descriptions.

Since changing the models had an endemic impact within the system, the schemas evolved to become less strict and a distinguished class of “generic” resources was defined to accommodate descriptions that could not be retrofitted within existing hierarchies. The system evolved within this scheme, occasionally acquiring new management functions and, far more commonly, refining the implementation of existing functions. The catch-all class of generic resources grew beyond initial expectations.

New Resource Framework

Starting from this version of the resource model, the system takes a more modular and abstract view over its management functions. Functions are described solely by their APIs, and different implementations of the same functions may exist within the system, over time or even concurrently. As different implementations may require different information about resources, the system no longer prescribes concrete resource models for them. Rather, implementations are responsible for defining the resource descriptions that they require or produce, and for binding that information to XML.

With this approach, the semantics of a resource is not found within class hierarchies. Rather, it is carried implicitly by the information that, at any point in time, implementation components have independently attached to the resource in order to manage it. Each such piece of information is a resource facet, and the semantics of a resource at any point in time is the collection of its current facets. The system remains responsible for defining the framework in which arbitrary facets may be collated into completed resource descriptions. This framework yields the facet layer of the new resource model of the system.

Figure 2

Of course, consumers often raise overlapping requirements on the information that describes resources. Requirements may converge around resources of a given type, or subtypes thereof. In some cases, they may converge across resource types and along functions. Some requirements may apply indiscriminately to all resources managed by the system. It is undesirable to replicate information required by unrelated consumers within different, independently produced facets. Equally, it is undesirable to create unnecessary dependencies between unrelated publishers and consumers, i.e. expect the latter to access facets defined by the former. Converging modelling requirements are best addressed by sharing information within standard facets. These facets serve as information-oriented interfaces for resources, whereby the resources may be discovered and their models consumed for management purposes. The information that comprises interfaces is public within the system, while the rest remains private to a set of related publishers and consumers.

The facet layer of the new resource model does not address standardisation issues beyond the definition of a small set of common properties shared by all resource descriptions. Rather, it leaves the standardisation of facets to multi-party agreements of varying scope. System-wide agreements define interfaces common to all resources of a given resource type/subtype (type interfaces). Function-wide agreements define interfaces common to all the implementations of a given function (function interfaces).

Collectively, the interfaces identify a higher and evolving layer of the model, the interface layer. The flexibility of the facet layer underneath allows resources to have multiple interfaces, as well as to acquire interfaces over time.

Figure 3

Resources

All resources managed by the system are described by the following properties:

  • a unique identifier;
the identifier of a resource allows system components to unambiguously separate it from other resources and to resolve references to the resource included in the description of other resources. Accordingly, the model requires its uniqueness and immutability but does not otherwise mandate a concrete syntax for it. Implementations will ensure that resource identifiers can be embedded in URIs (through escaping of characters forbidden by RFC 2396) and will offer guarantees for their immutability and global uniqueness.
  • an optional name;
the name of a resource serves solely for reporting purposes. The model does not mandate a syntax for it and allows it to change over time.
  • an optional description;
the description of a resource serves solely for reporting purposes. The mode does not mandate a syntax for it and allows it to change over time.
  • one or more scopes;
the scopes of a resource limit access to the resource and visibility of its description to clients that operate in one of the scopes. The syntax of scopes is defined outside the model, as it is the responsibility for enforcing scopes. Scopes may added to or removed from resources over time
  • one more facets;
facets are uniquely named but the model does not constrain a-priori their structure and content. Constraints on particular facets are introduced in the interface layer of the model. Facets may be added to or removed from resources over time.

Bindings

Resources serialize as XML documents rooted in a resource element with at least an id attribute for the resource identifier, name, description, and a list of one or more scope elements nest inside the document root in that order and before facet serializations. All have simple, non-empty content and the content of name can be qualified with an arbitrary namespace. All the elements and attributes are defined in the namespace http://gcube-system.org/namespaces/common/resource, except for facets which may be named in any namespace, as long as one such namespace exists. Facets may be simple or complex elements, though they cannot mix elements and text nor include XML structures other than elements.

Formally, XML serializations of resources must validate against the following XML Schema:

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://gcube-system.org/namespaces/common/resource"
 xmlns:tns="http://gcube-system.org/namespaces/common/resource" elementFormDefault="qualified">
 
<element name="resource" type="tns:defaultResource" />
<complexType name="defaultResource">!
 <sequence>
    <element name="name" type="tns:nonemptyname" minOccurs="0" />
    <element name="description" type="tns:nonempty" minOccurs="0" />
    <element name="scope" type="tns:nonempty" maxOccurs="unbounded"/>
    <any processContents="lax" namespace="##other" maxOccurs="unbounded" />
 </sequence>
 <attribute name="id" type="string" />
 <anyAttribute processContents="lax"/>
</complexType>
 
<simpleType name="nonempty">
 <restriction base="string">
   <minLength value="1" />
   <pattern value=".*[^\s].*" />
 </restriction>
</simpleType>
 
<simpleType name="nonemptyname">
 <restriction base="QName">
   <minLength value="1" />
   <pattern value=".*[^\s].*" />
 </restriction>
</simpleType>
</schema>

Note that the schema lacks the expressiveness to capture all the constraints defined by the model (unique naming and content model enforcement for facets).

Type Interfaces

The model defines a number of type interfaces that standardize the properties common to broad classes of managed resources.

Hardware

@TODO definition and binding

  • hosting nodes
  • external nodes

Software

@TODO definition and binding

  • system services (current and future)
  • external services (e.g. web-applications)
  • clients (current and future)
  • system libraries (current and future)

Service Endpoints

@TODO definition and binding

  • endpoint of system services (current and future);
  • endpoint of external services (web-app, RDBMS, apps);

Service Instances

@TODO definition and binding

  • mostly instances of stateful system services (current and future);

Data Sources

@TODO definition and binding

Implementation Requirements

The model is fully defined by its facet and interface layers and does not address issues related to the implementation of its primitives, or to the design of local or remote APIs that allow producers and consumers to publish or discover resource descriptions.

Figure 4

Equally, the model is purely descriptive and does not address lifetime issues. From the perspective of the model, the lifetime of resources begins when their descriptions are first published within the system and it terminates when those descriptions are removed from the system. An arbitrary number of independently developed and functionally unrelated components may be involved in the creation, manipulation, and retrieval of resource descriptions during their lifetime.

However, the model raises implicit requirements against those implementations and APIs, as well as against the architecture of the components that manage the lifetime of resource descriptions. Namely, the model requires an overall alignment with the modularity that characterises its facet layer.

Thus object models will be cast in terms of untyped facets, publication APIs will allow arbitrary modification of untyped facets, and discovery APIs will retrieve resources based on characterisations of untyped facets. The facets standardised in the interface layer, and the private facets defined outside the model, will be defined separately from those object models and APIs, as typed views over untyped facets. These types views will be introduced by the components that are responsible for their definition.

Figure 5

Components that manage the lifetime of resource descriptions will support an equally modular approach. A subset of producers, in particular, will be responsible for creating resource descriptions as these are first published in the system. Some of these resource builders will present interactive interfaces to privileged users, who will provide the models. Others will operate non-interactively, synthesising resource descriptions from configuration files. These resource keepers will not centralize the task of description building, but distribute it modularly across a set of delegates, each of which is independently developed to create given facets of the descriptions. Keepers will be responsible for dynamically discovering the delegates which are available on the hosting node, for coordinating them through the task, and for publishing the resulting resource descriptions. Individual delegates may produce interfaces or private facets which are private to specific implementation of system functions.

Figure 6

Glossary

common properties: a set of basic information defined in the facet layer and shared by all resource descriptions

delegate: a producer invoked by a resource keeper developed to create given facets of the descriptions

facet layer: the framework in which arbitrary facets may be collated into completed resource descriptions

function interfaces: interfaces common to all the implementations of a given function

interface layer: the ever-evolving set of interfaces (type and function) defined on top of the facet layer

resource: hardware, software or data source exploited within the Data e-Infrastructure

resource builder: a producer presenting an interactive interface to privileged users responsible for creating resource descriptions

resource facet: information that, at any point in time, implementation components have independently attached to the resource in order to manage it

resource keeper: a non-interactive producer which synthesizes resource descriptions from configuration files and invokes a set of delegates to distribute the task of description building

resource semantics: the collection of its current facets

type interfaces: interfaces common to all resources of a given resource type/subtype