TinyOS operating system. TinyOS is tiny and flexible operation system. It is the most
used software platform for sensor networks, with approximately 25,000 downloads
per year [ 14 ]. TinyOS uses a C dialect called nesC and defines a programing model
based on independent and reusable components. It supports concurrency and flexible
composition. Its main goals are minimizing resource use, by using as few hardware
resources as possible, and preventing bugs. TinyOS provides a set of services for sens-
ing, communication, storage, and temporization. Components can invoke and receive
service requests, signal and receive events (such as, service finalization or hardware
events), and schedule tasks. nesC implements the TinyOS component model. A nesC
file allows the optimisation in code compilation to different sensor platforms.
2.1.2 HTTP, URI, REST, ROA
The integration of objects in the Web involves application protocols and architecture
styles. At the application level, the HTTP protocol interoperability allows the seam-
less integration of objects with the Web. The REST architectural style, proposed by
Fielding [ 8 ], enables that objects are modeled as resources , identified by URIs and
accessed via HTTP. REST is built upon five principles:
1. Global identification of resources;
2. Uniform interface for acessing resources;
3. Self-descritive messages;
4. Hypermedia as Engine of Application State ;
5. Stateless interactions.
The first principle refers to the identification of resources in requests by using
URIs that provide a global address for resource and service discovery. A resource
can be a server, a document, a Web page, a video stream, or a physical thing.
The second principle defines that the resources are avaliable via a uniform interface
with a well-defined semantics [ 9 ]. The Hypertext Transfer Protocol (HTTP) offers a
set of methods proper to enable the uniform interaction.
The self-descritive messages principle define the format of the messages exchan-
ged between clients and servers. A resource can have several representations such
as XML, JSON, HTML, etc. The specification of the representations that a cliente
can receive is in the Accept field of the HTTP header, for instance, text/html (for
HTML), application/xml (for XML) and application/json (for JSON).
The Hypermedia as Engine Of Application State (HATEOAS) is one of the core
tenets of REST. It states that clients can control a Web application following hyper-
links. Links point to Web resources using the global identification (URIs). Clients
follow links to explore a resource. In this schema, an application can be viewed as
a state machine with pages representing a state and links representing the possible
The last REST principle defines that servers are stateless . This means that each
request from clients contains all information (state) that the server needs to process