forked from w3c/wot-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Overview.html
1561 lines (1444 loc) · 121 KB
/
Overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
/* --- ISSUES/NOTES --- */
div.issue-title,
div.note-title,
div.ednote-title,
div.warning-title {
padding-right: 1em;
min-width: 7.5em;
color: #b9ab2d;
}
div.issue-title {
color: #e05252;
}
div.note-title,
div.ednote-title {
color: #2b2;
}
div.warning-title {
color: #f22;
}
div.issue-title span,
div.note-title span,
div.ednote-title span,
div.warning-title span {
text-transform: uppercase;
}
div.note,
div.issue,
div.ednote,
div.warning {
margin-top: 1em;
margin-bottom: 1em;
}
.note>p:first-child,
.ednote>p:first-child,
.issue>p:first-child,
.warning>p:first-child {
margin-top: 0
}
.issue,
.note,
.ednote,
.warning {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
}
div.issue,
div.note,
div.ednote,
div.warning {
padding: 1em 1.2em 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
span.note,
span.ednote,
span.issue,
span.warning {
padding: .1em .5em .15em;
}
.issue {
border-color: #e05252;
background: #fbe9e9;
}
.note,
.ednote {
border-color: #52e052;
background: #e9fbe9;
}
.warning {
border-color: #f11;
border-width: .2em;
border-style: solid;
background: #fbe9e9;
}
.warning-title:before {
content: "⚠";
/*U+26A0 WARNING SIGN*/
font-size: 3em;
float: left;
height: 100%;
padding-right: .3em;
vertical-align: top;
margin-top: -0.5em;
}
li.task-list-item {
list-style: none;
}
input.task-list-item-checkbox {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
</style>
<title>Web of Things (WoT) Architecture</title>
<style id="respec-mainstyle">
/*****************************************************************
* ReSpec 3 CSS
* Robin Berjon - http://berjon.com/
*****************************************************************/
/* Override code highlighter background */
.hljs {
background: transparent !important;
}
/* --- INLINES --- */
em.rfc2119 {
text-transform: lowercase;
font-style: normal;
color: #900;
}
h1 abbr,
h2 abbr,
h3 abbr,
h4 abbr,
h5 abbr,
h6 abbr,
a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: 1px solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
cite .bibref {
font-style: normal;
}
code {
color: #c83500;
}
th code {
color: inherit;
}
/* --- TOC --- */
.toc a,
.tof a {
text-decoration: none;
}
a .secno,
a .figno {
color: #000;
}
ul.tof,
ol.tof {
list-style: none outside none;
}
.caption {
margin-top: 0.5em;
font-style: italic;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd>p:first-child {
margin-top: 0;
}
.section dd>p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd,
.section dl.eldef dd {
margin-bottom: 0;
}
#issue-summary>ul,
.respec-dfn-list {
column-count: 2;
}
#issue-summary li,
.respec-dfn-list li {
list-style: none;
}
details.respec-tests-details {
margin-left: 1em;
display: inline-block;
vertical-align: top;
}
details.respec-tests-details>* {
padding-right: 2em;
}
details.respec-tests-details[open] {
z-index: 999999;
position: absolute;
border: thin solid #cad3e2;
border-radius: .3em;
background-color: white;
padding-bottom: .5em;
}
details.respec-tests-details[open]>summary {
border-bottom: thin solid #cad3e2;
padding-left: 1em;
margin-bottom: 1em;
line-height: 2em;
}
details.respec-tests-details>ul {
width: 100%;
margin-top: -0.3em;
}
details.respec-tests-details>li {
padding-left: 1em;
}
@media print {
.removeOnSave {
display: none;
}
}
</style>
<style>
/*
github.com style (c) Vasily Polovnyov <[email protected]>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-WD">
<link rel="canonical" href="https://www.w3.org/TR/wot-architecture/">
<script id="initialUserConfig" type="application/json">
{
"specStatus": "WD",
"processVersion": 2017,
"shortName": "wot-architecture",
"copyrightStart": 2017,
"wg": "Web of Things Working Group",
"wgURI": "https://www.w3.org/WoT/WG/",
"wgPublicList": "public-wot-wg",
"edDraftURI": "https://w3c.github.io/wot-architecture/",
"githubAPI": "https://api.github.com/repos/w3c/wot-architecture",
"issueBase": "https://www.github.com/w3c/wot-architecture/issues",
"editors": [{
"name": "Kazuo Kajimoto",
"w3cid": "74112",
"company": "Panasonic Corp.",
"companyURL": "https://www.panasonic.com/"
},
{
"name": "Matthias Kovatsch",
"w3cid": "75998",
"company": "Siemens AG",
"companyURL": "https://www.siemens.com/"
},
{
"name": "Uday Davuluru",
"w3cid": "92757",
"company": "RWE AG",
"companyURL": "https://www.lemonbeat.com/"
}
],
"otherLinks": [{
"key": "Contributors",
"data": [{
"value": "In the GitHub repository",
"href": "https://github.com/w3c/wot-architecture/graphs/contributors"
}]
},
{
"key": "Repository",
"data": [{
"value": "We are on GitHub",
"href": "https://github.com/w3c/wot-architecture/"
},
{
"value": "File a bug",
"href": "https://github.com/w3c/wot-architecture/issues"
}
]
}
],
"localBiblio": {
"CoRE-RD": {
"href": "https://tools.ietf.org/html/draft-ietf-core-resource-directory-11",
"title": "CoRE Resource Directory",
"status": "Internet-Draft",
"publisher": "IETF",
"date": "03 July 2017"
}
},
"publishISODate": "2017-09-14T00:00:00.000Z",
"generatedSubtitle": "First Public Working Draft 14 September 2017"
}
</script>
<meta name="generator" content="ReSpec 16.2.2">
<meta name="description" content="The W3C Web of Things (WoT) is intended to enable interoperability across IoT Platforms and application domains.
Primarily, it provides mechanisms to formally describe IoT interfaces
to allow IoT devices and services to communicate with each other,
independent of their underlying implementation,
and across multiple networking protocols.
Secondarily, it provides a standardized way to define and program IoT behavior.">
</head>
<body aria-busy="false" class="h-entry toc-inline" id="respecDocument">
<div class="head" role="contentinfo" id="respecHeader">
<p>
<a class="logo" href="https://www.w3.org/"><img src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" alt="W3C" width="72" height="48"></a>
</p>
<p></p>
<h1 class="title p-name" id="title">Web of Things (WoT) Architecture</h1>
<h2 id="w3c-first-public-working-draft-14-september-2017"><abbr title="World Wide Web Consortium">W3C</abbr> First Public Working Draft <time class="dt-published" datetime="2017-09-14">14 September 2017</time></h2>
<dl>
<dt>This version:</dt>
<dd><a class="u-url" href="https://www.w3.org/TR/2017/WD-wot-architecture-20170914/">https://www.w3.org/TR/2017/WD-wot-architecture-20170914/</a></dd>
<dt>Latest published version:</dt>
<dd><a href="https://www.w3.org/TR/wot-architecture/">https://www.w3.org/TR/wot-architecture/</a></dd>
<dt>Latest editor's draft:</dt>
<dd><a href="https://w3c.github.io/wot-architecture/">https://w3c.github.io/wot-architecture/</a></dd>
<dt>Editors:</dt>
<dd class="p-author h-card vcard" data-editor-id="74112"><span class="p-name fn">Kazuo Kajimoto</span>, <a class="p-org org h-org h-card" href="https://www.panasonic.com/">Panasonic Corp.</a></dd>
<dd class="p-author h-card vcard" data-editor-id="75998"><span class="p-name fn">Matthias Kovatsch</span>, <a class="p-org org h-org h-card" href="https://www.siemens.com/">Siemens AG</a></dd>
<dd class="p-author h-card vcard" data-editor-id="92757"><span class="p-name fn">Uday Davuluru</span>, <a class="p-org org h-org h-card" href="https://www.lemonbeat.com/">RWE AG</a></dd>
<dt>Contributors:</dt>
<dd>
<a href="https://github.com/w3c/wot-architecture/graphs/contributors">
In the GitHub repository
</a>
</dd>
<dt>Repository:</dt>
<dd>
<a href="https://github.com/w3c/wot-architecture/">
We are on GitHub
</a>
</dd>
<dd>
<a href="https://github.com/w3c/wot-architecture/issues">
File a bug
</a>
</dd>
</dl>
<p class="copyright">
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2017
<a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="https://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>).
<abbr title="World Wide Web Consortium">W3C</abbr> <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
<a rel="license" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory">
<h2 id="abstract-0">Abstract</h2>
<p>
The <abbr title="World Wide Web Consortium">W3C</abbr> Web of Things (WoT) is intended to enable interoperability across IoT Platforms and application domains. Primarily, it provides mechanisms to formally describe IoT interfaces to allow
IoT devices and services to communicate with each other, independent of their underlying implementation, and across multiple networking protocols. Secondarily, it provides a standardized way to define and program IoT behavior.
</p>
<p>
This document describes the abstract architecture for the <abbr title="World Wide Web Consortium">W3C</abbr> Web of Things. It is derived from a set of use cases and can be mapped onto a variety of concrete deployment scenarios, several examples
of which are given. This document is focused on the standardization scope of <abbr title="World Wide Web Consortium">W3C</abbr> WoT, which consists of three initial building blocks that are briefly introduced and their interplay explained.
</p>
<p>
The WoT Thing Description (TD) provides a formal mechanism to describe the network interface provided by IoT devices and services, independent of their implementation. Provision of a TD is the primary requirement for a device to participate in the Web
of Things. In fact, defining a Thing Description for an existing device allows that device to participate in the Web of Things without having to make any modifications to the device itself. WoT Binding Templates define how a WoT device communicates
using a concrete protocol. The WoT Scripting API—whose use is not mandatory—provides a convenient mechanism to discover, consume, and expose Things based on the WoT Thing Description.
</p>
<p>
Other non-normative architectural blocks and conditions underlying the Web of Things are also described in the context of deployment scenarios. In particular, recommendations for security and privacy are included, while the goal is to preserve and support
existing device mechanisms and properties. In general, <abbr title="World Wide Web Consortium">W3C</abbr> WoT is designed to describe what exists rather than to prescribe what to implement.
</p>
</section>
<section id="sotd" class="introductory">
<h2 id="status-of-this-document">Status of This Document</h2>
<p>
<em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at https://www.w3.org/TR/.</em>
</p>
<div class="ednote">
<div class="ednote-title marker" aria-level="3" role="heading" id="h-ednote1"><span>Editor's note</span><span style="text-transform: none">: The W3C WoT WG is asking for feedback</span></div>
<p class="">
Please contribute to this draft using the <a href="https://github.com/w3c/wot-architecture/issues">GitHub Issue</a> feature of the <a href="https://github.com/w3c/wot-architecture/">WoT Architecture</a> repository. For feedback on security
and privacy considerations, please use the <a href="https://github.com/w3c/wot-security/issues">WoT Security and Privacy</a> Issues, as they are cross-cutting over all our documents.
</p>
</div>
<p>
This document was published by the <a href="https://www.w3.org/WoT/WG/">Web of Things Working Group</a> as a First Public Working Draft.
This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
</p>
<p>
Comments regarding this document are welcome. Please send them to
<a href="mailto:[email protected]">[email protected]</a> (<a href="mailto:[email protected]?subject=subscribe">subscribe</a>,
<a href="https://lists.w3.org/Archives/Public/public-wot-wg/">archives</a>).
</p>
<p>
Publication as a First Public Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate
to cite this document as other than work in progress.
</p>
<p>
This document was produced by a group operating under the
<a href="https://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/95969/status" rel="disclosure">public list of any patent
disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
<a href="https://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with
<a href="https://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
</p>
<p>This document is governed by the <a id="w3c_process_revision" href="https://www.w3.org/2017/Process-20170301/">1 March 2017 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
</p>
</section>
<nav id="toc">
<h2 class="introductory" id="table-of-contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li>
<li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">2. </span>Terminology</a></li>
<li class="tocline"><a href="#sec-use-cases" class="tocxref"><span class="secno">3. </span>Use Cases</a>
<ol class="toc">
<li class="tocline"><a href="#smart-home" class="tocxref"><span class="secno">3.1 </span>Smart Home</a>
<ol class="toc">
<li class="tocline"><a href="#device-controllers" class="tocxref"><span class="secno">3.1.1 </span>Device Controllers</a></li>
<li class="tocline"><a href="#thing-to-thing" class="tocxref"><span class="secno">3.1.2 </span>Thing-to-Thing</a></li>
<li class="tocline"><a href="#multiple-network-interfaces" class="tocxref"><span class="secno">3.1.3 </span>Multiple Network Interfaces</a></li>
<li class="tocline"><a href="#gateways" class="tocxref"><span class="secno">3.1.4 </span>Gateways</a></li>
<li class="tocline"><a href="#cloud-proxies" class="tocxref"><span class="secno">3.1.5 </span>Cloud Proxies</a>
<ol class="toc">
<li class="tocline"><a href="#cloud-ready-devices" class="tocxref"><span class="secno">3.1.5.1 </span>Cloud-ready Devices</a></li>
<li class="tocline"><a href="#legacy-devices" class="tocxref"><span class="secno">3.1.5.2 </span>Legacy Devices</a></li>
</ol>
</li>
</ol>
</li>
<li class="tocline"><a href="#smart-factory-0" class="tocxref"><span class="secno">3.2 </span>Smart Factory</a></li>
<li class="tocline"><a href="#connected-car-0" class="tocxref"><span class="secno">3.3 </span>Connected Car</a></li>
</ol>
</li>
<li class="tocline"><a href="#sec-requirements" class="tocxref"><span class="secno">4. </span>Functional Requirements</a>
<ol class="toc">
<li class="tocline"><a href="#sec-requirements-flexibility" class="tocxref"><span class="secno">4.1 </span>Flexibility</a></li>
<li class="tocline"><a href="#sec-requirements-compatibility" class="tocxref"><span class="secno">4.2 </span>Compatibility</a></li>
<li class="tocline"><a href="#sec-requirements-security" class="tocxref"><span class="secno">4.3 </span>Security and Privacy</a></li>
</ol>
</li>
<li class="tocline"><a href="#sec-building-blocks" class="tocxref"><span class="secno">5. </span>WoT Building Blocks</a>
<ol class="toc">
<li class="tocline"><a href="#sec-building-blocks-thing" class="tocxref"><span class="secno">5.1 </span>Thing</a></li>
<li class="tocline"><a href="#sec-building-blocks-thing-description" class="tocxref"><span class="secno">5.2 </span>WoT Thing Description</a></li>
<li class="tocline"><a href="#sec-building-blocks-binding-templates" class="tocxref"><span class="secno">5.3 </span>WoT Binding Templates</a></li>
<li class="tocline"><a href="#sec-building-blocks-scripting-api" class="tocxref"><span class="secno">5.4 </span>WoT Scripting API</a></li>
</ol>
</li>
<li class="tocline"><a href="#sec-servient-architecture" class="tocxref"><span class="secno">6. </span>WoT Servient Architecture</a>
<ol class="toc">
<li class="tocline"><a href="#application" class="tocxref"><span class="secno">6.1 </span>Application</a></li>
<li class="tocline"><a href="#wot-scripting-api" class="tocxref"><span class="secno">6.2 </span>WoT Scripting API</a></li>
<li class="tocline"><a href="#wot-runtime" class="tocxref"><span class="secno">6.3 </span>WoT Runtime</a></li>
<li class="tocline"><a href="#protocol-bindings" class="tocxref"><span class="secno">6.4 </span>Protocol Bindings</a></li>
<li class="tocline"><a href="#system-api" class="tocxref"><span class="secno">6.5 </span>System API</a></li>
<li class="tocline"><a href="#wot-in-the-web-browser" class="tocxref"><span class="secno">6.6 </span>WoT in the Web Browser</a></li>
</ol>
</li>
<li class="tocline"><a href="#wot-deployment-scenarios-and-guidelines" class="tocxref"><span class="secno">7. </span>WoT Deployment Scenarios and Guidelines</a>
<ol class="toc">
<li class="tocline"><a href="#wot-client" class="tocxref"><span class="secno">7.1 </span>WoT Client</a></li>
<li class="tocline"><a href="#servient-on-device" class="tocxref"><span class="secno">7.2 </span>Servient on Device</a></li>
<li class="tocline"><a href="#servient-on-smartphone" class="tocxref"><span class="secno">7.3 </span>Servient on Smartphone</a></li>
<li class="tocline"><a href="#servient-on-gateway" class="tocxref"><span class="secno">7.4 </span>Servient on Gateway</a></li>
<li class="tocline"><a href="#servient-on-cloud-and-gateway" class="tocxref"><span class="secno">7.5 </span>Servient on Cloud and Gateway</a></li>
<li class="tocline"><a href="#servient-on-cloud-server" class="tocxref"><span class="secno">7.6 </span>Servient on Cloud Server</a></li>
</ol>
</li>
<li class="tocline"><a href="#sec-security-considerations" class="tocxref"><span class="secno">8. </span>Security and Privacy Considerations</a></li>
<li class="tocline"><a href="#summary" class="tocxref"><span class="secno">9. </span>Summary</a></li>
<li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li>
<li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a>
<ol class="toc">
<li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li>
<li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li>
</ol>
</li>
</ol>
</nav>
<section id="introduction">
<!--OddPage-->
<h2 id="x1.-introduction"><span class="secno">1. </span>Introduction</h2>
<p>
The "Web of Things" (WoT) started as an academic initiative in the form of publications and, starting in 2010, a yearly <a href="https://webofthings.org/events/">International Workshop on the Web of Things</a>. Its goal is to improve interoperability
as well as usability in the Internet of Things (IoT). With the increasing role of IoT services using other web standards in commercial and industrial applications, the <abbr title="World Wide Web Consortium">W3C</abbr> chartered an <a href="https://www.w3.org/WoT/IG/">Interest Group</a> in 2015 to identify technological building blocks for Recommendation Track standardization. With the WoT <a href="https://www.w3.org/WoT/WG/">Working Group</a> chartered end of 2016, the first set of WoT building blocks is now being standardized:
</p>
<ul>
<li>the <a href="https://w3c.github.io/wot-thing-description/">WoT Thing Description</a>,</li>
<li>the <a href="https://w3c.github.io/wot-binding-templates/">WoT Binding Templates</a>, and</li>
<li>the <a href="https://w3c.github.io/wot-scripting-api/">WoT Scripting API</a>.</li>
</ul>
<p>
This document serves as an umbrella for the <abbr title="World Wide Web Consortium">W3C</abbr> WoT draft specifications and defines the basics such as terminology and the underlying abstract architecture of the <abbr title="World Wide Web Consortium">W3C</abbr> Web of Things. In particular, the purpose of this document is to provide
</p>
<ul>
<li>a set of use cases that lead to the <abbr title="World Wide Web Consortium">W3C</abbr> WoT Architecture,
</li>
<li>a set of requirements for WoT implementations,</li>
<li>an overview of the WoT building blocks being standardized and their interplay,</li>
<li>a guideline to map the abstract architecture to software stacks and hardware components,</li>
<li>and security considerations to be aware of when implementing WoT building blocks.</li>
</ul>
</section>
<section id="terminology">
<!--OddPage-->
<h2 id="x2.-terminology"><span class="secno">2. </span>Terminology</h2>
<p>
This document uses the following terms as defined here. The WoT prefix is used to avoid ambiguity for terms that are defined specifically for Web of Things concepts.
</p>
<div class="ednote">
<div class="ednote-title marker" aria-level="3" role="heading" id="h-ednote2"><span>Editor's note</span></div>
<p class="">
Please refer to <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md">this markdown file</a>. Once the terminology definitions are stable, they will be included here.
</p>
</div>
</section>
<section id="sec-use-cases" class="informative">
<!--OddPage-->
<h2 id="x3.-use-cases"><span class="secno">3. </span>Use Cases</h2>
<p><em>This section is non-normative.</em></p>
<p>
This section presents the use cases targeted by the <abbr title="World Wide Web Consortium">W3C</abbr> WoT and which are used to derive the abstract architecture discussed in <a href="#sec-building-blocks" class="sec-ref"><span class="secno">5.</span> <span class="sec-title">WoT Building Blocks</span></a>.
While Smart Home use cases might appear predominant in this section, they should be seen as simply a vehicle to identify fundamental requirements inherent to most application domains. The Smart Home domain is suitable for identifying such
general requirements, as most stakeholders can relate to it.
</p>
<section id="smart-home">
<h3 id="x3.1-smart-home"><span class="secno">3.1 </span>Smart Home</h3>
<p>
The Smart Home is one of the application domains targeted by <abbr title="World Wide Web Consortium">W3C</abbr> WoT. As stated above its use cases are eligible to convey the fundamental requirements on discovery, connectivity, and provided
functionality. Also security has become a central issue in consumer systems. Furthermore, Smart Home use cases have stronger privacy requirements than commercial and industrial ones. In general, however, the fundamental aspects of the
Smart Home use cases given also apply to other use cases.
</p>
<section id="device-controllers">
<h4 id="x3.1.1-device-controllers"><span class="secno">3.1.1 </span>Device Controllers</h4>
<p>
The first use case is a local device controlled by user-operated remote controller as depicted in <a href="#smart-home-deive" class="fig-ref">Figure <span class="figno">1</span> <span class="fig-title">Device Control</span></a>. For
example, an electronic appliance such as an air conditioner with Web server functionality might be connected directly to a local home network. A remote controller can access the air conditioner through the local home network directly.
In this case, the remote controller can be realized by a browser or native application.
</p>
<figure id="smart-home-deive">
<img src="images/smart-home-device.png" style="width: 500px;">
<figcaption>Figure <span class="figno">1</span> <span class="fig-title">Device Control</span></figcaption>
</figure>
</section>
<section id="thing-to-thing">
<h4 id="x3.1.2-thing-to-thing"><span class="secno">3.1.2 </span>Thing-to-Thing</h4>
<p>
<a href="#smart-home-t2t" class="fig-ref">Figure <span class="figno">2</span> <span class="fig-title">Control Agent</span></a> shows an example of direct Thing-to-Thing interaction. The scenario is as follows: when a sensor detects
the room temperature is surpassing a set threshold (e.g., 25°C), a control agent issues a "power-on" command to an air conditioner.
</p>
<figure id="smart-home-t2t">
<img src="images/smart-home-t2t.png" style="width: 500px;">
<figcaption>Figure <span class="figno">2</span> <span class="fig-title">Control Agent</span></figcaption>
</figure>
</section>
<section id="multiple-network-interfaces">
<h4 id="x3.1.3-multiple-network-interfaces"><span class="secno">3.1.3 </span>Multiple Network Interfaces</h4>
<p>
The third use case is a mobile remote controller (e.g., on a smartphone) as shown in <a href="#smart-home-multi" class="fig-ref">Figure <span class="figno">3</span> <span class="fig-title">Multiple Network Interfaces</span></a>. When
at home, the smartphone can use Wi-Fi or Bluetooth/BLE to control an electronic appliance locally, while outside, it can use the cellular network.
</p>
<figure id="smart-home-multi">
<img src="images/smart-home-multi.png" style="width: 500px;">
<figcaption>Figure <span class="figno">3</span> <span class="fig-title">Multiple Network Interfaces</span></figcaption>
</figure>
</section>
<section id="gateways">
<h4 id="x3.1.4-gateways"><span class="secno">3.1.4 </span>Gateways</h4>
<p>
<a href="#smart-home-gateway" class="fig-ref">Figure <span class="figno">4</span> <span class="fig-title">Smart Home Gateway</span></a> shows a use case based on a Smart Home gateway. It is placed between a home network and the Internet.
The gateway manages electronic appliances inside the house and can receive commands from a remote controller over the Internet, e.g., from a smartphone as in the previous use case.
</p>
<figure id="smart-home-gateway">
<img src="images/smart-home-gateway.png" style="width: 500px;">
<figcaption>Figure <span class="figno">4</span> <span class="fig-title">Smart Home Gateway</span></figcaption>
</figure>
</section>
<section id="cloud-proxies">
<h4 id="x3.1.5-cloud-proxies"><span class="secno">3.1.5 </span>Cloud Proxies</h4>
<p>
Cloud proxies can be realized in different ways:
</p>
<div class="ednote">
<div class="ednote-title marker" aria-level="5" role="heading" id="h-ednote3"><span>Editor's note</span></div>
<p class="">
The complexity of the use cases here increases too quickly. They will be split up to progressively add and explain each new feature.
</p>
</div>
<section id="cloud-ready-devices">
<h5 id="x3.1.5.1-cloud-ready-devices"><span class="secno">3.1.5.1 </span>Cloud-ready Devices</h5>
<p>
<a href="#smart-home-cloud1" class="fig-ref">Figure <span class="figno">5</span> <span class="fig-title">Proxies with Cloud-ready Devices</span></a> shows an example where electronic appliances are connected directly to the cloud.
The cloud mirrors the appliances and, acting as a proxy, can receive commands from remote controllers (e.g., a smartphone). Authorized controllers can be located anywhere, as the proxy is globally reachable.
</p>
<figure id="smart-home-cloud1">
<img src="images/smart-home-cloud1.png" style="width: 500px;">
<figcaption>Figure <span class="figno">5</span> <span class="fig-title">Proxies with Cloud-ready Devices</span></figcaption>
</figure>
</section>
<section id="legacy-devices">
<h5 id="x3.1.5.2-legacy-devices"><span class="secno">3.1.5.2 </span>Legacy Devices</h5>
<p>
<a href="#smart-home-cloud2" class="fig-ref">Figure <span class="figno">6</span> <span class="fig-title">Proxies with Legacy Devices</span></a> shows an example where legacy electronic appliances cannot directly connect to the
cloud. Here, a gateway is needed to relay the connection. The gateway works as:
</p>
<ul>
<li>integrator of a variety of legacy communication protocols both in the physical and logical view</li>
<li>firewall toward the Internet</li>
<li>privacy filter which substitutes real image and/or speech, and logs data locally</li>
<li>local agent in case the Internet connection is interrupted</li>
<li>emergency services running locally when fire alarms and similar events occur</li>
</ul>
<p>
The cloud mirrors the gateway with all connected appliances and acts as an agent that manages them in the cloud in conjunction with the gateway. Furthermore, the cloud can receive commands from remote controllers (e.g., a smartphone), which can be located
anywhere.
</p>
<figure id="smart-home-cloud2">
<img src="images/smart-home-cloud2.png" style="width: 500px;">
<figcaption>Figure <span class="figno">6</span> <span class="fig-title">Proxies with Legacy Devices</span></figcaption>
</figure>
</section>
</section>
</section>
<section id="smart-factory-0">
<h3 id="x3.2-smart-factory"><span class="secno">3.2 </span>Smart Factory</h3>
<p>
<a href="#smart-factory" class="fig-ref">Figure <span class="figno">7</span> <span class="fig-title">Smart Factory</span></a> shows an example of a Smart Factory. In this case, cell controllers automate factory equipment with specialized
communication such as RS-485 or EtherCAT. Line controllers orchestrate multiple cell controllers over IP-based networks. A factory controller integrates different line controllers. A cloud service collects data from the factory controller
and analyzes them for predictive maintenance. Users can monitor the factory through a dashboard. Note that factories usually do not reveal the internal topology of their lines and cells.
</p>
<figure id="smart-factory">
<img src="images/smart-factory.png" style="width: 640px;">
<figcaption>Figure <span class="figno">7</span> <span class="fig-title">Smart Factory</span></figcaption>
</figure>
</section>
<section id="connected-car-0">
<h3 id="x3.3-connected-car"><span class="secno">3.3 </span>Connected Car</h3>
<p>
<a href="#connected-car" class="fig-ref">Figure <span class="figno">8</span> <span class="fig-title">Connected Car</span></a> shows an example of a Connected Car. In this case, a gateway connects to car components through CAN and to the
car navigation system through a proprietary interface. Services running in the cloud collect data pushed from car components and analyze the data from multiple cars to determine traffic patterns. The gateway can also consume cloud services,
in this case, to get traffic data and show it to the driver through the car navigation system.
</p>
<figure id="connected-car">
<img src="images/connected-car.png" style="width: 500px;">
<figcaption>Figure <span class="figno">8</span> <span class="fig-title">Connected Car</span></figcaption>
</figure>
</section>
</section>
<section id="sec-requirements" class="informative">
<!--OddPage-->
<h2 id="x4.-functional-requirements"><span class="secno">4. </span>Functional Requirements</h2>
<p><em>This section is non-normative.</em></p>
<p>
This section defines the properties required in an abstract Web of Things (WoT) architecture.
</p>
<section id="sec-requirements-flexibility">
<h3 id="x4.1-flexibility"><span class="secno">4.1 </span>Flexibility</h3>
<p>
There are a wide variety of physical device configurations for WoT implementations. The WoT abstract architecture should be able to be mapped to and cover all of the variations.
</p>
</section>
<section id="sec-requirements-compatibility">
<h3 id="x4.2-compatibility"><span class="secno">4.2 </span>Compatibility</h3>
<p>
We already have many existing IoT solutions and ongoing IoT standardization activities in many business fields. The WoT should provide a bridge between these existing and developing IoT solutions and Web technology based on WoT concepts. The WoT should
be upwards compatible with existing IoT solutions and current standards.
</p>
</section>
<section id="sec-requirements-security">
<h3 id="x4.3-security-and-privacy"><span class="secno">4.3 </span>Security and Privacy</h3>
<div class="ednote">
<div class="ednote-title marker" aria-level="4" role="heading" id="h-ednote4"><span>Editor's note</span></div>
<p class="">
This section will likely undergo significant revision and reorganization. Please see the
<a href="https://github.com/w3c/wot-security/">WoT Security and Privacy</a> repository for work in progress. In particular, the <a href="https://github.com/w3c/wot-security/blob/master/wot-threat-model.md">WoT Threat Model</a> defines
the main WoT security stakeholders, assets, attack surfaces, and threats.
</p>
</div>
<p>
<!-- Requirements -->
The functional WoT architecture should enable the use of best practices in security and privacy.
<!-- TODO: "best practices" needs a citation.
IIC Security Framework works for industrial use cases; what about home? -->
Generally, the WoT security architecture must support the goals and mechanisms of the IoT protocols and systems it connects to. These systems vary in their security requirements and risk tolerance, so security mechanisms will also vary based on these
factors. However, the WoT architecture needs to do no harm: it should support security and privacy at least as well as the systems it connects to.
</p>
<p>
<!-- Definition -->
Security means the system should preserve its integrity and functionality even when subject to attack. Privacy means that the system should maintain the confidentiality of personally identifiable information. In general, security and privacy cannot be
guaranteed but the WoT architecture should support best practices.
</p>
<p>
<!-- Motivation -->
Security and privacy are especially important in the IoT domain since IoT devices need to operate autonomously and in many cases have access to both personal data and/or can be in control of safety-critical systems. Compared to personal systems, IoT devices
are subject to different and in some cases higher risks than IT systems. It is also important to protect IoT systems so that they can not be used to launch attacks on other computer systems.
</p>
</section>
</section>
<section id="sec-building-blocks">
<!--OddPage-->
<h2 id="x5.-wot-building-blocks"><span class="secno">5. </span>WoT Building Blocks</h2>
<p>
This section presents the initial WoT building blocks that build up the abstract architecture for the Web of Things. This architecture is derived from the use cases in Section <a href="#sec-use-cases" class="sec-ref"><span class="secno">3.</span> <span class="sec-title">Use Cases</span></a> and the requirements in Section <a href="#sec-requirements" class="sec-ref"><span class="secno">4.</span> <span class="sec-title">Functional Requirements</span></a>.
<a href="#architecture-abstract" class="fig-ref">Figure <span class="figno">9</span> <span class="fig-title">Abstract Architecture of <abbr title="World Wide Web Consortium">W3C</abbr> WoT</span></a> summarizes the high-level goals and requirements
and shows the three levels where the WoT building blocks can be applied:
</p>
<ul>
<li>the device level,</li>
<li>the gateway level (or "edge"), and</li>
<li>the cloud level.</li>
</ul>
<figure id="architecture-abstract">
<img src="images/architecture-abstract.png" style="width: 100%;">
<figcaption>Figure <span class="figno">9</span> <span class="fig-title">Abstract Architecture of <abbr title="World Wide Web Consortium">W3C</abbr> WoT</span></figcaption>
</figure>
<p>
<a href="#architecture-concept" class="fig-ref">Figure <span class="figno">10</span> <span class="fig-title">Conceptional Architecture of the WoT Building Blocks</span></a> shows a conceptional view of how a component in the WoT Architecture
makes use of the WoT building blocks. Each block is described in more detail in the following sections.
</p>
<figure id="architecture-concept">
<img src="images/architecture-concept.png" style="width: 640px;">
<figcaption>Figure <span class="figno">10</span> <span class="fig-title">Conceptional Architecture of the WoT Building Blocks</span></figcaption>
</figure>
<section id="sec-building-blocks-thing">
<h3 id="x5.1-thing"><span class="secno">5.1 </span>Thing</h3>
<p>
A <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a> is the abstraction of a physical or virtual entity that needs to be represented in IoT applications. This entity can be a device,
a logical component of a device, a local hardware component, or even a logical entity such as a location (e.g., room or building).
</p>
<p>
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Things</a> provide a network-facing API for interaction (<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-interface">WoT Interface</a>)
based on a formal model. These <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-interface">WoT Interfaces</a> are a superset of Web APIs, as <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Things</a> can also be available over non-Web protocols such as MQTT or ZigBee. The outward-facing <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-interface">WoT Interface</a> is not to be confused with
the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-scripting-api">Scripting API</a>, which is optional and interfaces with application scripts inside the software stack of a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a>.
</p>
<p>
There can be <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Things</a>, however, that do not provide a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-interface">WoT Interface</a> and only consist of metadata that is relevant to the application (e.g., the room in which devices are located). In <abbr title="World Wide Web Consortium">W3C</abbr> WoT however, a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a> must have a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Description</a>; therefore, everything that has a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Description</a> is a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a>.
</p>
</section>
<section id="sec-building-blocks-thing-description">
<h3 id="x5.2-wot-thing-description"><span class="secno">5.2 </span>WoT Thing Description</h3>
<p>
The <a href="https://w3c.github.io/wot-thing-description/">WoT Thing Description</a> (TD) is structured data that adheres to a formal model and closes the gap between Linked Data vocabularies and functional APIs of IoT systems. It can
be seen as the "HTML for Things". A <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TD</a> provides general metadata of a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a> as well as metadata about the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-interaction">Interactions</a>, data model, communication, and security mechanisms of a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a>.
Usually, <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TDs</a> make use of domain-specific metadata for which WoT provides explicit extension points. However, any <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-domain-specific-vocabulary">domain-specific vocabulary</a> is out-of-scope of the <abbr title="World Wide Web Consortium">W3C</abbr> standardization activity.
</p>
<p>
The <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">WoT Thing Description</a> is built around a formal <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-interaction-model">Interaction Model</a> that can support multiple messaging paradigms (i.e, request-response, publish-subscribe, and message passing). The default <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-interaction-pattern">Interaction Patterns</a> are <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-property">Property</a>, <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-action">Action</a>, and <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-event">Event</a>.
These were found to be able to cover the network-facing APIs provided by most IoT Platforms.
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-property">Properties</a> abstract data points that can be read and often written.
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-action">Actions</a> abstract invokable processes that may run for a certain time; yet they can also abstract RPC-like interactions in general.
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-event">Events</a> abstract interactions where the remote endpoint pushes data asynchronously.
</p>
<p>
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Descriptions</a> are serialized to JSON-LD [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>] by default.
More serialization formats are planned in the future, in particular more concise formats for resource-constrained <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Things</a>. For now, JSON-LD
offers a good trade-off between machine-understandable semantics and usability for developers.
</p>
<p>
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Descriptions</a> can be managed in
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-directory">Thing Directories</a>, which are aligned with the CoRE Resource Directory [<cite><a class="bibref" href="#bib-CoRE-RD">CoRE-RD</a></cite>].
They provide a Web interface for registration, registration updates, and removal, and automatic removal after a given lifetime expired without registration update.
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-directory">Thing Directories</a> also provide a Web interface for lookups, usually including a SPARQL endpoint for semantic queries in addition
to simple CoRE Resource Directory [<cite><a class="bibref" href="#bib-CoRE-RD">CoRE-RD</a></cite>] lookups.
</p>
<p>
The <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">WoT Thing Description</a> fosters interoperability in two ways: First, and foremost, <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TDs</a> enable machine-to-machine communication in the Web of Things. Second, <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TDs</a> can serve as a common, uniform format for developers to document
and retrieve all details necessary to access IoT devices and make use of their data.
</p>
</section>
<section id="sec-building-blocks-binding-templates">
<h3 id="x5.3-wot-binding-templates"><span class="secno">5.3 </span>WoT Binding Templates</h3>
<p>
A great challenge for the WoT is to enable interactions with a myriad of different IoT Platforms (e.g., OCF, oneM2M, RESTful devices not following any particular standard but providing an HTTP or CoAP interface, etc.). The IoT uses a variety of protocols
for accessing devices, since no one protocol is appropriate in all contexts.
<abbr title="World Wide Web Consortium">W3C</abbr> WoT is tackling this variety by including communication metadata in the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Description</a>.
This metadata can be used to configure the communication stack to produce compliant messages for a wide variety of target <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-iot-platform">IoT Platforms</a> and protocols.
</p>
<p>
The <a href="https://w3c.github.io/wot-binding-templates/">WoT Binding Templates</a> are an informal collection of communication metadata blueprints that explain how to interact with different <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-iot-platform">IoT Platforms</a>.
When creating a <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Description</a> for a particular device, the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-binding-templates">Binding Template</a> for the corresponding <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-iot-platform">IoT Platform</a> can be used and instantiated in the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">Thing Description</a> for that device.
</p>
<figure id="binding-templates">
<img src="images/binding-templates.png" style="width: 800px;">
<figcaption>Figure <span class="figno">11</span> <span class="fig-title">From Binding Templates to Protocol Bindings</span></figcaption>
</figure>
<p>
<a href="#binding-templates" class="fig-ref">Figure <span class="figno">11</span> <span class="fig-title">From Binding Templates to Protocol Bindings</span></a> shows how <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-binding-templates">Binding Templates</a> are applied. A <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-binding-templates">WoT Binding Template</a> is created only once for each <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-iot-platform">IoT Platform</a> and then instantiated, and hence reused in all <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TDs</a> for its devices. The <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-client">WoT Client</a> consuming that <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td">TD</a> must implement the corresponding <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-protocol-binding">Protocol Binding</a> to be able to interact with the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing">Thing</a> described. The communication metadata of a Binding spans four dimensions:
</p>
<ul>
<li>
<b>IoT Platform:</b>
<a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-iot-platform">IoT Platforms</a> often introduce proprietary tweaks to protocols such as platform-specific HTTP header fields or CoAP options.
This spans another dimension within the transfer protocol used. Usually, these tweaks can be described with standard <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td-vocabulary">TD Vocabulary</a>.
If not, platform-specific vocabulary along with a corresponding <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-protocol-binding">Protocol Binding</a> implementation is required.
</li>
<li>
<b>Transfer Protocol:</b> The <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-thing-description-td">WoT Thing Description</a> comes with vocabulary to identify standard protocols (e.g., HTTP,
CoAP, WebSockets, or MQTT). Their configuration (e.g., port or variations such as HTTP long-polling [<cite><a class="bibref" href="#bib-RFC6202">RFC6202</a></cite>] to support event notification) is also done through <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td-vocabulary">TD Vocabulary</a>.
If a transfer protocol is not covered by the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-td-vocabulary">TD Vocabulary</a>, <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-domain-specific-vocabulary">domain-specific vocabulary</a> can be used. This, of course, needs to be backed by a corresponding <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-protocol-binding">Protocol Binding</a> implementation in the <a href="https://github.com/w3c/wot-architecture/blob/master/terminology.md#user-content-wot-client">WoT Client</a>.
</li>