\documentclass[../thesis.tex]{subfiles}
-\begin{document}
-\ifSubfilesClassLoaded{
- \pagenumbering{arabic}
-}{}
+\include{subfilepreamble}
+\begin{document}
\chapter{Could Tierless Languages Reduce IoT Development Grief?}%
\label{chp:smart_campus}
\section{Background and related work}%
\label{sec_t4t:Background}
-\subsection{\texorpdfstring{\Acrlong{UOG}}{University of Glasgow} smart campus}%
+\subsection{\texorpdfstring{\Glsxtrlong{UOG}}{University of Glasgow} smart campus}%
\label{sec_t4t:UoGSmartCampus}
% Jeremy
The \gls{UOG} is partway through a ten-year campus
In contrast, \gls{CLEAN} has a uniqueness type system to ensure the single-threaded use of stateful objects like files and windows~\citep{barendsen_smetsers_1996}.
Both \gls{CLEAN} and \gls{HASKELL} support fairly similar models of generic programming~\citep{ComparingGenericProgramming}, enabling functions to work on many types. As we shall see generic programming is heavily used in task-oriented programming~\citep{GenericProgrammingExtensionForClean,HinzeGenericFunctionalProgramming}, for example to construct web editors and communication protocols that work for any user-defined datatype.
-\subsection{\texorpdfstring{\Acrlong{TOP}}{Task-oriented programming}}
+\subsection{\texorpdfstring{\Glsxtrlong{TOP}}{Task-oriented programming}}
\Gls{TOP} is a declarative programming paradigm for constructing interactive distributed systems~\citep{plasmeijer_task-oriented_2012}.
Tasks are the basic blocks of \gls{TOP} and represent work that needs to be done in the broadest sense.
\label{table_t4t:temp}
\begin{tabular}{llccl}
\toprule
- Location & Functionality & \gls{PWTS} & \gls{CWTS} & Lines (\cref{lst_t4t:mtaskTemp})\\
+ Location & Functionality & \gls{PWTS} & \gls{CWTS} & Lines (\cref{lst_t4t:mtaskTemp})\\
\midrule
- Sensor Node & Sensor Interface & 14 & 3 &~\ref{lst_t4t:mtaskTemp:si0},~\ref{lst_t4t:mtaskTemp:si1},~\ref{lst_t4t:mtaskTemp:si2}\\
- & Sensor Node & 67 & 4 &~\ref{lst_t4t:mtaskTemp:sn0},~\ref{lst_t4t:mtaskTemp:sn1},~\ref{lst_t4t:mtaskTemp:sn2},~\ref{lst_t4t:mtaskTemp:sn3}\\
- Server & Web Interface & 17 & 3 &~\ref{lst_t4t:mtaskTemp:wi0},~\ref{lst_t4t:mtaskTemp:wi1},~\ref{lst_t4t:mtaskTemp:wi2}\\
- & Database Interface & 106 & 2 &~\ref{lst_t4t:mtaskTemp:di0},~\ref{lst_t4t:mtaskTemp:di1}\\
- Communication & Communication & 94 & 3 &~\ref{lst_t4t:mtaskTemp:co0},~\ref{lst_t4t:mtaskTemp:co1},~\ref{lst_t4t:mtaskTemp:co2}\\
+ Sensor Node & Sensor Interface & 14 & 3 & \labelcref{lst_t4t:mtaskTemp:si0,lst_t4t:mtaskTemp:si1,lst_t4t:mtaskTemp:si2}\\
+ & Sensor Node & 67 & 4 & \labelcref{lst_t4t:mtaskTemp:sn0,lst_t4t:mtaskTemp:sn1,lst_t4t:mtaskTemp:sn2,lst_t4t:mtaskTemp:sn3}\\
+ Server & Web Interface & 17 & 3 & \labelcref{lst_t4t:mtaskTemp:wi0,lst_t4t:mtaskTemp:wi1,lst_t4t:mtaskTemp:wi2}\\
+ & Database Interface & 106 & 2 & \labelcref{lst_t4t:mtaskTemp:di0,lst_t4t:mtaskTemp:di1}\\
+ Communication & Communication & 94 & 3 & \labelcref{lst_t4t:mtaskTemp:co0,lst_t4t:mtaskTemp:co1,lst_t4t:mtaskTemp:co2}\\
\midrule
% \multicolumn{2}{c}{Total (\textnumero{} Files)} & 298 (27) & 15 (1) \\
Total \gls{SLOC} & & 298 & 15 \\
\begin{enumerate*}
\item Tierless developers need to manage less interoperation: \gls{CRS} uses a single \gls{DSL} and paradigm, and \gls{CWS} uses two \glspl{DSL} in a single paradigm and three source code files. In contrast, both \gls{PRS} and \gls{PWS} use at least six languages in two paradigms and spread over at least 35 source code files (\cref{table_t4t:multi,table_t4t:languages,table_t4t:paradigms}). Thus, a tierless stack minimises semantic friction.
\item Tierless developers benefit from automatically generated, and hence correct, communication (\cref{lst_t4t:mtaskTemp}), and write 6$\times$ less communication code (\cref{fig_t4t:multipercentage}).
-%and TODO).%~\ref{lst_t4t:mqtt}).
\item Tierless developers can exploit powerful high-level declarative and task-oriented \gls{IOT} programming abstractions (\cref{table_t4t:temp}), specifically the composable, higher-order task combinators outlined in \cref{sec_t4t:itasks}.
Our empirical results for \gls{IOT} systems are consistent with the benefits claimed for tierless languages in other application domains. Namely that a tierless language provides a \textit{Higher Abstraction Level}, \textit{Improved Software Design}, and improved \textit{Program Comprehension}~\citep{weisenburger2020survey}.
\end{enumerate*}