Skip to content

Commit

Permalink
Instance - Claudio
Browse files Browse the repository at this point in the history
  • Loading branch information
cardagna committed Nov 9, 2023
1 parent d118d1b commit 42e91ad
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 40 deletions.
4 changes: 2 additions & 2 deletions macro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
\newcommand{\org}[1]{\ensuremath{o_{#1}}}
\newcommand{\Org}[1]{\ensuremath{O_{#1}}}
\newcommand{\s[1]}{\ensuremath{s_{}}}
\newcommand{\si}{\ensuremath{s_i}}
\newcommand{\si}[1]{\ensuremath{s_{#1}}}
\newcommand{\dataset}[1]{\ensuremath{D_{#1}}}

\newcommand{\T}{\ensuremath{T}}
Expand Down Expand Up @@ -45,7 +45,7 @@

\newcommand{\fChartFunction}{\ensuremath{\myLambda{}}}

\newcommand{\tChartFunction}{\ensuremath{G(\V,\E,\myLambda,\myGamma)}\xspace}
\newcommand{\tChartFunction}{\ensuremath{G^{\myLambda,\myGamma}(\V,\E,\myLambda,\myGamma)}\xspace}
% \newcommand{\iChartFunction}{\ensuremath{\fChartFunction,\myGamma{},\myLambda{}}}
\newcommand{\iChartFunction}{\ensuremath{G'(\V',\E,\myLambda)}\xspace}

Expand Down
63 changes: 25 additions & 38 deletions service_composition.tex
Original file line number Diff line number Diff line change
Expand Up @@ -214,27 +214,26 @@ \subsection{Example}\label{sec:example}
\section{Pipeline Instance}
% \subsection{Instance}
% \hl{ANCHE QUA COME PER IL TEMPLATE PROVEREI A ESSERE UN POCO PIU' FORMALE. GUARDA IL PAPER CHE TI HO PASSATO.}
Given the \pipelineTemplate we define our \pipeline instantiation technique as a function that takes as input a \pipelineTemplate \tChartFunction and different sets of candidate services,
each satisfying the policy requirements of one vertex, and returns as output a \pipelineInstance \iChartFunction.
In \iChartFunction, every invocations $\vi{i}\in\V$ contains a service instance, and every branching $v\in\Vplus\bigcup\Vtimes$ is maintained as it is. We formally define our \pipelineInstance as follows.
We define a \pipeline instantiation technique as a function that takes as input a \pipelineTemplate \tChartFunction and a set $S^c$ of compatible services, one for each vertex \vi{i}$\in$\V, and returns as output a \pipelineInstance \iChartFunction. We recall that compatible 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 $\vi{i}$$\in$\V$_S$ contains a service instance, and every branching $v\in\Vplus\bigcup\Vtimes$ is maintained as it is. We formally define our \pipelineInstance as follows.

\begin{definition}[Pipeline Instance]\label{def:instance}
Let \tChartFunction be a Service Template, a Service Instance $\iChartFunction$ is a directed acyclic graph where:
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 real service $s_i$
\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 real service $s'_i$,
\end{enumerate*}
and , such that the following conditions hold:
and such that the following conditions hold:
\begin{enumerate}[label=\arabic*)]
\item $s_i$ satisfies policy requirements in \tChartFunction.
\item $s_i$ satisfies functional requirements in \tChartFunction.
\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 $s_i$ must satisfy the functional requirements of the corresponding vertex in the \pipelineTemplate.
Condition 2 states that each service $s_i$ must satisfy the policy requirements \myLambda(\vi{i}) of the corresponding vertex \vi{i} in the \pipelineTemplate.
Condizione 1 è soddisfatta da tutti
Condition 1 is needed to preserve the process functionality, as it simply states that each service $s'_i$ must satisfy the functional requirements $F_i$ of the corresponding vertex \vi{i} in the \pipelineTemplate.
Condition 2 states that each service $s'_i$ must satisfy the policy requirements \P{i} of the corresponding vertex \vi{i} in the \pipelineTemplate.
We assume that Condition 1 is satisfied for all candidate services and therefore concentrate on Condition 2 in the following.

% Le considerazioni che seguono partono dall'assunto che T sia uguale a T_p U T_f senza lack of generality

Expand All @@ -243,41 +242,29 @@ \subsection{Example}\label{sec:example}
Finally, for each vertex \vii{i}$\in$\Vp, a two-step selection approach is applied as follows.
\begin{itemize}

\item \textit{Filtering Algorithm} -
\item It matches the policy \myLambda(\vi{i}) against service profile and returns as output a set of services that match the policy.
Formally, let us consider a set S of candidate services \si, each one annotated with a profile.

Assuming that policy matching are successful for each \s{i}$\in$S. The matching process is successful if the service profile satisfies \myLambda(\vi{i});
otherwise, \si is discarded and not considered for selection.
The matching algorithm returns a subset $S'\subseteq S$ of compatible services, which represent the possible candidates for selection.

\item \textit{Comparison Algorithm} - Upon retrieving a set of compatible services, it produces a ranking of these services according to a scoring function.
More details about the metrics are provided in Section \ref{sec:metrics}.
Formally, compatible services \si$\in$S' are ranked on the basis of a scoring function.
The best service \si is then selected and integrated in $\vii{i}\in \Vp$.
There are many ways of choosing a scoring function, we present those used in this article in Section \ref{sec:metrics}.



\item \textit{Filtering Algorithm} -- As already discussed in Section~\ref{sec:templatedefinition}, filtering algorithm retrieves a set of candidate services 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 policy \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 annotated with a profile. The filtering algorithm is executed for each \si{j}; it is successful if \si{j}'s profile satisfies \myLambda(\vi{i}) as the access control policy \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, which represent the possible candidates for selection.

\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 \si{j} 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 \in V$ have been visited, G' contains a service instance for each \v in \Vp, and the \pipelineInstance is complete.
When all vertices $\vi \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 a policy \P{i} according to \myLambda. When pipeline instance is triggered, before any services can be executed, policy \P{i} is evaluated and enforced. In case, policy evaluation is \emph{true}, data transformation \TP\ is applied, otherwise a default transformation that delete all data is applied.

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

As an example, let us consider the same template G(\V,\E,\myLambda,\myGamma) with three vertexs, described in \cref{sec:example}.
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}) is responsible for data anonymization.
In the system there are three services that satisfy the functional requirements of the first vertex, namely $s_1$, $s_2$ and $s_3$.
The first service $s_1$ is annotated with a profile that satisfies the policy requirements of the first vertex, same for the second service $s_2$.
The third service $s_3$ is annotated with a profile that does not satisfy the policy requirements of the first vertex.
The filtering algorithm returns the set $S'=\{s_1,s_2\}$.
The comparison algorithm is then applied to $S'$ and returns a ranking of the services according to a scoring function, from which results that $s_1$ is the best service.
The best service $s_1$ is then selected and integrated in $\vii{1}\in \Vp$.
The same logic is applied to the \vi{2} and \vi{3} and any other vertex in the pipeline template.
%\end{enumerate*}
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} and \P{2}, respectively.
The third service $s_3$ is annotated with a profile that does not satisfy the data protection requirements in \P{3}.
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 same logic is applied to the \vi{2} and \vi{3}.

\end{example}

Expand Down

0 comments on commit 42e91ad

Please sign in to comment.