Previous page

Next page

Locate page in Contents

Print this page

Getting Resources Usage Report

Monitoring usage of hosting resources is performed by platform itself, but hosting platform has no knowledge of an application internal resources. For example, Open-Xchange application has InfoStore module. This module allows application users to place some items for storage and share them with others. A storage comprises a number of folders each of them occupies some storage space. So, storage space is an application resource that usage can be reported by application. The other example of such resource can be a number of application users or mailboxes. A hosting provider may want to additionally charge a user for such resources usage.

The resources section of package metadata file may describe resources that usage is to be reported by application service instance. Resource definition may include unit of measure ("//resource[@class]" attribute) and setting that limits resource usage ("//resource[@limiting-setting]" attribute). For details, refer to the 5.2.6 Resources section of the Specification.

The information on resources usage is collected by resource script that is called by Controller. Application may provide the Controller with a hint how often it should run the script. This period is defined with the poll-interval attribute of the script.

The following issues are at discretion of implementer:

Getting resource usage operation with resource script implies that the Controller performs the following steps:

  1. Determine resource script interpreter. To determine resource script interpreter, the Controller reads from the package metadata the identifier of the script language (the value of the "//provision/resource-script/script-language" element). What interpreter must be used to run script written in a particular language is defined in the aspects, so the Controller must pass the identifier to the Aspects Parser. If the Aspects Parser supports the corresponding aspect, it returns the required interpreter information. Otherwise, the Controller must stop instantiating the application and roll back all the changes it has already done to the server.
  2. Run the script with the required interpreter. If the script interpreter is identified successfully, the Controller runs the resource script using the interpreter.
  3. Process the script output. The script returns report on resources usage that matches XML schema defined in the Specification. The Controller gets the output and processes it. The further script output processing is completely depends on a Controller implementation.

For details on resource script invocation and output structure, refer to the 5.3.4 Resource Script section of the Specification.

In This Section

Possible Scenario

See Also

Implementing Operations on Application Instances

Provisioning Application Instances

Removing Application Instances

Updating Application Instances

Configuring Application Instance

Enabling and Disabling Service

Application Data Retention

Please send us your feedback on this help page