Early Lessons from Building Sensor.Network:
An Open Data Exchange for the Web of Things
Vipul Gupta, Poorna Udupi, Arshan Poursohi
{vipul.x.gupta, poorna.udupi, arshan.poursohi}@oracle.com




                      First International Workshop on the Web of Things (WoT 2010), PerCom 2010
                                                                                                  1
Overview

• The Internet is now the Internet of Things ...




                            data storage




                                                   2
Overview

• The Internet is now the Internet of Things ...




                            data analysis




                                                   2
Overview

• The Internet is now the Internet of Things ...




                              insights




                                                   2
Overview

• The Internet is now the Internet of Things ...




                                actions




                                                   2
Overview

• The Internet is now the Internet of Things ...




       Sensor.Network: an open data-exchange for the Web of Things
                                                                     2
Motivation

• Interactions with many SPOTs customers - Sun Modular Data Center, MIT,
  Warren Wilson College, USGS, Vodafone


• Common set of issues:
  - Data collection
  - Sharing
  - Privacy
  - Search
  - Collaborative analysis
  - Notifications




• Bring social networking technologies (e.g. tags, annotations, fine-grained
  access control, web-hooks) to this problem space
                                                                              3
Motivation

• Interactions with many SPOTs customers - Sun Modular Data Center, MIT,
  Warren Wilson College, USGS, Vodafone


• Common set of issues:
  - Data collection
  - Sharing
  - Privacy
  - Search
  - Collaborative analysis
  - Notifications




• Bring social networking technologies (e.g. tags, annotations, fine-grained
  access control, web-hooks) to this problem space
                                                                              3
Motivation

• Interactions with many SPOTs customers - Sun Modular Data Center, MIT,
  Warren Wilson College, USGS, Vodafone


• Common set of issues:
  - Data collection
  - Sharing
  - Privacy
  - Search
  - Collaborative analysis
  - Notifications




• Bring social networking technologies (e.g. tags, annotations, fine-grained
  access control, web-hooks) to this problem space
                                                                              3
Motivation

• Interactions with many SPOTs customers - Sun Modular Data Center, MIT,
  Warren Wilson College, USGS, Vodafone


• Common set of issues:
  - Data collection
  - Sharing
  - Privacy
  - Search
  - Collaborative analysis
  - Notifications




• Bring social networking technologies (e.g. tags, annotations, fine-grained
  access control, web-hooks) to this problem space
                                                                              3
Benefits

• Enables investigations into correlations that would otherwise be missed


• Enables easy sharing of data and analytical algorithms


• Enables data-centric collaboration: editing, annotation, discussion


• Frees up domain experts from the chore of setting up and managing an IT
  infrastructure




                                                                            4
Sensor.Network Overview

• Embrace heterogenous
  devices


• Lower barrier to usage


   • Easy, RESTful API


   • Fine-grained access
     control


• General platform for
  specialized applications



                             5
“Datastream” Abstraction

                           • A time-series of sensor values
                             sampled together.


                           • Decouples physical sensor from
                             high-level phenomenon of interest.


                           • A datastream may be fed by
                             different sensors at different times


                           • Has associated metadata and
                             privacy controls




                                                                    6
REST-based API

• Sensor.Network operations may be accessed via a browser or
  programmatically using HTTP operations


• Most operations require authentication--either password or API Key

Datastream creation example:

% curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” –request POST –header “Content-
type: application/xml” –data-binary “@Datastream.xml” “http://sensor.network.com/rest/resources/datastreams/”




<?xml version=”1.0”?>
<datastream>
  <name>My Pothos Plant</name>
  <description>Light and temperature readings from my office plant. </description>
  <tag>light</tag>
  <tag>temperature</tag>
  <value><name>light</name> <type>int</type> <units>lumen</units></value>
  <value><name>temperature</name> <type>float</type> <units>celsius</units> <min>-50.0</min>
<max>50.0</max></value>
</datastream>                                                                                                   7
REST-based API (more examples)

• Data insertion

 % curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” –request POST –header “Content-
 type: application/xml” –data-binary “@Data.xml” “http://sensor.network.com/rest/resources/datastreams/id/data”



                <?xml version=”1.0”?>
                <sampleData>
                  <sensorNodeId>0014.4F01.0000.01AB</sensorNodeId>
                  <timestamp>2009-07-30T13:31:37.459Z</timestamp>
                  <value>700</value>
                  <value>29.4</value>
                </sampleData>



• Data retrieval

 % curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” “http://sensor.network.com/rest/
 resources/datastreams/id/data” –header “Accept: text/plain”



                                                                                                                  8
Security

• Authentication


   • username/password for browser-based access


   • API key for programmatic access


• Authorization uses UNIX-like model based on user classes and access types




• HTTPS for confidentiality


• Target verification to avoid “alert spamming”

                                                                              9
“Task specific” Views (Dashboard)

• At-a-glance information on datastreams -- health, permissions




                                                                  10
“Task specific” Views (Map)

• Identifies geographical location with additional information in tabbed windows




                                                                              11
Visualizations
• LivePlots: Interactive visualizations, embeddable
  in external web pages


• Includes standard visualization types: line plots,
  bar charts, scatter plots


• Support for custom visualizations, e.g. dynamic
  map trace




                                                       12
Visualization (cont’d)

• Investigating


   • “Composite” visualizations


   • Privacy-enhanced visualizations
     (time-delayed, low-fidelity)




                                       13
Event Notifications

                     • Provides “push” functionality


                     • User can receive email, SMS or
                       HTTP Post (webhook) on events of
                       interest


                     • Events need not be data related,
                       e.g. “alert me when someone adds
                       me to a group”


                     • POST to .../notifications creates a
                       subscription request and returns Id


                     • Target verification
                                                        14
Ongoing Work

• Data-centric collaboration:
  - richer, privacy-aware visualizations,
  - visual annotation and editing


• Integration of statistical packages (e.g. R) as pluggable analysis modules


• Expansion of “bi-directional” capabilities:
  - Device management
  - General m2m communication, sleep-proxy (IETF CoRE)


• Sensor.Network as an application platform: third-party access to user data
  (delegated authorization)



                                                                               15
Lessons Learned

• Enable investigations into correlations that would otherwise be missed

      • Support device heterogeneity

      • Open API. Support both PUSH/PULL

• Enable easy sharing of data and analytical algorithms

      • Address privacy concerns

      • Provide tools for data-centric collaboration, sharing

• Lower barrier to usage by domain experts

      • Hide complex IT infrastructure behind a simple API

      • Provide simple abstractions
                                                                           16
Sun SPOT Giveaway

• 2 Sun SPOT kits (see http://www.sunspotworld.com) available


• Email a short (less than 2 pages) proposal to
  sensor.network@sun.com with the title
  “PerCom Giveaway” before noon Mar 31, 2010


   • Describe your project


   • Why Sun SPOTs would be a good match


   • How you’d share the results (e.g. report,
     open source, post on http://sunspotworld.com/forums)


• What would you do with the kit long term, e.g. rotate among members of a JUG,
  use to teach a class etc.
                                                                                  17
Q&A




      18

Early Lessons from Building Sensor.Network: An Open Data Exchange for the Web of Things

  • 1.
    Early Lessons fromBuilding Sensor.Network: An Open Data Exchange for the Web of Things Vipul Gupta, Poorna Udupi, Arshan Poursohi {vipul.x.gupta, poorna.udupi, arshan.poursohi}@oracle.com First International Workshop on the Web of Things (WoT 2010), PerCom 2010 1
  • 2.
    Overview • The Internetis now the Internet of Things ... data storage 2
  • 3.
    Overview • The Internetis now the Internet of Things ... data analysis 2
  • 4.
    Overview • The Internetis now the Internet of Things ... insights 2
  • 5.
    Overview • The Internetis now the Internet of Things ... actions 2
  • 6.
    Overview • The Internetis now the Internet of Things ... Sensor.Network: an open data-exchange for the Web of Things 2
  • 7.
    Motivation • Interactions withmany SPOTs customers - Sun Modular Data Center, MIT, Warren Wilson College, USGS, Vodafone • Common set of issues: - Data collection - Sharing - Privacy - Search - Collaborative analysis - Notifications • Bring social networking technologies (e.g. tags, annotations, fine-grained access control, web-hooks) to this problem space 3
  • 8.
    Motivation • Interactions withmany SPOTs customers - Sun Modular Data Center, MIT, Warren Wilson College, USGS, Vodafone • Common set of issues: - Data collection - Sharing - Privacy - Search - Collaborative analysis - Notifications • Bring social networking technologies (e.g. tags, annotations, fine-grained access control, web-hooks) to this problem space 3
  • 9.
    Motivation • Interactions withmany SPOTs customers - Sun Modular Data Center, MIT, Warren Wilson College, USGS, Vodafone • Common set of issues: - Data collection - Sharing - Privacy - Search - Collaborative analysis - Notifications • Bring social networking technologies (e.g. tags, annotations, fine-grained access control, web-hooks) to this problem space 3
  • 10.
    Motivation • Interactions withmany SPOTs customers - Sun Modular Data Center, MIT, Warren Wilson College, USGS, Vodafone • Common set of issues: - Data collection - Sharing - Privacy - Search - Collaborative analysis - Notifications • Bring social networking technologies (e.g. tags, annotations, fine-grained access control, web-hooks) to this problem space 3
  • 11.
    Benefits • Enables investigationsinto correlations that would otherwise be missed • Enables easy sharing of data and analytical algorithms • Enables data-centric collaboration: editing, annotation, discussion • Frees up domain experts from the chore of setting up and managing an IT infrastructure 4
  • 12.
    Sensor.Network Overview • Embraceheterogenous devices • Lower barrier to usage • Easy, RESTful API • Fine-grained access control • General platform for specialized applications 5
  • 13.
    “Datastream” Abstraction • A time-series of sensor values sampled together. • Decouples physical sensor from high-level phenomenon of interest. • A datastream may be fed by different sensors at different times • Has associated metadata and privacy controls 6
  • 14.
    REST-based API • Sensor.Networkoperations may be accessed via a browser or programmatically using HTTP operations • Most operations require authentication--either password or API Key Datastream creation example: % curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” –request POST –header “Content- type: application/xml” –data-binary “@Datastream.xml” “http://sensor.network.com/rest/resources/datastreams/” <?xml version=”1.0”?> <datastream> <name>My Pothos Plant</name> <description>Light and temperature readings from my office plant. </description> <tag>light</tag> <tag>temperature</tag> <value><name>light</name> <type>int</type> <units>lumen</units></value> <value><name>temperature</name> <type>float</type> <units>celsius</units> <min>-50.0</min> <max>50.0</max></value> </datastream> 7
  • 15.
    REST-based API (moreexamples) • Data insertion % curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” –request POST –header “Content- type: application/xml” –data-binary “@Data.xml” “http://sensor.network.com/rest/resources/datastreams/id/data” <?xml version=”1.0”?> <sampleData> <sensorNodeId>0014.4F01.0000.01AB</sensorNodeId> <timestamp>2009-07-30T13:31:37.459Z</timestamp> <value>700</value> <value>29.4</value> </sampleData> • Data retrieval % curl –dump-header hdrs.txt –header “X-SensorNetworkAPIKey: apiKey” “http://sensor.network.com/rest/ resources/datastreams/id/data” –header “Accept: text/plain” 8
  • 16.
    Security • Authentication • username/password for browser-based access • API key for programmatic access • Authorization uses UNIX-like model based on user classes and access types • HTTPS for confidentiality • Target verification to avoid “alert spamming” 9
  • 17.
    “Task specific” Views(Dashboard) • At-a-glance information on datastreams -- health, permissions 10
  • 18.
    “Task specific” Views(Map) • Identifies geographical location with additional information in tabbed windows 11
  • 19.
    Visualizations • LivePlots: Interactivevisualizations, embeddable in external web pages • Includes standard visualization types: line plots, bar charts, scatter plots • Support for custom visualizations, e.g. dynamic map trace 12
  • 20.
    Visualization (cont’d) • Investigating • “Composite” visualizations • Privacy-enhanced visualizations (time-delayed, low-fidelity) 13
  • 21.
    Event Notifications • Provides “push” functionality • User can receive email, SMS or HTTP Post (webhook) on events of interest • Events need not be data related, e.g. “alert me when someone adds me to a group” • POST to .../notifications creates a subscription request and returns Id • Target verification 14
  • 22.
    Ongoing Work • Data-centriccollaboration: - richer, privacy-aware visualizations, - visual annotation and editing • Integration of statistical packages (e.g. R) as pluggable analysis modules • Expansion of “bi-directional” capabilities: - Device management - General m2m communication, sleep-proxy (IETF CoRE) • Sensor.Network as an application platform: third-party access to user data (delegated authorization) 15
  • 23.
    Lessons Learned • Enableinvestigations into correlations that would otherwise be missed • Support device heterogeneity • Open API. Support both PUSH/PULL • Enable easy sharing of data and analytical algorithms • Address privacy concerns • Provide tools for data-centric collaboration, sharing • Lower barrier to usage by domain experts • Hide complex IT infrastructure behind a simple API • Provide simple abstractions 16
  • 24.
    Sun SPOT Giveaway •2 Sun SPOT kits (see http://www.sunspotworld.com) available • Email a short (less than 2 pages) proposal to [email protected] with the title “PerCom Giveaway” before noon Mar 31, 2010 • Describe your project • Why Sun SPOTs would be a good match • How you’d share the results (e.g. report, open source, post on http://sunspotworld.com/forums) • What would you do with the kit long term, e.g. rotate among members of a JUG, use to teach a class etc. 17
  • 25.
    Q&A 18