summaryrefslogtreecommitdiff
path: root/TAO/CIAO/docs/schema/ServerResourceUsage.txt
blob: 1300110babb5cb541f1ff3c07050da088af10228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
                  How to use CIAOServerResources.xsd

Assuming we store two CIAO:ServerResources documents in two XML files
called "RTLinuxServerConfig.xml" and "RTwIN32ServerConfig.xml"
respectively.  We will specify their IDs in a DeploymentPlan via
infoProperfy with the equivalent of the following struct:

   struct CIAOServerResourcesRef
   {
     string resourceId;
     string filename;
   };

So, the DeploymentPlan should look something like:

   <infoProperty>
     <name>CIAOServerResourceRef</name>
     <value>
        <type>
          <kind>tk_struct</kind> <!-- I don't know how to specify the
                                      type of CIAO:ServerResourceRef
                                      struct here -->
        </type>
        <value>
          <name>resourceId</name>
          <value>
            <type>tk_tring</type>
            <value>RTConfig4LinuxBox</value>  <!-- Component instances
                                                   will refer to this
                                                   name to specify 
                                                   required server
                                                   config -->
          </value>
          <name>filename</name>
          <value>
            <type>tk_tring</type>
            <value>RTLinuxServerConfig.xml</value>
          </value>
        </value>
     </value>

     <name>CIAOServerResourceRef</name>
     <value>
        <type>
          <kind>tk_struct</kind> <!-- I don't know how to specify the
                                      type of CIAO:ServerResourceRef
                                      struct here -->
        </type>
        <value>
          <name>resourceId</name>
          <value>
            <type>tk_tring</type>
            <value>RTConfig4Win32Box</value>  <!-- Component instances
                                                   will refer to this
                                                   name to specify 
                                                   required server
                                                   config -->
          </value>
          <name>filename</name>
          <value>
            <type>tk_tring</type>
            <value>RTWin32ServerConfig.xml</value>
          </value>
        </value>
     </value>
   </infoProperty>

We can now use the policy sets defined in the XML documents to
instantiate components.  A component instance in deployment plan can
specify the policies it wishes to be instantiated with.  To use this
feature, one need to specify both the resouceID and the ID for the
policySet as following:

   <deploymentplan>
     ....
     <instance ...>

     
       <deployedResource>
         <resourceUsage>InstanceUsesResource</resourceUsage>
         <requirementName>CIAO:PolicySet</requirementName>
         <resourceName>here_we_insert_the_CIAO:PolicySet_ID</resourcename>
         <resourceValue>
           <type>tk_null</type>
           <value></value>
         </resourceValue>
       </deployedResource>

       <deployedResource>
         <resourceUsage>InstanceUsesResource</resourceUsage>
         <requirementName>CIAO:ServerResources</requirementName>
         <resourceName>here_we_insert_the_CIAO:ServerResources_ID
         defined in infoProperty</resourcename>
         <resourceValue>
           <type>tk_null</type>
           <value></value>
         </resourceValue>
       </deployedResource>

     </instance>
   </deploymentplan>
  
If only ID of CIAO:ServerResources is specified, we are using it as a
collocation constraint.  I.e., if two instances are deployed to the
same target node with different ServerResources IDs, DAnCE should
create two differnet NodeApplication on the same node.

Likewise, specifying different CIAO:PolicySet IDs will force component
instances to be deployed into different containers (if they have the
same target node and ServerResource ID.)