[occi-wg] Incorporating units into OCCI

Ian Stokes-Rees ijstokes at spmetric.com
Tue May 26 10:56:32 CDT 2009


I finished my PhD thesis on a RESTful model for grid computing a few 
years ago.  I did some work on formalizing XML-based descriptors, 
including units/scaling.  You may find that some of the material in 
Appendix B and C is useful:

http://crystal.harvard.edu/~ijstokes/thesis/RESTfulGrid-StokesRees-Thesis.pdf

I envisioned two options: i) units were specified in attributes on an 
element:

<memory type="GB"> 2 </memory>

ii) units were specified in-line and needed to be parsed:

<memory>  2 GB </memory>

At the time I felt that "type" provided a more generic modifier on a 
value than "units", and would allow things like:

<start type="USDate">5/21/2009</start>

or

<start type="EUDate">21/5/2009</start>

I provide 5 sets of "type" modifiers: time, frequency, metric, binary, 
transfer.  No rocket science, but perhaps providing an cut-down portion 
of the schemas will be helpful, so I include them below.

Ian

<xs:simpleType name="TimeTypeList">
<xs:enumeration value="fs"/>
<xs:enumeration value="ps"/>
<xs:enumeration value="ns"/>
<xs:enumeration value="us"/>
<xs:enumeration value="ms"/>
<xs:enumeration value="s"/>
<xs:enumeration value="sec"/>
<xs:enumeration value="second"/>
<xs:enumeration value="min"/>
<xs:enumeration value="minute"/>
<xs:enumeration value="h"/>
<xs:enumeration value="hr"/>
<xs:enumeration value="hour"/>
<xs:enumeration value="d"/>
<xs:enumeration value="day"/>
<xs:enumeration value="wk"/>
<xs:enumeration value="week"/>
<xs:enumeration value="mon"/>
<xs:enumeration value="month"/>
<xs:enumeration value="yr"/>
<xs:enumeration value="year"/>

<xs:simpleType name="MetricTypeList">
<xs:enumeration value="f"/>
<xs:enumeration value="p"/>
<xs:enumeration value="n"/>
<xs:enumeration value="u"/>
<xs:enumeration value="m"/>
<xs:enumeration value="K"/>
<xs:enumeration value="M"/>
<xs:enumeration value="G"/>
<xs:enumeration value="T"/>
<xs:enumeration value="P"/>

<xs:simpleType name="FrequencyTypeList">
<xs:enumeration value="Hz"/>
<xs:enumeration value="KHz"/>
<xs:enumeration value="MHz"/>
<xs:enumeration value="GHz"/>
<xs:enumeration value="THz"/>

<xs:simpleType name="BinaryTypeList">
<xs:enumeration value="B"/>
<xs:enumeration value="KB"/>
<xs:enumeration value="MB"/>
<xs:enumeration value="GB"/>
<xs:enumeration value="TB"/>
<xs:enumeration value="PB"/>

<xs:simpleType name="TransferTypeList">
<xs:enumeration value="Kb/s"/>
<xs:enumeration value="Mb/s"/>
<xs:enumeration value="Gb/s"/>
<xs:enumeration value="Tb/s"/>
<xs:enumeration value="Pb/s"/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/occi-wg/attachments/20090526/57b2cb26/attachment.html 


More information about the occi-wg mailing list