updates
[phd-thesis.git] / top / 4iot.tex
index 095b276..dc6b6dc 100644 (file)
@@ -5,10 +5,10 @@
 \begin{document}
 \input{subfileprefix}
 
-\chapter{\texorpdfstring{\Glsxtrshort{TOP} for the \glsxtrshort{IOT}}{TOP for the IoT}}%
+\chapter{\texorpdfstring{\Glsxtrlong{TOP} for the \glsxtrlong{IOT}}{Task-oriented programming for the internet of things}}%
 \label{chp:top4iot}
 \begin{chapterabstract}
-       This chapter:
+       \noindent This chapter:
        \begin{itemize}
                \item introduces the problems with \gls{TOP} for the \gls{IOT}.
                \item shows how to create the \emph{Hello World!} application for microcontrollers using \gls{ARDUINO};
@@ -38,6 +38,7 @@ The programs are usually cyclic executives instead of tasks running in an operat
                Storage & \qty{1}{\tebi\byte} & \qty{32}{\kibi\byte} & \qtyrange{0.5}{4}{\mebi\byte}\\
                \gls{RAM} & \qtyrange{4}{16}{\gibi\byte} & \qty{2}{\kibi\byte} & \qty{160}{\kibi\byte}\\
                Power & \qtyrange{50}{100}{\watt} & \qtyrange{0.13}{250}{\milli\watt} & \qtyrange{0.1}{350}{\milli\watt}\\
+               Size & $\pm$\qty{1060}{\cubic\cm} & $\pm$\qty{7.5}{\cubic\cm} & $\pm$\qty{1.1}{\cubic\cm}\\
                Price & \euro{1500} & \euro{3} & \euro{4}\\
                \bottomrule
        \end{tabular}
@@ -48,7 +49,7 @@ The popular \gls{ARDUINO} \gls{C}\slash\gls{CPP} dialect and accompanying librar
 Originally it was designed for the in-house developed open-source hardware with the same name but the setup allows porting to many architectures.
 It provides an \gls{IDE} and toolchain automation to perform all steps of the toolchain with a single command.
 
-\section{\texorpdfstring{\Glsxtrlong{TOP}}{Task-oriented programming}}
+\subsection{\texorpdfstring{\Glsxtrshort{TOP} for the \glsxtrshort{IOT}}{TOP for the IoT}}
 \Gls{TOP} is a programming paradigm that allows multi-tier systems to be generated from a single declarative source.
 \Gls{ITASK} is a general-purpose \gls{TOP} system for programming distributed web applications.
 These distributed web applications often form the core of \gls{IOT} applications as well but integrating these devices in \gls{ITASK} is not straightforward.
@@ -108,7 +109,7 @@ blink =
        \end{subfigure}
 \end{figure}
 
-\section{Threaded blinking}
+\section{Multi tasking}
 Now say that we want to blink multiple blinking patterns on different \glspl{LED} concurrently.
 For example, blink three \glspl{LED} connected to \gls{GPIO} pins $1,2$ and $3$ at intervals of \qtylist{500;300;800}{\ms}.
 Intuitively you want to lift the blinking behaviour to a function and call this function three times with different parameters as done in \cref{lst:blinkthreadno}
@@ -161,7 +162,7 @@ void loop() {
 This method is very error prone, requires a lot of pointer juggling and generally results into spaghetti code.
 Furthermore, it is very difficult to represent dependencies between threads, often state machines have to be explicitly programmed by hand to achieve this.
 
-\section{Threaded blinking in \texorpdfstring{\gls{MTASK}}{mTask}}
+\subsection{Multi tasking in \texorpdfstring{\gls{MTASK}}{mTask}}
 The \cleaninline{delay} \emph{task} does not block the execution but \emph{just} emits no value when the target waiting time has not yet passed and emits a stable value when the time is met.
 In contrast, the \arduinoinline{delay()} \emph{function} on the \gls{ARDUINO} is blocking which prohibits interleaving.
 To make code reuse possible and make the implementation more intuitive, the blinking behaviour is lifted to a recursive function instead of using the imperative \cleaninline{rpeat} construct.
@@ -190,7 +191,11 @@ blinktask =
 % VimTeX: SynIgnore off
 
 \section{Conclusion}
-\todo[inline]{write}
+The edge layer of \gls{IOT} systems are powered by microcontrollers.
+Programming them happens through compiled firmwares using low-level imperative programming languages and do usually not come with an \gls{OS}.
+Consequently, writing applications that perform multiple tasks at the same time is error prone, and complex; and requires a lot of boilerplate and manual scheduling code.
+With the \gls{MTASK} system, a \gls{TOP} programming language for \gls{IOT} edge devices, this limitation can be overcome.
+\todo{uit\-breiden}
 
 \begin{subappendices}
 \section{History of \texorpdfstring{\gls{MTASK}}{mTask}}