Skip to content

Service Delivery & Utility Manager

Nikos Kefalakis edited this page Nov 15, 2013 · 11 revisions

The Service Delivery & Utility Manager (see Figure Below) has (as its name indicates) a dual functionality. On the one hand (as a service manager), it is the module enabling data retrieval from the selected sensors comprising the OpenIoT service. On the other hand, the utility manager maintains and retrieves information structures regarding service usage and supports metering, charging and resource management processes. So the role of the SD&UM is to provide means for:

  • Executing and delivering the requested services,
  • Accessing and processing data streams from the cloud,
  • Taking into account processing instructions specified during the request formulation,
  • Keeping track of utility parameters associated with the service, for example:
    • Time the service is used,
    • Volume of data transmitted,
    • Number and type of sensors used,
  • Managing and maintaining utility data records.
  • Implementing accounting and billing schemes based on the utility data records.

[](Documentation/images/ArchitectureHighLevelWithoutSteps191112.jpg)

Supported Services

Service Delivery & Utility Manager supports the following functionalities:

  • Subscribe for a report: This service enables the user to invoke an already defined service from the “ServiceDescription” entity (Figure below). And by providing a destination address (URI) will instantiate a mechanism of delivering reports to the designated URI in the predefined user’s interval ( provided by the user at the “QueryControls” instance) by invoking the SD&UM’s Callback Service.
  • Callback service: This service is instantiated by the “Subscribe for a report” service and invoked based on the schedule defined by the user at the service registration time. If the query is executed normally, the callback service invokes the callback results service.
    • Callback results: By invoking the callback results the SD&UM will attempt to deliver results to the subscriber application. Get the subscribers for a service: This service enables the user to retrieve the list of applications (URIs) subscribed to a specific service.
  • Unsubscribe for a report: This service is invoked by the user and deactivates the “Subscribe for a report” service.
  • Poll for a report: This service enables the user to invoke an already defined service from the “serviceDescription” entity only once. The service invocation will produce a single result set. In case the query executes normally, the “Poll for a report” service invokes the callback results service.
  • Get the utility usage of a user: This service enables the user to retrieve the utility usage which involves a specific user. By providing the user’s ID the “Get the utility usage of a user” service retrieves the related services of the specific user from the “serviceDescription” entity. It then collects the usage history from the “utilityUsageHistory” entity and by using special utility usage algorithms and in relation with the policies applied for the provided services it returns the overall usage/cost of the platform for the selected user.
  • Get the utility usage of a registered service: This service enables the user to retrieve the utility usage related to a registered service. By providing the “serviceID” it collects the usage history from the “utilityUsageHistory” entity and by employing special utility usage algorithms, combined with the charging policies specified for the provided services it returns the usage/cost of the platform for the selected service.
  • Record utility usage of a service: This service is invoked from the “Callback service” and upon its invocation the volume of the requested data and the type of resources used are stored to the “utilityUsageHistory” entity for later use from the “Get the utility usage of a registered service” and the “Get the utility usage of a user” services.
  • Get service status: This service enables the user to retrieve the status of a specific service by providing the service ID. The registered service status service shall check the “serviceStatus” entity and send all the available information to the user.
  • Get service: This service is used to get the description of a registered service. This information is retrieved by accessing the “serviceDescription” entity.
  • Get the available services identification: This service provides the ability to a user to collect a list of registered services related with a specific user. These service IDs, names and descriptions are available from the “serviceDescription” entity.
  • Get user: This service is used by the OpenIoT platform’s access control mechanisms so as to retrieve a user’s information, access rights and restrictions in order to implement data filtering and access rights.
  • Get the available services: This service provides the ability to a user to collect all the defined requests/services of a specific user.

Note that to be able to invoke the “Subscribe for a report”, “Unsubscribe for a report”, “Poll for a report”, “Get the Subscribers for a Service”, “Get the Utility Usage of a User”, “Get Service”, “Get User”, “Get the available services” and “Get the available Services identification” services the user must first get logged-in to the system by authenticating with his/her ID. Moreover, the results provided to the user are prior filtered based on his/her account restrictions and the resources which are accessible based on his/her profile. The account restrictions data are provided by the “user” and the “accessControl” entities.

Main OpenIoT Modules and Entities

API Specifications

The current release of the OpenIoT Service Delivery & Utility Manager implements the functionalities/capabilities that are reflected in the interface listed below.

List of primitives comprising the OpenIoT SD&UM implemented API:

<<interface>>
SDUManagerInterface
---
pollForReport (applicationID: String): SdumServiceResultSet
getApplication(applicationID: String): OAMO
getService (serviceID: String): OSMO
getAvailableAppIDs (userID: String): DescriptiveIDs
getAvailableServiceIDs (applicationID: String): DescriptiveIDs
getUser (userID: String): OpenIotUser

The services description as long as their inputs and outputs are listed in the Table below.

Service Delivery & Utility Manager implemented API definition

Service Name Input Output Info
pollForReport String serviceID SdumServiceResultSet Invokes a previously defined Service having the specified applicationID. This call will produce only one Result Set.
getService String serviceID OSMO Used to retrieve the description (OSMO) of an available service. Requires as input a Service ID.
getApplication String applicationID OAMO Used to retrieve the description (OAMO) of an available Application. Requires as input an Application ID.
getAvailableAppIDs String userID DescriptiveIDs Used to retrieve the available applications (a list of applicationID/ServiceName/ServiceDescription triplet) already registered by a specific user. Requires as input a User ID.
getAvailableServiceIDs String serviceID DescriptiveIDs Used to retrieve the available services (a list of serviceID/ServiceName/ServiceDescription triplet) already registered by a specific user. Requires as input a Service ID.
getUser String userID OpenIotUser Used to retrieve the user’s information for implementing access control mechanisms.

Objects

OSDSpec

OpenIoT Service Description Specification

OSDSpec Schema graph

[](Documentation/images/Objects/OSDSpec_Schema_graph.jpg)

OSDSpec Schema

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" targetNamespace="urn:openiot:osdspec:xsd:1"
  xmlns:osd="urn:openiot:osdspec:xsd:1" xmlns:prt="http://www.w3.org/2007/SPARQL/protocol-types#">

  <xs:import namespace="http://www.w3.org/2007/SPARQL/protocol-types#"
    schemaLocation="sparql/protocol-types.xsd" />

  <xs:element name="OSDSpec">
    <xs:annotation>
      <xs:documentation>OpenIoT Service Description Specification
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="osd:OAMO" />
      </xs:sequence>
      <xs:attribute name="userID" use="required" type="xs:anyURI" />
    </xs:complexType>
  </xs:element>

  <xs:element name="OAMO">
    <xs:annotation>
      <xs:documentation>OpenIoT Application Model Object
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" ref="osd:description" />
        <xs:element minOccurs="0" maxOccurs="1" ref="osd:graphMeta" />
        <xs:element maxOccurs="unbounded" ref="osd:OSMO" />
      </xs:sequence>
      <xs:attribute name="id" use="optional" type="xs:anyURI" />
      <xs:attribute name="name" type="xs:NCName" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="graphMeta" type="xs:string" />
  <xs:element name="description" type="xs:string" />

  <xs:element name="OSMO">
    <xs:annotation>
      <xs:documentation>OpenIoT Sensor Model Object</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" ref="osd:description" />
        <xs:element ref="osd:queryControls" />
        <xs:element ref="osd:requestPresentation" />
        <xs:element ref="prt:query-request" />
        <xs:sequence>
          <xs:element maxOccurs="unbounded" minOccurs="0"
            ref="osd:dynamicAttrMaxValue" />
        </xs:sequence>
      </xs:sequence>
      <xs:attribute name="id" use="optional" type="xs:anyURI" />
      <xs:attribute name="name" type="xs:NCName" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="serviceID">
    <xs:complexType>
      <xs:sequence>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="serviceName">
    <xs:complexType>
      <xs:sequence>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="serviceDescription">
    <xs:complexType>
      <xs:sequence>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="queryControls">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="osd:QuerySchedule" />
        <xs:element name="trigger" type="xs:anyURI"
          minOccurs="0" />
        <xs:element name="initialRecordTime" type="xs:dateTime"
          minOccurs="0" />
        <xs:element name="reportIfEmpty" type="xs:boolean" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="QuerySchedule">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="second" type="xs:string" minOccurs="0" />
        <xs:element name="minute" type="xs:string" minOccurs="0" />
        <xs:element name="hour" type="xs:string" minOccurs="0" />
        <xs:element name="dayOfMonth" type="xs:string"
          minOccurs="0" />
        <xs:element name="month" type="xs:string" minOccurs="0" />
        <xs:element name="dayOfWeek" type="xs:string"
          minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="requestPresentation">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="osd:widget" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="widget">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="osd:presentationAttr" />
      </xs:sequence>
      <xs:attribute name="widgetID" use="required" type="xs:anyURI" />
    </xs:complexType>
  </xs:element>


  <xs:element name="presentationAttr">
    <xs:complexType>
      <xs:attribute name="name" use="required" type="xs:string" />
      <xs:attribute name="value" use="required" type="xs:string" />
    </xs:complexType>
  </xs:element>

  <xs:element name="dynamicAttrMaxValue">
    <xs:annotation>
      <xs:documentation>Maximum/Area of Interest for the defined dynamic
        value
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="name" use="required" type="xs:string" />
      <xs:attribute name="value" use="required" type="xs:string" />
    </xs:complexType>
</xs:element>
</xs:schema>
OSMO

OpenIoT Sensor Model Object

OSMO Schema graph

[](Documentation/images/Objects/OSMO_Schema_Graph.jpg)

The schema of OSMO is included in OSDSpec

SdumServiceResultSet

Service Delivery & Utility Manager Result Set

SdumServiceResultSet Schema graph

[](Documentation/images/Objects/SdumServiceResultSet_Schema_graph.jpg)

SdumServiceResultSet Schema

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" targetNamespace="urn:openiot:sdum:serviceresultset:xsd:1"
  xmlns:prt="http://www.w3.org/2007/SPARQL/protocol-types#" xmlns:srs="urn:openiot:sdum:serviceresultset:xsd:1">

  <xs:import namespace="http://www.w3.org/2007/SPARQL/protocol-types#"
    schemaLocation="sparql/protocol-types.xsd" />

  <xs:element name="SdumServiceResultSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="srs:requestPresentation" maxOccurs="1" />
        <xs:element ref="prt:query-result" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="requestPresentation">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="srs:widget" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="widget">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="srs:presentationAttr" />
      </xs:sequence>
      <xs:attribute name="widgetID" use="required" type="xs:anyURI" />
    </xs:complexType>
  </xs:element>

  <xs:element name="presentationAttr">
    <xs:complexType>
      <xs:attribute name="name" use="required" type="xs:string" />
      <xs:attribute name="value" use="required" type="xs:string" />
    </xs:complexType>
  </xs:element>
</xs:schema>

DescriptiveIDs

DescriptiveIDs Schema graph

[](Documentation/images/Objects/DescriptiveIDs_Schema_graph.jpg)

DescriptiveIDs Schema

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

  <xs:element name="DescreptiveIDs">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DescriptiveID" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
</xs:element>

  <xs:element name="DescriptiveID">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="description"
          type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="name"
          type="xs:NCName" />
      </xs:sequence>
      <xs:attribute name="id" type="xs:anyURI" />
    </xs:complexType>
</xs:element>
</xs:schema>

Clone this wiki locally