Documentos de Académico
Documentos de Profesional
Documentos de Cultura
411
network is defined for a given application, protocols more agile and user-centric composition process. Such
that efficiently route data from source nodes to sinks agility is achieved through the use of Web 2.0 related
have to be used. Several WSN specific protocols were technology. Web 2.0 leverage WebPages from static
proposed in the last years [2,10,11,14,15,16,18], each HTML documents to more dynamic and interactive
one focusing a different type of application domain data application that can be easily consumed by
and/or fulfilling different parameters of Quality of different types of clients.
Service (QoS). Examples of QoS parameters relevant According to Merrill [19], a mashup application is
to the context of WSNs are data delay and accuracy, architecturally comprised of three different
network coverage and lifetime. components: content providers, the mashup site, and
Most of WSN protocols rely on localized the Web browser.
algorithms and data-centric communication, besides to The content providers are the origin of the
exploit application-specific knowledge in the data information being mashed. A key issue for content
dissemination. Localized algorithms are a special kind providers is to facilitate data retrieval. This issue can
of distributed algorithms that achieve a global goal by be addressed exposing the content to be mashed
communicating with nodes in a restricted through standard Web protocols such as REST, Web
neighborhood. Such algorithms scale well with Services, and Atom.
increasing network size and are robust to network The mashup site hosts the mashup logic. Mashups
partitions and failures. Data-centric communication can be implemented similarly to traditional Web
introduces a new style of addressing in which nodes applications using server-side dynamic content
are addressed by the attributes of data they generate generation technologies like Java servlets, CGI, PHP
(sensor type) and by their geographical location, or ASP. Moreover, the mashed content can be
instead of by their network topological location. generated within the client web browser through web
Finally, the use of application knowledge in nodes can browse scripting (for example using JavaScript). This
significantly improve the resource and energy client-side mashup logic is often the combination of
efficiency, for example by application-specific data code directly embedded in the mashup's Web pages as
caching and aggregation in intermediate nodes [10]. well as scripting API libraries or applets (furnished by
Regardless the specific protocol adopted, all the content providers) referenced by these Web pages.
protocols depend on mechanisms for representing the The client Web browser is where the Mashup
application queries and interests as well as generated application is graphically rendered and also the place
sensor data, and for triggering application-specific where the client-side mashup logic runs.
processing when pre-defined types of data or events Frequently mashups use a combination of both
are sensed. Data-centric protocols represent queries server and client-side logic to perform data
and data through high level descriptions (meta-data) aggregation/composition. Data composition that
and disseminate such descriptions in the network requires powerful computations such as complex
instead of the collected raw data. When a cluster-based queries on multiple-sourced data are better performed
approach is adopted, a further mechanism for by server-side mashups while local small sets of data
representation of coordination messages exchanged can be mashed by client-side mashups.
among nodes is needed.
3. Proposal: the WSN as a Service
2.2. Web Mashups
Our work proposes a generic and flexible
A Mashup has the ability to create dynamic, user- architecture for sensor networks based on the Web
centric solutions through the combined functionality or services and Web Mashup technologies. Web services
content from different and possibly unrelated existing are built according to the service-oriented architecture
sources. These existing sources can be SOAP or REST (SOA pattern) and they can be described by a trio of
Web Services, RSS feeds or even just other Websites interoperability stacks [8]. In the proposed architecture,
(in this case the data should be extracted by screen- sensor nodes act as data providers and the WSN acts as
scraping). Mashups can be seen as a composition service provider for client applications, providing: (i)
technology, since its ultimate goal is to make possible raw data generated by sensor nodes, (ii) processed
the creation of new services and applications starting data, generated through several types of analysis,
from the integration of different sources available on filtering and complex processing, and (iii) value added
the Web. Compared to other web services enabled services provided by web mashups.
composition technologies, such as BPM [21] or Section 3.1 describes the WSN physical
Enterprise service bus (ESB) [3], mashups propose components considered in this work. Sections 3.2 and
412
3.3 present the architectural layers of the proposed purpose, suppose two different WSNs. The WSN_1
system and the roles played for such components provides temperature data of a geographic area A,
according to the SOA pattern. Sections 3.4 and 3.5 while WSN_2 provides humidity and light data of a
details WS* languages, protocols and approaches geographic area B. We should also consider that there
adopted for services description and data is an overlapping area C between A and B. Now,
communication in our proposal. consider a user interested in continuously monitoring
the humidity data and in obtaining the average
3.1 WSN Physical Components temperature of a region geographically located inside
area C. Besides integrating data from WSNs 1 and 2, a
In our proposal, we consider a WSN comprising of Web Mashup allows easy spatial visualization of the
two main physical components: sensor nodes and sink integrated data, for instance, by using Google Map
nodes. The architectural components of the proposed service [7].
system are present in both sink and sensor nodes,
above network level protocols and operating system.
A sensor node can contain one or more specialized
sensing devices. Furthermore, it can have routing and
data aggregation capabilities. Thus, the routing
function is distributed among all nodes. Concerning
data aggregation capabilities, we assume that all the
sensor nodes have enough processing and storage
capacities to store and execute aggregation programs.
Sink nodes provide an interface through which the
other architectural components (regarding mashups
technology) of the proposed system can obtain the
information collected by the sensor network. Such
interfaces can be accessed locally or remotely (i.e.,
through the Internet). Sink nodes can also aggregate
data, but they do not have sensor devices. We assume Figure 1. System Architecture Layers
that they are more powerful regarding to processing
and communication capabilities than sensor nodes.
3.3 System Components According to the
3.2 Architecture Layers Service-Oriented Architecture Pattern
413
requestors to the sensor nodes, requesting their describing the Sink node interface and the Web
specialized data services. Mashup interface. In the Sink node interface the port
Sensor nodes are data providers, providing raw types elements contain service descriptions used to
and aggregated data. During the initial phase of WSN access data provided by sensor nodes. In the Web
configuration, sensor nodes send their services Mashup interface the port type elements contain
description to sink nodes, thus executing the basic service descriptions used to access data provided by
publish operation. Sink nodes also act as registries (at different WSN as well as other data compositions
a lower level comparing to the Mashup Catalogue), provided by other Web Mashups. Each service port
keeping a repository with services descriptions of each type contains operations that can be thought as system
sensor type existing in the sensor network. Therefore, APIs. Those operations contain parameters, defined in
Sink nodes act as registries for a single WSN, the document through messages. Bindings of operation
providing access to its different types of data as a Web definitions to their concrete implementation should be
service, while the Mashup catalogue acts as a register defined according to the underlying protocol. A port
that virtualizes several WSNs as a single one, identification, indicating the place containing the
providing a vision of an ecosystem of sensor data. operation implementation, can be done through any
unique identifier (the device address, for sensor nodes
and uri, for Sinks and Web Mashups).
The operations defined for the Web services
specified in our system are [4]:
Publish_Sensor_Description: This operation is
exposed only by Sink nodes and it is used by sensor
nodes to advertise their sensing capabilities. Messages
invoking such operation are exchanged by sensors in
an initial phase of network configuration, soon after the
WSN physical deployment. These massages include
the node identification, a timestamp, the types of
sensing devices available in each sensor node,
geographical location, residual energy, maximum and
minimum degree of confidence (concerns the accuracy
of the sensor generated data), maximum data
Figure 2. Architecture According to SOA acquisition rate, among other parameters, and they are
broadcast in the network until reaching a Sink Node.
At the Sink nodes, the functionalities described by The following operations are exposed both by Sink
the SOA operations find and bind are grouped in one nodes and Web Mashups.
single one. Sink nodes provide the services description Query_Sensors: This operation has the goal of
interface and, at the same time, provide access to such exposing the specific features and capabilities in terms
services. The Web Mashups interact with sink nodes, of data sensing of a given WSN (when this operation is
and sink nodes access sensor nodes passing the invoked in Sink nodes) or of the sensing data
resulting data to the mashup. In fact, the operation find compositions provided by a given Web mashup. The
is only accomplished internally by sink nodes, which Query_Sensors operation is represented by two
consult their repositories of services descriptions. massages: an input message, without parameters, to
When a Web Mashup submits a query to the WSN, it is call the respective operation, and an output message
actually executing a bind to the services supplied by containing the answer which includes parameters as
the sensor nodes through Sink nodes. Therefore, a types of sensors, confidence degree, maximum data
SOA bind operation issued by a Web Mashup is acquisition rate, etc. After knowing the sensing
translated by the Sink to a find operation followed by a capabilities of a given uri (representing either a Web
bind to the sensor nodes that can meet the request. The mashup or a Sink node associated to a WSN), the
find operation sent to the Mashup Catalogue as well as application (of a final user or a mashup application) is
the bind operation exchanged among Web Mashups able to issue its interests, through different types of
follows the traditional SOA semantics. messages of interest subscription.
Subscribe_Synch_Interest: Operation used to send a
3.4 Service Description message representing a synchronous interest. Such
kind of interest corresponds to a simple query on the
The generic services provided by a sensor network current state of some physical phenomenon monitored
are described through two WSDL documents, by the WSN. An example would be “which is the
414
temperature of region A?”. So, messages to invoke among Web Mashups and sink nodes. By using our
such operation contain as parameters the type of data to Web services complemented by the Mashup approach,
be monitored (and so the type of required sensor), and instead of submitting queries in a WSN proprietary and
the geographical location of the target area. On the pre-defined format, applications are able to choose the
other hand, asynchronous interests can correspond to way they want to view and receive data.
long running queries or queries about some event The communication between Sink nodes and the
detection, requiring different types of messages. sensor network is accomplished using a WSN specific
Subscribe_Long_Running_Interest: This operation data dissemination protocol (for instance [14]) and
is called by a message representing a long running formatted as XML messages. Although SOAP is
query, as for instance: “which is the average currently the de-facto Web services standard for
temperature in area A for the next 24hs?”. Parameters message exchange, a fully compliant SOAP server
for these messages are the type of data (sensor), the implementation requires considerable processing and
geographical target area, the duration of the monitoring memory resources that are not available in most of the
and the data acquisition rate. sensor devices. Moreover, the message size produced
Subscribe_Event_driven_Interest: This operation is by SOAP is incompatible with the resource constrained
invoked to report about the occurrence of a specific environment of WSN [20]. Therefore, a more
event in a target area, for instance: “Report whenever lightweight approach for sending Web services
an elephant traverses area A”. Messages to invoke such messages is needed to implement the communication
operation must include the type of sensor to be used (in between Sink nodes and sensor nodes. Fortunately, the
this example, a movement sensor or an accelerometer), WSDL language allows different bindings besides the
the description of the event to be detected and the SOAP binding. We make use of the HTTP binding
geographical area to be monitored. [26] to encapsulate the message exchange between
Publish_Data: When detecting data for which they Sink and sensor nodes. A standard compliant HTTP
have received a requisition (represented by interests), server can easily implemented on most of the resource
sensors nodes issue publish data messages (to trigger constrained WSN devices [20]. The HTTP binding is
the respective operation in the Sink node). Such ideal for WSN communication since it reduces both the
messages advertising data contain the data type, the need of processing power and memory usage.
instance (or value) of that type that was detected, the
sensor current location (sensors can be mobile), the
signal intensity, the confidence degree in the
accomplished measurement, a timestamp, and the
current sensor amount of energy. While in Sink nodes
such operation is called whenever a sensor generates a
raw data, or a data resulted from some simple
aggregation procedure, this same operation when sent
to Web mashups will return values of processed data
generated in response to a given interest message, and
resultant of the mashup composition process.
415
sending a full XML message. However, there are between such work and ours concerns the decisions on
situations where the sensor generated data are complex the communication framework. Instead of using an
and requires a more structure message format. In this approach based on REST, we decided to adopt the
case, a POST-based XML encoding should be used Web services approach. Such decision was motivated
instead of url encoding or url replacement techniques. by the following features provided by WS-*
To enable sensor nodes to handle XML messages, specifications: (i) support of asynchronous
an XML parser is needed. In order to minimize the communication, which is often required in WSN
processing requirements, a simplified and lightweight environments; (ii) support for handling complex data
custom XML parser can be implemented within the structures; (iii) support for building a message bus
sensor devices. infrastructure instead of only simple RPC
In our proposal, the communication is managed by communication model.
two different components: SOAP modules and HTTP In [1] the authors propose the UbiSOA, an editor
module. The SOAP module must be present in both that allows creating ubiquitous computing mashups
Web Mashups and Sink nodes. The HTTP module through simple tasks such as dragging and dropping
must be present in sensor nodes. graphical representations of the services involved in a
The SOAP module is composed of a SOAP engine target scenario. The focus of such work is only the
and a set of handlers. In Sink nodes, such module editor and we intend to investigate the integration of
includes also a binding with the underlying network UbiSOA with our proposed architecture, thus
level protocol. The SOAP engine acts as the main entry providing a complete framework for building WSN
point into the SOAP module. It is responsible for Mashup applications.
coordinate the SOAP message’s flow through the This proposal builds on a previous work developed
various handlers and for ensuring that the SOAP by our research team [6]. Our current focus is to
semantics are followed. Handlers are the basic building investigate existent mashup tools in order to integrate
blocks inside the SOAP module and they represent the them in our solution. Finally, we will implement the
messages processing logic, including the complete architecture in real world sensors based on
marshalling/unmarshalling of messages, header and Mica motes [2] and SUN Spot sensor platforms [24].
attachments processing, serialization, conversions of Our service-based architecture provides the
data type, among any other basic functions. underpinning for building more general purpose
The HTTP module encompasses the HTTP server and networks instead of strictly task-specific ones, thus
the custom XML parser. assisting a large range of users, possibly spread over
the world, that share a common interest in an
4. Discussion and Work in Progress application domain.
416
3. Chappell, D. A., Enterprise Service Bus, O'Reilly Media International performance, computing and
Publisher, June 2004. communications conference, vol. 23, pp. 717-722, 2004.
4. Crossbow Technology. Available in 16. Kulik, J., Rabiner, W., Balakrishnan, H., “Adaptive
http://www.xbow.com/. Last access: January/2010. Protocols for Information Dissemination in Wireless
Sensor Networks”, In Proceedings of the 5th ACM/IEEE
5. Delicato, F. C. et al., “A flexible middleware system for Mobicom Conference, USA, Aug. 1999.
wireless sensor networks”, In the Proceedings of the
ACM/IFIP/USENIX 2003 International Conference on 17. Levis, P. et al., TinyOS: An Operating System for Sensor
Middleware, Rio de Janeiro, Brazil, 2003. Networks, In Ambient Intelligence, Eds. Werner Weber,
Jan M. Rabaey and Emile Aarts, Springer Berlin
6. Delicato, F.C., “Middleware Baseado em Serviços para Heidelberg Pubs., 2005.
Redes de Sensores sem Fio”, (In Portuguese), PhD
Thesis, Federal University of Rio de Janeiro, Brazil, 18. Manjeshwar, A. and Agrawal, D., “APTEEN: A Hybrid
June, 2005. Protocol for Efficient Routing and Comprehensive
Information Retrieval in Wireless Sensor Networks”, In
7. Google Maps API. Available in: Proceedings of the 16th International Parallel and
http://code.google.com/apis/maps/. Last access: Distributed Processing Symposium, IEEE Computer
January/2010. Society Pubs, Washington, DC, USA, 2002.
8. Graham, S. et al. Building Web Services with Java: 19. Merrill, D., “Mashups: the New Breed of Web App.”,
Making Sense of XML, SOAP, WSDL, and UDDI, Sams IBM DeveloperWorks, Aug. 2006. Available in:
Publishing, 2002. http://www.ibm.com/developerworks/xml/library/x-
mashups.html. Last access January, 2010.
9. Guinard, D. and Trifa, V., “Towards the Web of Things:
Web Mashups for Embedded Devices.”, In Proceedings 20. Priyantha, N., Kansal, A., Goraczko, M., and Zhao, F.,
of Workshop on Mashups, Enterprise Mashups and “Tiny web services: design and implementation of
Lightweight Composition on the Web, International interoperable and evolvable sensor networks”, In the
World Wide Web Conferences, Madrid, Spain, 2009. Proceedings of the 6th ACM conference on Embedded
network sensor systems, Raleigh, NC, USA, 2008.
10. Heidemann, J., et al., “Building Efficient Wireless Sensor
Networks with Low-Level Naming”, In Proceedings of 21. Smart, P.A, Maddern, H. and Maull, R. S.,
the 2001 ACM Symposium on Operating Systems Understanding Business Process Management:
Principles, 2001, Canada. implications for theory and practice, British Journal of
Management, on line 2008.
11. Heinzelman, W., Chandrakasan, A. and Balakrishnan, H,
Energy-Efficient Communication Protocol for Wireless 22. Stojmenović, I. (Editor), Handbook of Sensor Networks:
Microsensor Networks. Proceedings of the 33rd Hawaii Algorithms and Architectures, Wiley Pubs, October
International Conference on System Sciences, 2000. 2005.
12. Huang, Mei-Wen; Liu, Hsu-Jung; Hsieh, Wen-Shyong, 23. SUN Microsystems, “Implementing Services On
“A Hybrid protocol for Cluster-based wireless sensor Demand and the Sun Open Net Environment (Sun
networks”, In Proceedings of the 13th Asia-Pacific ONE)”. Available in:
Computer Systems Architecture Conference, 2008. http://www.sun.com/software/sunone/wpimplement/wp-
implement.pdf, 2001.
13. IBM White Paper, Web Services Toolkit. Available in:
http://www.alphaworks.ibm.com/tech/.
24. Sun SPOT World, Available in
14. Intanagonwiwat, C., Govindan, R., Estrin, D., “Directed http://www.sunspotworld.com/. Last access in set/2009.
diffusion: a scalable and robust communication paradigm
for sensor networks”, In proceedings of the ACM/IEEE 25. UDDI.org, “UDDI Technical White Paper”. Available in:
International Conference on Mobile Computing and http://www.uddi.org/pubs/Iru_UDDI_Technical_White_
Networking (MobiCom 2000), pages 56-67, Boston, MA, Paper.PDF, September 2000.
USA, Aug 2000.
26. Web Services Description Language (WSDL) 1.1, W3C
15. Krishnamachari, B. and Heidemann, J., “Application Note 15 March 2001. Available in:
specific modeling of information routing in wireless http://www.w3.org/TR/wsdl. Last access January, 2010.
sensor networks”, In Proceedings of the IEEE
417