Skip to content

Commit

Permalink
splitted up Example
Browse files Browse the repository at this point in the history
  • Loading branch information
antongiacomo committed Nov 14, 2023
1 parent 8f25c5d commit f350297
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pipeline_instance.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
\section{Pipeline Instance}\label{sec:instance}
% \subsection{Instance}
% \hl{ANCHE QUA COME PER IL TEMPLATE PROVEREI A ESSERE UN POCO PIU' FORMALE. GUARDA IL PAPER CHE TI HO PASSATO.}
We define a pipeline instantiation technique as a function that takes as input a \pipelineTemplate \tChartFunction and a set $S^c$ of candidate services, one for each vertex \vi{i}$\in$\V, and returns as output a \pipelineInstance \iChartFunction.
%We recall that candidate services $S^c_i$ are candidate services satisfying data protection annotations \myLambda(\vi{i}), for each \vi{i}$\in$$\V_S$.
In \iChartFunction, every invocations \vii{i}$\in$$V'_S$ contains a service instance, and every branching $v\in\Vplus\bigcup\Vtimes$ in the template is maintained as is. We formally define our \pipelineInstance as follows.

\begin{definition}[Pipeline Instance]\label{def:instance}
Let \tChartFunction be a pipeline template, a pipeline Instance $\iChartFunction$ is a directed acyclic graph where:
\begin{enumerate*}[label=\roman*)]
\item $s_r$$=$$s'_r$,
\item for each vertex $\vi{}\in\V_{\timesOperator}\cup\V_{\plusOperator}$ it exists a corresponding vertex $\vii{}\in\Vp_{\timesOperator}\cup\Vp_{\plusOperator}$,
\item for each $\vi{i}$$\in$$\V_S$ annotated with policy \P{i} it exists a corresponding \vii{i}$\in$$\Vp_S$ instantiated with a service instance \sii{i},
\end{enumerate*}
and such that the following conditions hold:
\begin{enumerate}[label=\arabic*)]
\item $s'_i$ satisfies data protection annotation \myLambda(\vi{i}) in \tChartFunction.
\item $s'_i$ satisfies functional annotation \myGamma(\vi{i}) in \tChartFunction.
\end{enumerate}
\end{definition}

Condition 1 is needed to preserve the process functionality, as it simply states that each service \sii{i} must satisfy the functional requirements \F{i} of the corresponding vertex \vi{i} in the \pipelineTemplate.
Condition 2 states that each service \sii{i} must satisfy the policy requirements \P{i} of the corresponding vertex \vi{i} in the \pipelineTemplate.
We recall that Condition 1 is satisfied for all candidate services (see Section~\ref{sec:funcannotation}) and therefore concentrate on Condition 2 in the following.

The \pipelineInstance is generated by traversing the \pipelineTemplate with a breadth-first search algorithm, starting from the root vertex \vi{r}.
Then, for each vertex $v\in\Vplus\bigcup\Vtimes$ in the pipeline template, the corresponding vertex $v'\in\Vpplus\bigcup\Vptimes$ is generated.
Finally, for each vertex \vi{i}$\in$$\V_S$, a two-step selection approach is applied as follows.
\begin{itemize}

\item \textit{Filtering Algorithm} -- As already discussed in Section~\ref{sec:templatedefinition}, filtering algorithm retrieves a set of candidate services $S^c$ and match them one-by-one against data protection requirements \myLambda(\vi{i}). In particular, the profile of each candidate service \si{j} is matched against policies $p_k$$\in$\P{i} corresponding to \myLambda(\vi{i}). Filtering algorithm returns as output the set of compatible services that match the policy.

Formally, let us consider a set $S^c$ of candidate services \si{j}, each one having a profile as a set of attributes in the form (\emph{name}, \emph{value}). The filtering algorithm is executed for each \si{j}; it is successful if \si{j}'s profile satisfies at least one policy $p_k$$\in$\P{i}; otherwise, \si{j} is discarded and not considered for selection. The filtering algorithm finally returns a subset $S'\subseteq S^c$ of compatible services, among which the service instance is selected.

\item \textit{Comparison Algorithm} -- Upon retrieving a set $S'$ of compatible services \si{j}, it produces a ranking of these services according to some metrics that evaluates the quality loss introduced by each service when integrated in the pipeline instance. More details about the metrics are provided in Section \ref{sec:metrics}.
%Formally, compatible services \si{j}$\in$S' are ranked on the basis of a scoring function.
The best service $s'_i$ is then selected and integrated in $\vii{i}\in \Vp$. There are many ways of choosing relevant metrics, we present those used in this article in Section \ref{sec:metrics}.
\end{itemize}

When all vertices $\vi{i}\in V$ have been visited, G' contains a service instance $s'_i$ for each \vii{i}$\in$\Vp, and the \pipelineInstance is complete. We note that each vertex \vii{i} is annotated with policies $p_k$$\in$\P{i} according to \myLambda. When pipeline instance is triggered, before any services can be executed, policies in \P{i} are evaluated and enforced. In case policy evaluation returns \emph{true}, data transformation \TP$\in$\P{i} is applied, otherwise a default transformation that removes all data is applied.
59 changes: 59 additions & 0 deletions pipeline_instance_example.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

\begin{example}\label{ex:instance}

As an example, let us consider the pipeline template \tChartFunction in \cref{sec:example}.
It includes three key stages in our reference scenario: data anonymization (\vi{1}), data enrichment (\vi{2}), and data aggregation (\vi{3}), each stage with its policy $p$.

The first vertex (\vi{1}) responsible for data anonymization is associated with three candidate services that satisfy the functional requirements of the first vertex, namely $s_1$, $s_2$ and $s_3$.
Services $s_1$ and $s_2$ are annotated with a profile that satisfies the data protection requirements in \P{1}, respectively.
The third service $s_3$ is annotated with a profile that does not satisfy the data protection requirements in \P{1}.
The filtering algorithm then returns the set $S'=\{s_1,s_2\}$.
The comparison algorithm is fnally applied to $S'$ and returns a ranking of the services according to quality metrics, where $s_1$ is ranked first. $s_1$ is then selected and integrated in $\vii{1}\in \Vp$.

The comparison algorithm is finally applied to $S'$ and returns a ranking of the services according to quality metrics, where $s_1$ is ranked first. $s_1$ is then selected and integrated in $\vii{1}\in \Vp$.

The same logic is applied to the \vi{2} and \vi{3}.

\end{example}


% \begin{figure}[H]
% \centering

% \begin{tikzpicture}
% % Nodes
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node11) at (0,1.2) {Sx};
% \node[draw, circle, minimum size=1cm] (node1) at (0,0) {S1};
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node10) at (0,-1.2) {Sy};

% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node22) at (2,1.2) {Sx};
% \node[draw, circle, minimum size=1cm] (node2) at (2,0) {S2};
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node21) at (2,-1.2) {Sy};

% \node[draw, circle, minimum size=1cm] (node3) at (4,0) {$\timesOperator$};

% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node42) at (5,-1.5) {Sx};
% \node[draw, circle, minimum size=1cm] (node4) at (6,-1.5) {S3};
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node41) at (7,-1.5) {Sy};

% \node[draw, circle, minimum size=1cm] (node5) at (6,1.5) {S4};
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node51) at (5,1.5) {Sx};
% \node[draw, circle, minimum size=0.4cm, draw=gray, text opacity=0.5] (node52) at (7,1.5) {Sy};
% % Connection
% \draw[->] (node1) -- (node2);
% \draw[->] (node2) -- (node3);
% \draw[->] (node3) -- (node4);
% \draw[->] (node3) -- (node5);
% \end{tikzpicture}
% \caption{Service composition instance}
% \label{fig:service_composition_instance}
% \end{figure}
% \[ \forall S \in \mathrm{S}_{C} \exists \iChartFunction(S) = \mathrm{S}_{1} \]


\begin{figure}
\centering
\includegraphics[width=\columnwidth]{serviceDetail.pdf}
\caption{Service Detail}
\label{fig:service_detail}reinstall remote-ssh
\end{figure}
Loading

0 comments on commit f350297

Please sign in to comment.