\chapter{Design}\label{s:design}
\begin{mynote}
	Our contribution in this chapter is three-fold:
	\vspace{-0.2cm}
	\begin{enumerate}[label=\emph{C\textsubscript{\arabic*}}, itemsep=0.2pt]
		\item We analyze the requirements for \mysystem (\Cref{ss:requirements_analysis}).
		\item We propose a conceptual design for \mysystem's architecture (\Cref{ss:design_of_mysystem})
		\item We describe how \mysystem enables predictive analytics through digital twinning (\Cref{ss:design_discussion})
	\end{enumerate}
\end{mynote}
\section{Requirements Analysis}\label{ss:requirements_analysis}
In this section we determine the requirements that should be fulfilled by \mysystem.
We present here the stakeholders identified by our literature survey (see \Cref{sss:digital_twins_for_datacenters}) and the relevant use-cases.
Afterwards, we list the functional and non-functional requirements for \mysystem.

\subsection{Stakeholders}\label{sss:stakeholders}
We identify four main stakeholders of a predictive datacenter digital twin:
\begin{enumerate}[label=\textbf{S\arabic* --},align=left]
	\item \textbf{Datacenter Managers}\\
	      Responsible for maintenance and operation of the warehouse, operators manage the datacenter daily.
	      They interact with the servers, bring downed hosts up and ensure customers' services run smoothly at all times.
	      Datacenter operators need to ensure different \gls{sla}s are met, energy costs are balanced and carbon emission quota is maintained.
	\item \textbf{Datacenter Technicians}\\
	      The term datacenter engineers encompasses datacenter architects and technicians alike.
	      From the moment the datacenter layout is determined, to the physical process of booting the server racks for the first time, datacenter engineers help build and maintain the datacenter.
	      They must continuously adapt to changing requirements and ensure everything goes smoothly~\cite{DBLP:journals/computer/AthavaleBBMMPS24}.
	\item \textbf{Scientists and Academia}\\
	      Digital twinning generates unprecedented amount of data.
	      To bring valuable insights, the ingested metrics must be effectively analyzed.
	      Scientists can draw conclusions from the monitoring data and in some deployments already benefit from the voluminous output of \gls{dcdt}s~\cite{DBLP:conf/noms/ZhangZLZWC22}.
	\item \textbf{Customers and Users}\\
	      Digital twins are already used to visualize both facilities and human beings alike for the benefit of users and customers.
	      Cloud and HPC users are not directly interacting with the system, but pay for services hosted in the datacenter and are one of the primary stakeholders of digital twinning.
	      Not only through 3D datacenter visualizations, but also from the continuously generated metrics can users and customers benefit from \gls{dcdt}s.
\end{enumerate}

\subsection{Use-cases}\label{sss:use_cases}
Based on the identified stakeholders we list 6 potential use-cases for a predictive datacenter digital twin:
\begin{enumerate}[label=\textbf{UC\arabic* --},align=left]
	\item \textbf{Energy Optimization} \\
	      Predicting and modeling energy optimization is curcial for \gls{dcdt}s.
	      It is the main use-case of some existing systems~\cite{DBLP:conf/sc/BrewerMKWBHSGGW24}.
	      Effective energy optimization, including the adjustments to the consumed energy type is a crucial use-case of \gls{dcdt}s.
	\item \textbf{Failure Management} \\
	      Predictive maintenance of both hardware and software failures alike, by simulating the possible failure distribution of a running workload, can lower downtime, terminated tasks and ensure \gls{sla}s are not missed~\cite{DBLP:journals/computer/AthavaleBBMMPS24}.
	\item \textbf{Heat Modelling} \\
	      Heat modeling is the primary use case of existing \gls{dcdt}s (see \Cref{tab:dt_features_comparison}).
	      Correct thermal management of the warehouse can optimize cooling strategies, leading to lower bills and maintenance costs.
	\item \textbf{Network Traffic Modelling} \\
	      Congestion management and traffic routing can effectively benefit from digital twinning.
	      Detecting bottlenecks, adjusting datacenter protocols and calibrating switches and interconnects is already a important use-case for \gls{dcdt}~\cite{DBLP:conf/sigcomm/HongWDSSHZY21}.
	\item \textbf{Virtual Prototyping} \\

	\item \textbf{Monitoring and Visualization} \\
\end{enumerate}

\subsection{Functional Requirements}\label{sss:functional_requirements}
\begin{enumerate}[label=\textbf{FR\arabic* --},align=left]
	\item \textbf{Datacenter} \\
\end{enumerate}

\subsection{Non-functional Requirements}\label{sss:non_functional_requirements}
\begin{enumerate}[label=\textbf{NFR\arabic* --},align=left]
	\item \textbf{Datacenter} \\
\end{enumerate}

\section{Design of \emph{Sunfish}}\label{ss:design_of_mysystem}

\begin{figure}[t]
	\includegraphics[width=\linewidth]{images/ref_architecture.pdf}
	\caption{ The predictive datacenter digital twin reference architecture.
		We call the system \emph{Sunfish}.
		The architecture was designed with the \emph{AtLarge Design Process}~\cite{DBLP:conf/icdcs/IosupVTETBFMT19} over several iterations in the past months}
\end{figure}

\subsection{Digital Thread}

\subsection{Data Storage}

\subsection{Predictive Analytics Module}

\section{Discussion}\label{ss:design_discussion}

