| 1 |
\chapter{Introduction}\label{chap:introduction} |
| 2 |
\begin{wrapfigure}{r}{0.3\textwidth} |
| 3 |
\includegraphics[width=4cm]{image/notalogobig.png} |
| 4 |
\caption{The official NoTA-logo} |
| 5 |
\end{wrapfigure} |
| 6 |
\section{What is NoTA?} |
| 7 |
\textbf{NoTA} ({\em Network on Terminal Architecture}\index{Network on |
| 8 |
Terminal Architecture}) is a framework for communication between software and |
| 9 |
hardware modules, designed specifically for the communications \textbf{within} |
| 10 |
and \textbf{between} embedded devices. An example of this could be the |
| 11 |
communication between the \emph{storage subsystem} and the \emph{audio |
| 12 |
subsystem} of a phone or an internet tablet. |
| 13 |
|
| 14 |
NoTA is \textbf{also} a specific implementation of this framework -- the {\em |
| 15 |
reference implementation}. This guide is about using that reference |
| 16 |
implementation. |
| 17 |
|
| 18 |
NoTA originates from work at the {\em Nokia Research Center}\index{Nokia |
| 19 |
Research Center} (NRC). The reference implementation is available on-line for |
| 20 |
download from the {\tt notaworld.org}-website\cite{NoTAWorld}. |
| 21 |
|
| 22 |
\section{Goals and audience} |
| 23 |
There is quite some material available that discusses the architecture and |
| 24 |
concepts underlying NoTA software, but there are comparably few practical |
| 25 |
explanations on how to actually {\em use} it. |
| 26 |
|
| 27 |
The goal of this Programming Guide is to change that. In particular, it |
| 28 |
attempts to: |
| 29 |
\begin{itemize} |
| 30 |
\item provide a good general introduction into NoTA-concepts and how they fit |
| 31 |
together; |
| 32 |
\item show how NoTA-based systems can be programmed using the NoTA reference |
| 33 |
implementation. |
| 34 |
\end{itemize} |
| 35 |
|
| 36 |
We will, however, \textbf{not} discuss the internal NoTA-protocols (the |
| 37 |
\texttt{h\_in} and \texttt{l\_in} protocols) in any detail, nor will we go |
| 38 |
through the implementation details of the reference implementation -- except |
| 39 |
when needed to clarify the use of the user-visible parts. |
| 40 |
|
| 41 |
The target audience for this guide consists of people who would like to know |
| 42 |
how NoTA works in practice, and how NoTA-enabled software can be |
| 43 |
implemented. A good working knowledge of the \emph{C}-programming |
| 44 |
language\index{C programming language} is very useful, as is some knowledge of |
| 45 |
UNIX-like\index{UNIX} platforms. |
| 46 |
|
| 47 |
\section{Structure of this guide} |
| 48 |
Although we'd like this to be a very practical introduction into programming |
| 49 |
with NoTA, this guide is neither a {\em cookbook} nor a {\em HOWTO}. We want |
| 50 |
to provide some background, so the concepts become clearer, and you actually |
| 51 |
understand what you are doing. For that reason, we will spend quite some time |
| 52 |
with the way NoTA is structured and why things are the way they are. |
| 53 |
|
| 54 |
{\bf Note}: we discuss the {\tt h\_in} in quite a bit of detail in |
| 55 |
chapters~\ref{chap:h-in} and~\ref{chap:h-in-example}. This is good from a |
| 56 |
structural viewpoint. However, it may also be a bit more detailed that what |
| 57 |
is needed to become productive quickly. So, if you are in a hurry, you might |
| 58 |
want to glance over chapter~\ref{chap:h-in}, and then focus on |
| 59 |
chapter~\ref{chap:stubgen}, about the stub-generator. |
| 60 |
|
| 61 |
To test your understanding of the material, each of the chapters ends with a |
| 62 |
number of questions. The answers to those questions are provided in |
| 63 |
appendix~\ref{chap:answers}. |
| 64 |
|
| 65 |
\begin{itemize} |
| 66 |
\item Chapter \ref{chap:overview} discusses the NoTA components and |
| 67 |
architecture. It provides background to many of the concepts we are using in |
| 68 |
the rest of this guide; |
| 69 |
\item Chapter~\ref{chap:h-in} discusses the {\tt h\_in}, the high-level |
| 70 |
interconnect. The {\tt h\_in} is the layer that application programmers |
| 71 |
usually interact with. The {\tt h\_in} reference implementation provides an |
| 72 |
API similar (but not equal) to BSD-sockets~\cite{Stevens2003}; |
| 73 |
\item Chapter ~\ref{chap:messages} discusses NoTA-message; using the sockets |
| 74 |
of chapter~\ref{chap:h-in}, we can send requests or receive information from |
| 75 |
other nodes using these messages; |
| 76 |
\item Chapter~\ref{chap:h-in-example} provides an example of using the {\tt |
| 77 |
h\_in}, using Caesar Cyphers; |
| 78 |
\item Chapter \ref{chap:stubgen} discusses the Stub-Generator ('{\tt |
| 79 |
stubgen}'). Instead of using the {\tt h\_in} directly, the stubgen |
| 80 |
generates much of the plumbing code for both application node and Service |
| 81 |
Node for you from WSDL\index{Web Services Description Language} |
| 82 |
descriptions; |
| 83 |
\item Chapter~\ref{chap:stubgen-example} gives an example of using the |
| 84 |
stub-generator, by using it to re-implement the Caesar Cypher example of |
| 85 |
chapter\ref{chap:h-in-example}; |
| 86 |
\item Chapter~\ref{chap:rm} discusses the resource manager (RM), which |
| 87 |
(roughly) plays the role that DNS plays in internet communications; |
| 88 |
\item Chapter~\ref{chap:rm-example} gives an example of using the resource manager; |
| 89 |
\item Chapter~\ref{chap:l-in} provides some more background information on the |
| 90 |
\texttt{l\_in}. Although application programmers usually don't have to deal |
| 91 |
with \texttt{l\_in} directly, it's still good to understand the backgrounds; |
| 92 |
\item Chapter~\ref{chap:development} puts all the building blocks together, |
| 93 |
and goes through the typical development lifecycle. |
| 94 |
\end{itemize} |
| 95 |
|
| 96 |
After that, there are a number of appendices: |
| 97 |
\begin{itemize} |
| 98 |
\item Appendix~\ref{chap:installation} contains some notes on how to install |
| 99 |
NoTA-software on your system; |
| 100 |
\item Appendix~\ref{chap:building} has instruction on how |
| 101 |
to build your own NoTA-based software; |
| 102 |
\item Appendix~\ref{chap:running} discusses running NoTA-based programs; |
| 103 |
\item Appendix~\ref{chap:example} has the source code of all the examples; |
| 104 |
\item Appendix~\ref{chap:rm-sis} contains the full WSDL service interface for |
| 105 |
the resource manager; |
| 106 |
\item As mentioned, many of the chapters have questions add the end, so you |
| 107 |
can test your understanding. The answers to these questions can be found in |
| 108 |
appendix~\ref{chap:answers}. |
| 109 |
\end{itemize} |
| 110 |
|
| 111 |
\section{Questions} |
| 112 |
To test your understanding of this chapter, you could try to answer some of |
| 113 |
the following questions. You can find the answers in |
| 114 |
appendix~\ref{chap:answers}. |
| 115 |
\begin{enumerate} |
| 116 |
\item Which two things does the name 'NoTA' refer to? What can it be used for? |
| 117 |
\item What existing knowledge is recommended for getting the most out of |
| 118 |
this guide? |
| 119 |
\item Should you read chapters~\ref{chap:h-in} and~\ref{chap:h-in-example} |
| 120 |
(about the {\tt h\_in} before reading chapter~\ref{chap:stubgen}? |
| 121 |
\item Consider the equation $x^n + y^n = z^n$, where $x,y,z,n \in |
| 122 |
\mathbb{N}$. One solution would be $3² + 4² = 5²$. Proof that there are no |
| 123 |
solutions for $n > 2$. As a bonus question, please also prove that ever even |
| 124 |
integer $>2$ can be written as the sum of two prime numbers. |
| 125 |
\end{enumerate} |