W3C

Cloud API

Use An API for Cloud Processing

Final Community Group Report 26 April 2013

Latest editor's draft:
http://www.sr2u.com/w3c/cloud-api-20130112.html

Editor:
Russell Potter

Table Of Contents

1. Introduction
2. the Model type
2.1 Model properties
3. the Client type
3.1 Client properties
4. The Service type
4.1 Service properties

1. Introduction

This document specifies an interface by which a cloud service may be programmatically engaged and for the programmatic specification, modification and execution of cloud tasks

This interface consists of the following types:

2. The Model type

A "Model" a, in a cloud processing context, is an abstract description of the executable content of a running Node

Programmatically, such Model content consists of a DOM Node, and manipulation of this content is accomplished by calls to the DOM manipulation methods

A Model is also augmented by several methods related to the operation on and execution of that Model The Web IDL [WREBIDL] declaration for the Model type is as follows:


[constructor(DOMString uri),
 constructor(Node node)]
interface Model : Node {

    int iterate(NamedItemList prms, optional int num);
    void execute(NamedItemList prms);
}


2.1. Model Properties

<constructor>(Node node)

Creates a Model object having the content defined by the Node given in "node" in the context object, the number of iterations of which is given in thenumparameter, using prms to represent the model execution parameters

<constructor>(DOMString url)

Creates a Model object having the content resulting by the from a resolution of the URL given in "url" parameter

iterate

Runs a user-defined iteration of the execution of the Model in the context object, the number of iterations of which is given in the "num", using prms to represent the Model execution parameters parameter

execute

Continuously executes the Model in the context object, using prms to represent the Model execution parameters . This method does not return the "num" parameter

3. The Client type

A Client object is any DOM Node capable of interacting with, by either querying its readiness, engaging with or specifying work, a cloud service


interface Client : Node {

    sequence<Service> query();
    int submit(Service svc, Model mdl, NamedItemList prms);
}


2.1. Client Properties

query

Returns a list of Service objects, each representing a cloud service "interested" in performing cloud tasks for the client

submit

Submits the Model given in the mdlparameter as representing a cloud task to be performed by the service given in the svc parameter

4. The Service type

The Service type represents a cloud service, and provides functionality related to the provision of such services, such as the interrogation of its charging regime



interface Service : Node {

    Node regime();
}

4.1. Service Properties

regime

Returns a DOM Node representing a RIF rule-base yielding, when executed, the charging regime of the service

References

[WEBIDL]
Cameron McCormackWeb IDL. 19 April 2012. W3C Candidate Recommendation. URL: http://www.w3.org/TR/webIDL/"