Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
DiscoWoT - Extensible Discovery for Smart Things
1. An Extensible Discovery Service for Smart Things
Mayer, S. and Guinard, D. 2011, 2nd international Workshop on the Web of Things
Simon Mayer [simon.mayer@inf.ethz.ch]
Distributed Systems Group, ETH Zurich
2. Environments of smart things...
Temperature: 24˚C Please configure
forecast data source
Human-readable and understandable
Your fridge currently
consumes 45W
Forecast: Rain
I’m located in Zurich!
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 2
3. Environments of smart things...
Temperature: 24˚C Please configure
forecast data source
What about machines?
Your fridge currently
consumes 45W
Forecast: Rain
I’m located in Zurich!
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 3
4. Semantic annotation of smart things...
…<div itemscope><div ...
Temperature: 24˚C
itemprop=“tag=“>Illumination</div><div
itemprop=“value”>150</div></div>…
Machine-readable
{“consumption”:”45”,
{“data”:[{“weather- “unit”:”Watts”,
forecast”:”Rain”}], “appliance”:”fridge”}
“name”:”MyNabaztag”}
<div class="geo">GEO: <span
class="latitude">8.549902</span>,
<span class="longitude">-
I’m located in Zurich!
47.378088</span></span></div>
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 4
5. Semantic annotation of smart things...
…<div itemscope><div ...
Content type: text/html
itemprop=“tag=“>Illumination</div><div
Annotations: Microdata
itemprop=“value”>150</div></div>…
Every smart device capable of
parsing every single format...?
{“consumption”:”45”,
{“data”:[{“weather- Content type:
“unit”:”Watts”,
forecast”:”Rain”}],
Content type: application/json application/json
“appliance”:”fridge”}
“name”:”MyNabaztag”}
<div class="geo">GEO: <span
class="latitude">8.549902</span>,
Content type: text/html
<span class="longitude">-
Annotations: Microformats
47.378088</span></span></div>
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 5
6. And it gets worse...
Imagine we agreed on everybody using application/json...
{“data”:[{“weather-forecast”:”Rain”}],
“name”:”MyNabaztag”}
{“data-item”:[{“weather-forecast”:”Rain”}],
“name”:”MyNabaztag”}
Different syntax
{“data”:{“weather-forecast”:”Rain”},
Content type: “name”:”MyNabaztag”}
application/json Different formatting
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 6
7. Options for semantically annotating smart things
Or multiple (but few!) formats
A single, agreed upon,
standard format
Problem of different syntax
Probably not feasible...
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 7
8. Options for semantically annotating smart things
A method to understand
multiple different formats
Different Syntax: OK!
Future formats?
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 8
9. Options for semantically annotating smart things
An extensible method to
understand multiple
different formats
Different Syntax: OK!
Future formats: OK!
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 9
10. Goal
Given the representation of a (Web) resource,
extract interesting information about that resource
regardless of the annotation format used
Approach
Discovery based on Strategies (e.g. Microformats-Strategy)
Users can create, extend (and delete) Strategies at runtime!
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 10
12. DiscoWoT: Discovery Process (1)
GET /analyze?http://.../Sensor
Client knows resource’s URL: http://.../Sensor
Requests a resource description at DiscoWoT’s /analyze endpoint
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 12
13. DiscoWoT: Discovery Process (2)
DiscoWoT fetches resource representation
Extraction of strategy input parameters
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 13
14. DiscoWoT: Discovery Process (3)
DiscoWoT applies registered strategies to the resource representation
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 14
15. DiscoWoT: Discovery Process (4)
{“services”:{“unit”:”ºC”,…},…}
If multiple strategies can map the representation, the resulting resource
descriptions are fused
The resulting resource description is returned
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 15
16. DiscoWoT: Discovery Process
How to access resources behind firewalls/protected resources
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 16
17. The DiscoWoT Project – Flexibility
GET /analyze?Token
Is Token a URL?
→ Try to fetch the content at its location!
→ Apply strategies to this content!
Is it text/html or application/json?
→ Apply strategies to Token itself
Apply every strategy to all information accessible about submitted data
Allows to handle resources behind firewalls and protected resources!
Client should not send URL but rather send contents at that URL
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 17
18. The DiscoWoT Project – Extensibility (1)
POST /strategies NewStrategy.java
POST /strategies/NewStrategy mapping
Users inject a new strategy by POSTing to the /strategies
endpoint
Users add a mapping to a strategy by POSTing to the
/strategies/{strategyID} endpoint
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 18
19. The DiscoWoT Project – Extensibility (1)
POST /strategies NewStrategy.java
POST /strategies/NewStrategy mapping
Strategy?
→ Basically parsers for different formats
→ Implement the DiscoveryStrategy interface
→ e.g. MicrodataStrategy
Mapping?
→ Maps to interpret parsed values
→ Multiple mappings per strategy
→ e.g. (“my_location” → “geo”)
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 19
20. The DiscoWoT Project – Extensibility (2)
POST /strategies/ <OpenSearch>...</>
Registration by sending an OpenSearch Document
Mighty Google as a fallback mechanism...
Allows to easily federate multiple DiscoWoT instances
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 20
21. Conclusions
An extensible discovery service for smart things
Based on multiple discovery strategies
No problems with firewalls/access restrictions
REST from tip to toe
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 21
22. Conclusions
Experience
A great help for
decoupling service
providers and consumers
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 22
23. Announcement Woohooo!
AutoWoT project now Open Source!
Check out http://code.google.com/p/autowot
Facilitating the Integration and Interaction of Real-World Services for the Web of Things (Mayer S., Guinard D., Trifa V.)
Upgrading Autowot (Barthels C., Bachelor’s Thesis)
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 23
24. Thank you for your attention!
Sunday, 12.06.2010 2nd International Workshop on the Web of Things, San Francisco (CA) 24