Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 383

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- Quality Of Service and Admin Properties</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/cosNotification-1.1.18.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>cosNotification</strong><br><strong>User's Guide</strong><br><small>Version 1.1.18</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p>
<ul class="flipMenu" imagepath="../../../../doc/js/flipmenu">
<li id="no" title="The cosNotification Application" expanded="false">The cosNotification Application<ul>
<li><a href="ch-contents.html">
              Top of chapter
            </a></li>
<li title="Content Overview"><a href="ch-contents.html#id63553">Content Overview</a></li>
<li title="Brief Description of the User's Guide"><a href="ch-contents.html#id57496">Brief Description of the User's Guide</a></li>
</ul>
</li>
<li id="no" title="Introduction to cosNotification" expanded="false">Introduction to cosNotification<ul>
<li><a href="ch_introduction.html">
              Top of chapter
            </a></li>
<li title="Overview"><a href="ch_introduction.html#id59810">Overview</a></li>
</ul>
</li>
<li id="no" title="Installing cosNotification" expanded="false">Installing cosNotification<ul>
<li><a href="ch-install.html">
              Top of chapter
            </a></li>
<li title="Installation Process "><a href="ch-install.html#id61483">Installation Process </a></li>
</ul>
</li>
<li id="no" title="The Notification Service Components" expanded="false">The Notification Service Components<ul>
<li><a href="ch_system.html">
              Top of chapter
            </a></li>
<li title="The Notification Service Components"><a href="ch_system.html#id62962">The Notification Service Components</a></li>
</ul>
</li>
<li id="no" title="Filters and the Constraint Language BNF" expanded="false">Filters and the Constraint Language BNF<ul>
<li><a href="ch_BNF.html">
              Top of chapter
            </a></li>
<li title="Filters and the Constraint Language BNF"><a href="ch_BNF.html#id64314">Filters and the Constraint Language BNF</a></li>
</ul>
</li>
<li id="loadscrollpos" title="Quality Of Service and Admin Properties" expanded="true">Quality Of Service and Admin Properties<ul>
<li><a href="ch_QoS.html">
              Top of chapter
            </a></li>
<li title="Quality Of Service and Admin Properties"><a href="ch_QoS.html#id65103">Quality Of Service and Admin Properties</a></li>
</ul>
</li>
<li id="no" title="cosNotification Examples" expanded="false">cosNotification Examples<ul>
<li><a href="ch_example.html">
              Top of chapter
            </a></li>
<li title="A Tutorial on How to Create a Simple Service"><a href="ch_example.html#id65997">A Tutorial on How to Create a Simple Service</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<h1>6 Quality Of Service and Admin Properties</h1>
  

  <h3><a name="id65103">6.1 
        Quality Of Service and Admin Properties</a></h3>
    
    <p>This chapter explains the allowed properties for 
      <span class="bold_code"><a href="CosNotification_QoSAdmin.html">CosNotification_QoSAdmin</a></span> and
      <span class="bold_code"><a href="CosNotification_AdminPropertiesAdmin.html">CosNotification_AdminPropertiesAdmin</a></span>.
      </p>

    <h4>Quality Of Service</h4>
      
      <p>The cosNotification application supports the following QoS settings:</p>
      <table border="1" cellpadding="2" cellspacing="0">
<tr>
          <td align="left" valign="middle"><strong>QoS</strong></td>
          <td align="left" valign="middle"><strong>Range</strong></td>
          <td align="left" valign="middle"><strong>Default</strong></td>
        </tr>
<tr>
          <td align="left" valign="middle">EventReliability</td>
          <td align="left" valign="middle">BestEffort/Persistent</td>
          <td align="left" valign="middle">BestEffort</td>
        </tr>
<tr>
          <td align="left" valign="middle">ConnectionReliability</td>
          <td align="left" valign="middle">BestEffort/Persistent</td>
          <td align="left" valign="middle">BestEffort</td>
        </tr>
<tr>
          <td align="left" valign="middle">Priority</td>
          <td align="left" valign="middle">+/-32767</td>
          <td align="left" valign="middle">0</td>
        </tr>
<tr>
          <td align="left" valign="middle">OrderPolicy</td>
          <td align="left" valign="middle">Any-, Fifo-, Priority- and Deadline-Order</td>
          <td align="left" valign="middle">PriorityOrder</td>
        </tr>
<tr>
          <td align="left" valign="middle">DiscardPolicy</td>
          <td align="left" valign="middle">RejectNewEvents, Any-, Fifo-, Lifo-, Priority- and Deadline-Order</td>
          <td align="left" valign="middle">RejectNewEvents</td>
        </tr>
<tr>
          <td align="left" valign="middle">MaximumBatchSize</td>
          <td align="left" valign="middle">long() &gt; 0</td>
          <td align="left" valign="middle">1</td>
        </tr>
<tr>
          <td align="left" valign="middle">PacingInterval</td>
          <td align="left" valign="middle">TimeBase::TimeT (see cosTime)</td>
          <td align="left" valign="middle">0</td>
        </tr>
<tr>
          <td align="left" valign="middle">StartTimeSupported</td>
          <td align="left" valign="middle">boolean</td>
          <td align="left" valign="middle">false</td>
        </tr>
<tr>
          <td align="left" valign="middle">StopTimeSupported</td>
          <td align="left" valign="middle">boolean</td>
          <td align="left" valign="middle">false</td>
        </tr>
<tr>
          <td align="left" valign="middle">MaxEventsPerConsumer</td>
          <td align="left" valign="middle">long() &gt; 0</td>
          <td align="left" valign="middle">100</td>
        </tr>
<tr>
          <td align="left" valign="middle">Timeout</td>
          <td align="left" valign="middle">TimeBase::TimeT (see cosTime)</td>
          <td align="left" valign="middle">No timeout</td>
        </tr>
</table>
<em>Table
        6.1:
         
        Table 1: Supported QoS Settings</em>
      <br>
      <br>
      <br>
      <br>
      <p><strong>Comments on the table 'Supported QoS Settings':</strong></p>
      <dl>
        <dt><strong><strong>EventReliability</strong></strong></dt>
        <dd>To allow full Persistent EventReliability, every event must
         be stored in a stable storage which would create a relatively
         huge overhead. Hence, only lightweight version of the Persistent 
         QoS is supported. The configuration parameters <span class="code">max_events</span>,
        <span class="code">interval_events</span> and <span class="code">timeout_events</span> determine
         the behavior of this setting.</dd>
        <dt><strong><strong>ConnectionReliability</strong></strong></dt>
        <dd>If this QoS is set to BestEffort and a client object returns anything
         other than <span class="code">ok</span> to its associated Proxy, the Proxy will discard
         all events and terminate. Using Persistent and anything other than <span class="code">ok</span> 
         is returned, events will be dropped but the proxy will retry later when
         next delivery is due. A child may not have Persistent while its parent
         has BestEffort QoS set, e.g., Proxy vs. Admin. If <span class="code">OBJECT_NOT_EXIST</span>,
        <span class="code">NO_PERMISSION</span> or <span class="code">CosEventComm_Disconnected</span> is thrown,
         the associated object will terminate even if this parameter is
         set to Persistent.</dd>
        <dt><strong><strong>Priority</strong></strong></dt>
        <dd>This QoS will treat all events as if they have the Priority equal to
         current value, unless the event itself contains a Priority setting, 
         this event will be treated accordingly. Note: for this property to
         have any effect, the DiscardPolicy and/or OrderPolicy must be set
         to PriorityOrder.</dd>
        <dt><strong><strong>OrderPolicy</strong></strong></dt>
        <dd>If set to PriorityOrder, events with the highest Priority will be
         delivered first. Deadline order will forward events with shortest
         expiry time first. If two events have the same priority, they will be
         delivered in FIFO-order.</dd>
        <dt><strong><strong>DiscardPolicy</strong></strong></dt>
        <dd>If set to PriorityOrder and MaxEventsPerConsumer limit is 
         reached, events
         with the lowest Priority will be discarded first. Deadline order will
         discard events with shortest expiry time first.</dd>
        <dt><strong><strong>MaximumBatchSize</strong></strong></dt>
        <dd>Only valid if the object is supposed to handle a sequence of structured
         events and determines the largest amount of events that may be passed
         each time.</dd>
        <dt><strong><strong>PacingInterval</strong></strong></dt>
        <dd>Determines how long an object will wait before forwarding a structured 
         event sequence of length equal to, or less than MaximumBatchSize.
         If set to 0, which is the default behavior, no timeout is used and
         the events are forwarded when the MaximumBatchSize is reached.</dd>
        <dt><strong><strong>StartTimeSupported</strong></strong></dt>
        <dd>If set to true events which contains the QoS Property <span class="code">StartTime</span> 
         (TimeBase::UtcT - absolute time) will not be delivered until the 
         StartTime value have been exceeded. See also the <span class="code">cosTime</span> application.</dd>
        <dt><strong><strong>StopTimeSupported</strong></strong></dt>
        <dd>If set to true, events which contain the QoS Properties <span class="code">StopTime</span>
         (TimeBase::UtcT - absolute time) or <span class="code">Timeout</span> (TimeBase::TimeT - 
         relative time) will be discarded if the object has not been able to
         deliver the event in time. See also the <span class="code">cosTime</span> application.</dd>
        <dt><strong><strong>MaxEventsPerConsumer</strong></strong></dt>
        <dd>The maximum number of events the associated object may store before discarding
         events in the way described by the DiscardPolicy.</dd>
        <dt><strong><strong>Timeout</strong></strong></dt>
        <dd>If this QoS property is not included in the event, and the Property
        <span class="code">StopTimeSupported</span> equals true, this setting will be applied
         if events cannot be delivered within its time limit.</dd>
      </dl>
      <div class="warning">
<div class="label">Warning</div>
<div class="content"><p>
        <p>Several of the above QoS Properties can be changed during run-time but we strongly advice
          not to since, if a relatively large amount of events are waiting for delivery, some of the
          QoS settings would require a total reorder of the events. The QoS property <span class="code">ConnectioReliability</span>
          may <strong>never</strong> be updated during run-time since it may cause deadlock. Run-time, in this case,
          means activating the Channel by sending the first event.</p>
      </p></div>
</div>
    

    <h4>Setting Quality Of Service</h4>
      
      <p>Assume we have a Consumer Admin object which we want to change
        the current Quality of Service. Typical usage:</p>
      <div class="example"><pre>
QoSPersistent = 
   [#'CosNotification_Property'
    {name='CosNotification':'ConnectionReliability'(), 
     value=any:create(orber_tc:short(), 
     'CosNotification':'Persistent'())}],
'CosNotification_QoSAdmin':set_qos(Ch, QoSPersistent),
      </pre></div>
      <p>If it is not possible to set the requested QoS the <span class="code">UnsupportedQoS</span>
        exception is raised, which includes a sequence of <span class="code">PropertyError</span>'s
        describing which QoS, possible range and why is not allowed. The error
        codes are:</p>
      <ul>
        <li>UNSUPPORTED_PROPERTY - QoS not supported for this type of target object.</li>
        <li>UNAVAILABLE_PROPERTY - due to current QoS settings the given property
         is not allowed.</li>
        <li>UNSUPPORTED_VALUE - property value out of range; valid range is returned.</li>
        <li>UNAVAILABLE_VALUE - due to current QoS settings the given value is
         not allowed; valid range is returned.</li>
        <li>BAD_PROPERTY - unrecognized property.</li>
        <li>BAD_TYPE - type of supplied property is incorrect.</li>
        <li>BAD_VALUE - illegal value.</li>
      </ul>
      <p>The CosNotification_QoSAdmin interface also supports an operation
        called <span class="code">validate_qos/2</span>. The purpose of this operations is to check
        if a QoS setting is supported by the target object and if so, the operation
        returns additional properties which could be optionally added as well.</p>
    

    <h4>Admin Properties</h4>
      
      <p>The cosNotification application supports the following Admin Properties:</p>
      <table border="1" cellpadding="2" cellspacing="0">
<tr>
          <td align="left" valign="middle"><strong>Property</strong></td>
          <td align="left" valign="middle"><strong>Range</strong></td>
          <td align="left" valign="middle"><strong>Default</strong></td>
        </tr>
<tr>
          <td align="left" valign="middle">MaxQueueLength</td>
          <td align="left" valign="middle">0</td>
          <td align="left" valign="middle">0</td>
        </tr>
<tr>
          <td align="left" valign="middle">MaxConsumers</td>
          <td align="left" valign="middle">long() &gt;= 0</td>
          <td align="left" valign="middle">0</td>
        </tr>
<tr>
          <td align="left" valign="middle">MaxSuppliers</td>
          <td align="left" valign="middle">long() &gt;= 0</td>
          <td align="left" valign="middle">0</td>
        </tr>
</table>
<em>Table
        6.2:
         
        Table 2: Supported Admin Properties</em>
      <p>According to the OMG specification the default values for Admin Properties
        is supposed to be <span class="code">0</span>, which means that no limit applies to these
        properties.</p>
      <div class="note">
<div class="label">Note</div>
<div class="content"><p>
        <p>Admin Properties can only be set on a Channel Object level, i.e.,
          they will not have an impact on any Admin or Proxy Objects. Currently,
          setting the Admin Property <span class="code">MaxQueueLength</span> have no effect since
          we cannot discard events accordingly to the Quality of Service Property
          <span class="code">DiscardPolicy</span>.</p>
      </p></div>
</div>
    
  
</div>
<div class="footer">
<hr>
<p>Copyright © 2000-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>