% $Id: policy.tex 4516 2006-11-28 21:46:10Z nanbor $


\subsection{Providing Mechanisms to Configure Application QoS Settings}
\label{sec:policy}

%% This is not quite in the conventional contex-problem-solution
%% format.    I will try to embedded these tags in comments instead. -nw

\paragraph*{Context:}
Challenge 3 in Section~\ref{sec:mw-challenges} motivates the need to
configure low-level network QoS setting in component-based
applications.  In order to enhance application components'
reusability, it is important to separate QoS provisioning support from
components' application logic.  A policy framework will allow
component implementations to be installed and used under different
contexts by configuring component instances' QoS settings
transparently using the underlying middleware at runtime.

As discussed in Section~\ref{sec:NetQoSMDE} and
Section~\ref{sec:resource_reserve}, the modeling tools allow the
developers to specify the bandwidth requirements for various
components, including only forward or reverse bandwidth or both.  The
RACE network allocator makes the network resource allocation
decisions as QoS settings (DSCP markings) for various component connections.
The components need to be configured with these QoS settings at deployment
time at various deployment locations of a DRE system.

\paragraph*{Problem:}
QoS-enabled component middleware, such as CIAO and DAnCE, can be
extended to support configuring QoS-related policies of component
instances via XML deployment descriptors.  As shown in our
RT-CCM work~\cite{Schmidt:04w}, components in a real-time application
can be configured to run with different execution priorities by simply
modifying the extended XML deployment descriptors.  
Such CCM extensions depend on applying various 
RT-CORBA~\cite{RTCorba:02} policies.
Unfortunately, there is currently no standard CORBA policy for configuring
the ORB protocols to set DSCP markings while either invoking a request or 
replying to a client. Furthermore, the existing CIAO RT-CCM 
extensions only support configuration of 
server-side policies. 

\paragraph*{Solution Approach: CIAO Network QoS Policy Framework.}
The address these limitations, we first need to extend CORBA
policies~\cite{Schmidt:99cc} to support network QoS configurations, 
and to extend CIAO's RT extensions to support these new network policies.
Similar to RT-CORBA's priority models, the actual network QoS can be configured
on either the client-side or server-side depending on the usage
scenarios.  For example, some of the components may dictate how they
answer queries, and hence they define the bandwidth requirements at which
they receive and service requests, and clients using those services need
to obtain that utilization information, before making requests.
We have extended TAO, our CORBA implementation,
to support the following network QoS policy models:
\begin{itemize}
\item {\bf Client propagated network policy}, which allows clients
to declare their forward and reverse bandwidth requirements by setting
their DSCP markings.  Server will honor the client-specified reverse
bandwidth requirements by using the DSCP markings when sending the
replies back to clients.
\item {\bf Server declared network policy}, which allows servers to declare
their forward and reverse bandwidth capabilities by setting their DSCP
marking.  Clients will honor the server-declared policy by using the
DSCP markings when sending the invocation requests to servers.
\end{itemize}
CIAO's policy configuration extension to standard deployment
descriptors~\cite{DandC:03} has also been enhanced to parse and set
these extended network policies that RACE resource allocator
generates.  

\iffalse
%% Jai I added some of the points here in the text.  I think the rest
%% have been covered in the text already, albeit very briefly or
%% implicitly.  -nw 
We defined extensions to the standard deployment
descriptors~\cite{DandC:03} to associate these policies
for each component instance depending on whether the client
or the server initiates the QoS.
RACE's network resource
allocator describes the various DSCP markings using 
such policies and associates them with each component
instance in the deployment descriptors.  We modified
the DAnCE~\cite{Schmidt:05y} framework to parse the
new deployment descriptors, figure out the policies associated with
each component instance, and automatically invoke the code (previously
manually written) needed to inform the underlying middleware
(defining policies) to apply the policies, when a component
makes or receives an invocation. 
\fi

%\begin{floatingfigure}{0.6\columnwidth}
\begin{wrapfigure}{r}{0.6\columnwidth}
%\begin{figure}[htb]
  \centering
  \includegraphics[width=0.6\columnwidth]{figs/policy-framework}
  \caption{CIAO Network QoS Policy Framework}
  \label{fig:ciao-policy}
%\end{figure}
\end{wrapfigure}
%\end{floatingfigure}

Furthermore, to accomodate different usage scenarios, CIAO need to
support configuration of both server-side and client-side policies.
Client-side policies are applied when a component invokes methods on
other services using policy override~\cite{Schmidt:99cc}. In order
for a client to override a server's network policy with its own
forward and reverse bandwidth requirements, client's own network
policies need to be applied on the object reference pointing
to the server. In component middleware, object references are shielded from components 
using the container programming model, and are provided to components
using the {\bf Context} objects, which are initialized with
possible values at deployment time, depending on the connections
a component could have.
As depicted in Figure~\ref{fig:ciao-policy}, to support configuring the client-side policies, 
we enhanced the the container programming
model to (1) keep track of the policies associated with each
component hosted within the container, (2) automatically
override the object references to reference the appropriate policies,
when a particular component wants to make a communication,
and (3) return the overridden object references to the components
using the {\bf Context} object.
