Hello, world!
Introduction
Abstract
This example demonstrates the basic model of NoTA services and applications under Interconnect 3. The service offers the capability to print the string sent to it to standard output. There are two versions of the service included, one that uses blocking calls and one that uses asynchronous IO multiplexing. For each program, there are two different versions: program and program_sp. The first uses the Interconnect Daemon, and the second runs in single process mode (for more information, see the documentation for Interconnect 3). Both are functionally identical, so no distinction will be made between the two in the rest of this document.
License
This software is licensed under the GNU General Public License, version 2. See the LICENSE file for more information.
Welcome to NoTA!
NoTA Core Architecture
NoTA architecture is centered around a two-tier network stack, the NoTA Interconnect.

Nodes (applications and services) use the top layer, h_in, which binds to the implementation layer, l_in. A NoTA network is made up of subsystems. A subsystem consists of all the software and hardware resources (including peripherals, memories, controllers, internal buses etc.) needed to implement the defined nodes. Nodes can communicate within and between sub-systems using the Interconnect stack, as seen above.
NoTA Principles demonstrated by this example
NoTA is designed to be an extremely flexible architecture in several ways. The interchangability of L_IN implementations makes it possible to change the underlying technology layer without the need to make any changes to the nodes in the system. You can experience this first-hand by changing the L_IN transport, as detailed in
http://notaworld.org/documentation/tutorials . There is also flexibility in the way of scalability. There are no limits to the type of subsystem that can be included in a NoTA system – indeed, the roots of NoTA are in Network-on-Chip-type subsystems! Therefore, you can run this example on your hand-held just as well as on your desktop PC – or any other environment that implements the Interconnect Stack. And, of course, the key principle demonstrated is the Application/Service model of NoTA networks. This service-centric approach means that the following two cases, for example, are identical to the application developer:


Installation
Prerequisites
To try out the Hello, world example, you will need to install the NoTA core technology package, version 3. This package is available for download from
http://notaworld.org/downloads/nota_core . The reference platform for both this example and the core package is Ubuntu Linux 8.04. Step-by-step instructions for installing the NoTA core technology package 1.Download the latest version of all the packages at
http://notaworld.org/downloads/nota_core . 2.For each package, follow these steps: tar xvfz <package>.tar.gz cd <package> ./autogen.sh ./configure && make && make install For more detailed information on compiling the packages, refer to
http://notaworld.org/documentation/tutorials .
You need to install the packages in a bottom-up order, namely: 1.libnota-l-in 2.libnota-h-in 3.libnota-stubadapter (optional) 4.nota-resource-manager (optional)
Contents
The Hello, world program is available as a binary debian package and as a source tarball. These packages contain the following programs:
Services
| nota3_in_test_sn |
Test node. These will put the actual load on the network. |
| nota3_hello_world_blocking_sn |
Example of a service that runs in blocking mode |
| nota3_hello_world_nonblocking_sn |
Example of a service that makes use of slightly more advanced techniques in order to run completely asynchronously. |
Applications
| nota3_hello_world_an |
Example of an application node. |
For each node, there are two versions: one uses the Interconnect Daemon (nota-ind), and the other runs in single process mode. The single process versions have the suffix _sp. The difference is that with the single-process versions the interconnect stack is run as part of the AN / SN. The daemon version uses a system daemon that runs the stack and the ANs and SNs use the stack through a library.
Compilation
To compile the program from source, use:
./autogen.sh
make
Installing
If you compiled the program from source, run
make install
You can also install the debian package:
dpkg -i nota3-hello-world_0.1.0-1.deb
Removal
As usual, the program can be removed by issuing the command
make uninstall
Or, if you're using the packet manager:
dpkg -r nota3-hello-world
Use
Setting up
As with all NoTA programs, one part of your network must be set to act as HManager. Please note that the HManager should be started before any other devices/subsystems are connected.
Running the program
Once your network is up and running, it's time to introduce some service nodes to it. Launch either example service:
nota3_hello_world_blocking_sn
or
nota3_hello_world_nonblocking_sn
With the service registered on the network, try connecting to it with the example application node:
nota3_hello_world_an
If the connection is made successfully, you will be asked for a string to send to the service node. Congratulations – you've just set up your first NoTA service network!
| An example run of the Hello, world application |
The same from the service side (blocking version) |
| nota3_hello_world_an |
nota3_hello_world_blocking_sn |
| Connecting to service '8' |
Activating service with SID '8' |
| Connected socket 8 to service '8'. |
Service active. |
| Enter string to send (255 characters maximum): |
Waiting for connection... |
| Hello, world of NoTA! |
done - connected to socket 7. |
| Send successful. |
Waiting for messages... |
| Would you like to ask the server to shut down ("y" for yes)? |
String received: Hello, world of NoTA! |
| y |
Waiting for messages... |
| Closing socket 8. |
Quitting. |
| |
Deactivating service with SID '8' |
| |
done. |