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:
"//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.For details on resource script invocation and output structure, refer to the 5.3.4 Resource Script section of the Specification.