Networking Reference
In-Depth Information
instance, in the SmartSensor infrastructure the server implemented in Sun SPOT
nodes responds to HTTP requests by sending the sensor readings embedded into a
JSON file. An example of the payload in a reply message in JSON is the following:
“sensor”: “1265”, “temp”: “27.75”, “scale”: “celsius”, “timestamp”: “Wed Jun 22
16:12:13 BRT 2011” where the sensor is recognized by the last four digits of its
MAC address, temp is the temperature resource with its current value.
3.4 Accessing and Using WoT-Enabled WSNs Through
the SmartSensor
In the SmartSensor infrastructure there is a hierarchy of gateway nodes, each one
containing a Web server. PEM components execute in a gateway node responsible
for keeping and providing the unified view of all WSNs integrated to the WoT
infrastructure, while SIM components run in a gateway node connected to a single
WSN. The PEM Web server is kept always up-and-running waiting for requests
in a well-known URL. Upon start-up, the SIM Gateway publishes its current IP
address and port number to the PEM server. It also sends to the PEM the list of
resources it has currently available (set of connected WSNs). Upon initialization,
each sensor node in a WSN that wishes to connect to the SmartSensor should send an
advertising message to the SIMGateway. In the SmartSensor current implementation
the multihop communication is not supported. Therefore, advertising messages are
broadcasted in the network and it is assumed that every node is in the gateway radio
communication range. Such messages are discarded by every other node except
the gateway, which will process the content and update its database of resources.
Periodically, the gateway exchanges messages with the PEM to inform the current
available resources. Interactions with the resources provided by the SmartSensor
infrastructure may occur basically in two ways. A client that is interested in building
mashup applications on top of the WSN provided resources interacts only through
PEM. For this type of user, the source of a given resource (the specific WSN the data
comes from) remains transparent, since he/she is only interested in using resources
that match to a description (geographic location, type of sensor, etc.). A client that is
interested in directly accessing the resources provided by a WSN interacts through
the SIM.
A given user discovers the resources of all available WSNs integrated to the
SmartSensor infrastructure by accessing the PEM. To do this, the SmartSensor
infrastructure provides a REST-based discovery service through the URI: http://
PEM_server:8080/pem-v3.4-emml/listSIMEMML . This service returns an XML
file (Fig. 3.5 ) containing all the WSNs currently registered in SmartSensor, indi-
cating the IP address of the gateway for each network. Once the user gets the IP of a
given desired network (Gateways IP), he/she can find out what resources are available
in that specific network. For doing this, there is another REST Web service provided
by SIM and accessed through: http://SIM_server/gateway/rest/GetServices/ . This
service returns all resources offered by the given network, informing the sensorsÍDs
(optionally), and the types of sensing data they collect. With this information users
 
Search MirCeyron ::




Custom Search