add glue chapter
[msc-thesis1617.git] / mtaskext.sdssem.tex
index 5ba33ad..0107712 100644 (file)
@@ -8,8 +8,10 @@ behave a little different in an \gls{mTask} device compared to in the
 a broadcast to all watching \glspl{Task} in the system is made to notify them
 of the update. \glspl{SDS} can update often and the update might not be the
 final value it will get. Implementing the same functionality on the \gls{mTask}
-client would result in a lot of expensive unneeded bandwidth usage.  Therefore
-a device must publish the \gls{SDS} explicitly to save bandwidth.
+client would result in a lot of expensive unneeded bandwidth usage. Therefore
+a device must publish the \gls{SDS} explicitly to save bandwidth. Note that
+this means that the \gls{SDS} value on the device can be different compared to
+the value of the same \gls{SDS} on the server.
 
 To add this functionality, the \CI{sds} class could be extended. However, this
 would result in having to update all existing views that use the \CI{sds}
@@ -21,3 +23,17 @@ signature:
 class sdspub v where
   pub :: (v t Upd) -> v t Expr | type t
 \end{lstlisting}
+
+Moreover, \glspl{SDS} in the \gls{mTask}-\gls{EDSL} are always anonymous. There
+is no way of labeling it since it is not a real entity, it is just a function.
+When a \gls{SDS} is sent to the device it must be retrievable and identifiable.
+It is not always clear which instantiated \gls{SDS} is which. Therefore, an
+added class named \CI{namedsds} is added that provides the exact same
+functionality as the \gls{SDS} class but adds a \CI{String} parameter that can
+later be used to identify a \gls{SDS}. The types for this class are as follows:
+
+\begin{lstlisting}[caption={The \texttt{namedsds} class}]
+class namedsds v where
+  namedsds :: ((v t Upd)->In (Named t String) (Main (v c s))) -> (Main (v c s)) | type, mTaskType, toCode t
+:: Named a b = Named infix 1 a b
+\end{lstlisting}