[OGSA-BES-WG] [VOTE] Refactoring Factory and Resource attributes

Christopher Smith csmith at platform.com
Thu Oct 19 13:05:39 CDT 2006


Ok ... this one will be more controversial. My vote is +1 of course. :-)

I propose refactoring the attributes elements as follows:

  <xsd:complexType name="BasicResourceAttributesDocumentType">
    <xsd:sequence>
      <xsd:element name="OperatingSystem" type="jsdl:OperatingSystem_Type"
      minOccurs="0"/>
      <xsd:element name="CPUArchitecture" type="jsdl:CPUArchitecture_Type"
      minOccurs="0"/>
      <xsd:element name="CPUCount" type="xsd:unsignedInt"
      minOccurs="0"/>
      <xsd:element name="CPUSpeed" type="xsd:unsignedLong"
      minOccurs="0"/>
      <xsd:element name="PhysicalMemory" type="xsd:unsignedLong"
      minOccurs="0"/>
      <xsd:element name="VirtualMemory" type="xsd:unsignedLong"
        minOccurs="0"/>
      <xsd:any namespace="##other" processContents="lax"
          minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="FactoryAttributesDocumentType">
    <xsd:sequence>
      <xsd:element name="Resource"
              type="bes-factory:BasicResourceAttributesDocumentType"
              minOccurs="1" maxOccurs="unbounded"/>
      <xsd:element name="IsAcceptingNewActivities"
              type="xsd:boolean" minOccurs="1" maxOccurs ="1"/>
      <xsd:element name="CommonName" type="xsd:string"
              minOccurs="0" maxOccurs ="1"/>
      <xsd:element name="LongDescription" type="xsd:string"
              minOccurs="0" maxOccurs ="1"/>
      <xsd:element name="TotalNumberOfActivities"
              type="xsd:unsignedInt" minOccurs="1" maxOccurs ="1"/>
      <xsd:element name="LocalResourceManagerType"
                    type="xsd:QName"/>
      <xsd:element name="ActivityReference"
                    type="wsa:EndpointReferenceType"
              minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="ContainedResourceAttributes"
              type="xsd:anyType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="NamingProfile"
              type="xsd:QName" minOccurs="1" maxOccurs ="1"/>
      <xsd:any namespace="##other" processContents="lax"
              minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>


Here are the benefits:

1. get rid of the double 'xsd:any' due to the previous extension

2. allow a BES Factory to return information about multiple resources
available to run activities. In the case where a BES is (say) fork/exec, it
can just have one Resource element.

Possible refinement:

- make the Resource element a "choice" between a
ResourceAttributesDocumentType and a FactoryAttributesDocumentType so that a
resource can either be a "basic" resource, or it can be another BES factory.

<xsd:complexType name="ResourceType">
  <xsd:choice>
    <xsd:element name="BasicResource" type="..."/>
    <xsd:element name="FactoryResource" type="..."/>
  </xsd:choice>
</xsd:complexType>

And then the Resource element in the FactoryAttributes is of type
ResourceType.


-- Chris



More information about the ogsa-bes-wg mailing list