Lab Overview

Abstract

In just a few years, the number of Internet-connected "things" (home appliances, smart energy meters, health monitors, sensors) is predicted to be orders of magnitude larger than the number of users and traditional computers. The Web of Things is a vision where everyday objects are seamlessly integrated into the World Wide Web (WWW) using well-known standards and blueprints (e.g. URIs, HTTP and REST). This lab introduces participants to the motivation, key concepts and relevant technologies behind this vision. Lab attendees will use the Sun SPOT wireless device (www.sunspotworld.com) developed at Sun Labs to learn how physical resources (e.g. light sensor, LEDs) can be exposed as web resources and manipulated via HTTP commands.

Overview

In just a few years, the number of Internet-connected "things" (e.g. home appliances, digital picture frames, health monitors, energy meters, sensors) is predicted to be orders of magnitude lerger than the number of users and traditional computers [1, 2, 3]. The Web of Things is a vision where these everyday objects are seamlessly integrated into the World Wide Web (WWW) using well-known standards and blueprints (e.g. URIs, HTTP and REST). This allows the devices to be easily accessed, monitored and controlled from any HTTP client, including the ubiquitous web browser, and new physical-virtual mashups of real-time data with cyber content become possible.

Sun Labs researchers working on Project Sun SPOT (Small Programmable Object Technology) have created a small, wireless, battery-powered device, that provides a versatile, Java technology-based platform for developing embedded applications in areas as diverse as robotics, environmental monitoring and home automation. This commercially available platform comes equipped with a 32-bit ARM processor and an IEEE 802.15.4 radio. Stackable boards include application-specific sensors and actuators such as accelerometers, light detectors, temperature sensors, LEDs, push buttons and general I/O pins. These devices can be duty cycled to run for months on a single charge of their rechargeable battery.

This hands-on lab uses Sun SPOTs to illustrate the key concepts in the Web of Things vision. The exercises show how physical resources (e.g. light sensor, tri-color LEDs) may be exposed as web URLs and manipulated via HTTP commands. We use HTTP header compression and caching to deal with the additional challenges, such as low bandwidth and duty-cycling, unique to these highly constrained yet versatile devices.

The lab starts out with a presentation that introduces the Web of Things, its REST architectural style, Sun SPOTs and the "nano" appserver software platform for building RESTful services on these devices.

A number of lab exercises follow, each building on top of the previous ones. Throughout the duration of the lab, we will have a web-based application running that periodically accesses RESTful services available on a Sun SPOT and displays retrieved information on a "dashboard". As participants progress through the lab exercises, additional information on their SPOTs is automatically displayed on the "dashboard".

Exercise 0: Install and Configure Lab Environment (not required for JavaOne HOL attendees since the environment is already set up on the lab computers).

Exercise 1: Getting familiar with the Sun SPOT, its sensors/actuators and the resource API used to access them. Compiling, deploying and running a sample "Flashlight" application that uses light sensor readings to control the LEDs.

Exercise 2: Installing, running and interacting with some RESTful services (already created for you) on a SPOT. Using one of these pre-existing services to assign a name to your Sun SPOT.

Exercise 3: Creating a RESTful "read-only" service to expose the Sun SPOT's light sensor as a URL.

Exercise 4: Creating a RESTful "read-write" service to expose the Sun SPOT's LEDs as a URL

Exercise 5: Adding simple authentication to the LED update service created in Exercise 4.

A set of slides with additional details on the Web of Things and Sun SPOTs can be accessed here (PDF) or here (HTML).


[1] "Objects outpace new human subscribers to AT&T, Verizon",

[2] "… IMS forecast of 22 billion Internet devices by 2010 …"

[3] "10 fool-proof predictions for the Internet in 2020"

#3: The Internet will be a network of things, not computers. "Today, the Internet has around 575 million host computers, according to the CIA World Factbook 2009. But the NSF is expecting billions of sensors on buildings and bridges to be connected to the Internet for such uses as electricity and security monitoring. By 2020, it's expected that the number of Internet-connected sensors will be orders of magnitude larger than the number of users."