%
%  $Id$
%
%  Copyright (c) 2003-2004 RIACA, Technische Universiteit Eindhoven (TU/e).
%  All Rights Reserved.
%

\section{Architecture and Usage}

The first part of this section describes the architecture of the
Execution Manager in a general manner, while the second part is
devoted to the Execution Manager as a standalone web service.

\subsection{Architecture}

The architecture of the Execution Manager is described in
Figure~\ref{fig:arch-em} and shows how the Execution Manager
functionality ultimately exploits Jelly.  Jelly is a tool for turning
XML based scripting into executable Java code via a processing engine.
It has native support for an expression language, called Jexl, which
is a superset of the JSP, JSTL and JSF expression languages as well as
support for other pluggable expression languages like XPath via Jaxen,
JavaScript, beanshell and Jython.  Moreover, Jelly is completely
extendable via custom tags in a similar way to JSP custom tags.
  

\begin{figure}[htbp]
  \centering \includegraphics[scale=.75,angle=270]{internal}
  \caption{Execution Manager Architecture}
  \label{fig:arch-em}
\end{figure}


Execution of plans by the Execution Manager is done in two major
steps:

\begin{description}
  
\item[MPL Conversion]: convert the incoming plan written in MPL to a
  Jelly script using the XSLT stylesheet \texttt{mpl2jelly.xsl}
  included in this distribution. The stylesheet produces jelly scripts
  that wrap results and/or trace of the execution in the MONET
  mathematical explanation language (MEL) format.
\item[Jelly Execution]: execute the Jelly script obtained in the
  conversion step on the Jelly processing engine from
  \url{http://jakarta.apache.org/commons/jelly}. Return the resulting
  MEL document.
\end{description}

For the current implementation of the Execution Manager the Jelly
extension for calling a web service has been implemented in the
package \texttt{nl.tue.win.riaca.jelly.invoke} and is documented in
the appendix.

\subsection{Usage}

Although the Execution Manager is a component in the MONET
architecture intended to be called by the Client Manager, it can also
be used on its own via the web client included in this distribution. A
screenshot of this client interface is given in
Figure~\ref{fig:emclient}.

\begin{figure}[htbp]
  \centering
  \includegraphics[scale=.25]{webclient}  
  \caption{Execution Manager Client}
  \label{fig:emclient}
\end{figure}
