-
Notifications
You must be signed in to change notification settings - Fork 2
/
draft-bvandervalk-sadi-00.txt
1736 lines (1197 loc) · 67.5 KB
/
draft-bvandervalk-sadi-00.txt
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
Submission by Individual B. Vandervalk, Ed.
Internet-Draft E. McCarthy
Expires: August 3, 2012 M. Wilkinson
Intended status: Standards Track James Hogg Research Centre,
Institute for Heart + Lung
Health, University of British
Columbia
January 31, 2012
SADI: Semantic Automated Discovery and Integration
draft-bvandervalk-sadi-00
Abstract
This document describes Semantic Automated Discovery and Integration
(SADI), a set of best practices for implementing stateless web
services that consume RDF data as input and generate RDF data as
output. The goal of SADI is to establish conventions that will
enable a much higher level of interoperability between web services
from independent providers than is currently possible under the
widespread use of WSDL/XML and RESTful services. Under SADI,
interoperability depends on the shared use of predicate vocabularies,
rather than the shared use of particular XML schemas, JSON
structures, or ad hoc data formats. Through the use of OWL to
describe service input and output datatypes, SADI enables: i)
automated discovery of services that provide data or computations of
interest, and ii) automated matchmaking between local data and
available services. By iterative application of the former two
capabilities, SADI enables semi-automated construction of arbitrarily
complex workflows across independent service providers.
Status of this Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 3, 2012.
Vandervalk, et al. Expires August 3, 2012 [Page 1]
Internet-Draft SADI January 2012
Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Vandervalk, et al. Expires August 3, 2012 [Page 2]
Internet-Draft SADI January 2012
Table of Contents
1. Executive Summary . . . . . . . . . . . . . . . . . . . . . . 4
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Security Considerations . . . . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
5. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
6. Motivation and Goals . . . . . . . . . . . . . . . . . . . . . 7
6.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2. Design Goals . . . . . . . . . . . . . . . . . . . . . . . 7
6.2.1. Interoperability with the Semantic Web . . . . . . . . 7
6.2.2. Stateless Services . . . . . . . . . . . . . . . . . . 8
6.2.3. Batch Processing of Inputs . . . . . . . . . . . . . . 8
6.2.4. Support for Long-running Services . . . . . . . . . . 8
6.2.5. Explicit Relationship Between Service Input and
Output . . . . . . . . . . . . . . . . . . . . . . . . 9
6.2.6. Minimal Constraints on Data Modeling . . . . . . . . . 9
7. Relationship to Other Web Service Standards . . . . . . . . . 9
7.1. Web Services Description Language (WSDL) . . . . . . . . . 9
7.2. Semantic Annotations for WSDL (SAWSDL) . . . . . . . . . . 10
7.3. OWL-S and the Web Service Modeling Ontology (WSMO) . . . . 11
8. Running Example: The SADI "Hello, World!" Service . . . . . . 11
9. Service Metadata . . . . . . . . . . . . . . . . . . . . . . . 13
9.1. Retrieving Service Metadata . . . . . . . . . . . . . . . 14
9.2. Representing Service Metadata in RDF . . . . . . . . . . . 15
9.3. Describing Service Interfaces Using OWL . . . . . . . . . 17
9.3.1. The Input OWL Class . . . . . . . . . . . . . . . . . 17
9.3.2. The Output OWL Class . . . . . . . . . . . . . . . . . 21
9.4. Describing Service Execution Parameters Using OWL . . . . 21
9.4.1. The Parameter OWL Class . . . . . . . . . . . . . . . 22
9.4.2. The Default Parameter Instance . . . . . . . . . . . . 23
10. Service Invocation . . . . . . . . . . . . . . . . . . . . . . 23
10.1. Synchronous Services . . . . . . . . . . . . . . . . . . . 23
10.2. Asynchronous Services . . . . . . . . . . . . . . . . . . 25
10.3. Invoking Services with Execution Parameters . . . . . . . 28
11. Service Registries . . . . . . . . . . . . . . . . . . . . . . 30
12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.1. Normative References . . . . . . . . . . . . . . . . . . . 30
12.2. Informative References . . . . . . . . . . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 31
Vandervalk, et al. Expires August 3, 2012 [Page 3]
Internet-Draft SADI January 2012
1. Executive Summary
SADI is a set of best practices for implementing stateless web
services that natively consume RDF data as input and generate RDF
data as output. Its primary purpose is to increase the
interoperability of services across independent providers. Under
SADI, the schemas for the input and output RDF data of a service are
defined by the service's _input OWL class_ and _output OWL class_,
respectively. Provider-specified metadata about a service, including
the URIs of the input and output OWL classes, is published as an RDF
document that is retrievable by an HTTP GET on the service URL.
Service invocation is accomplished by issuing an HTTP POST request to
the service URL with an appropriate input RDF document as the request
body. The input RDF document contains one or more instances of the
input OWL class which represent independent inputs to the service,
and in response the service returns an output RDF document with a
corresponding number of instances of the output OWL class. Each
output instance has the same root URI as its corresponding input
instance, in order to ensure that the data consumed and generated by
the service are explicitly linked.
2. Introduction
The principal benefit of web services is that they enable widespread
and convenient reuse of software components, independent of the
larger applications or goals being realized by the client software.
However, in the current climate of WSDL/XML [WSDL][XML] and RESTful
services [REST], the successful implementation of web service clients
still depends on detailed human knowledge of the particular services
being used. For WSDL/XML services, software developers must be
familiar with the particular XML schemas consumed and generated by a
service and must implement transformations of local application data
to and from those schemas as necessary. Automatic code generators
for WSDL clients assist in this task, but developers must still
understand the structure of the input/output data and the meaning of
the various components. Likewise, developers of RESTful clients must
be familiar with the semantics and permitted values of the named
parameters for each service and must implement transformations on the
service output data as necessary. The requirement on software
developers to learn and accomodate the particular interfaces and data
schemas of each service has a high cost in terms of human labour.
Moreover, variability in the design of schemas and interfaces creates
obstacles for the coordinated use of web services across different
providers.
SADI addresses the variability of data representation through the use
of Semantic Web standards, namely RDF [RDF] and OWL [OWL]. As these
Vandervalk, et al. Expires August 3, 2012 [Page 4]
Internet-Draft SADI January 2012
standards have been specifically designed to facilitate integration
and processing of data across multiple sites, they possess
significant advantages over XML and ad hoc data formats for encoding
web service input/output. In particular, RDF enables automated
merging of data sets and OWL enables automated logical reasoning over
data. Meaningful data integration always requires some level of
agreement between providers regarding data representations. However,
under SADI, providers must only agree at the more granular level of
predicate vocabularies, rather than on complete representations of
datatypes.
SADI addresses the variability of service interfaces by proposing
conventions for retrieving metadata about services and for invoking
services. Briefly, metadata about a service is retrievable as an RDF
document by issuing an HTTP GET to the service URL, while service
invocation is realized by issuing an HTTP POST to the service URL
with an input RDF document as the request body. The response to a
service invocation is likewise an RDF document.
3. Security Considerations
SADI services and clients are subject to the same security
considerations as servers and clients that use the HTTP protocol, as
described in Section 15 of [HTTP].
4. IANA Considerations
This document has no actions for IANA.
5. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Readers of this document are expected to have a general familiarity
with the HTTP protocol [HTTP], RDF [RDF], and OWL [OWL]. In
addition, this document uses the following SADI-specific terminology:
o _input OWL class_ -- an OWL class that defines the required
structure (i.e. schema) of a single input to a SADI service. Each
SADI service has exactly one input OWL class.
o _input instance_ -- an RDF node that is an instance of the input
OWL class for a given SADI service, and thus is a valid input for
that service. In general, an RDF node is an instance of an OWL
Vandervalk, et al. Expires August 3, 2012 [Page 5]
Internet-Draft SADI January 2012
class if it satifisies the property restrictions of the OWL class.
Membership of an RDF node in a given OWL class can be determined
using an OWL reasoner or can be directly asserted by assigning an
rdf:type value that is equal to the OWL class URI.
o _input RDF document_ -- a document containing one or more input
instances for a SADI service. A SADI service is invoked by
issuing an HTTP POST to the service URL with the input RDF
document as the request body.
o _output OWL class_ -- an OWL class that defines the required
structure (i.e. schema) of a single output from a SADI service.
Each SADI service has exactly one output OWL class.
o _output instance_ -- an RDF node that is an instance of the output
OWL class for a given SADI service, and thus is a valid output for
that service. In general, an RDF node is an instance of an OWL
class if it satifisies the property restrictions of the OWL class.
Membership of an RDF node in a given OWL class can be determined
using an OWL reasoner or can be directly asserted by assigning an
rdf:type value that is equal to the OWL class URI.
o _output RDF document_ -- the result of a SADI service invocation,
which contains one or more output instances. For a given service
invocation, the number of output instances in the output RDF
document should be equal to the number of input instances in the
input RDF document. Further, the URIs of corresponding input and
output instances are always equal.
o _service execution parameter_ -- a value which is separate from
the input instances for a service invocation, but affects how the
input instances are processed. For example, a "Hello, World!"
service that returns a natural language greeting might have a
service execution parameter indicating the desired output language
for the greeting.
o _parameter OWL class_ -- an OWL class that defines the required
structure (i.e. schema) of service execution parameters for a SADI
service. Similarly to input and output instances, service
execution parameters may have arbitrarily complex representations
in RDF. The parameter OWL class describes a graph that contains
_all_ service execution parameters. If a service has multiple
execution parameters, their RDF representations must be connected
in a single RDF graph that is an instance of the parameter OWL
class.
o _parameter instance_ -- an RDF node that is an instance of the
parameter OWL class for a given SADI service, and thus is a valid
Vandervalk, et al. Expires August 3, 2012 [Page 6]
Internet-Draft SADI January 2012
set of execution parameters for that service. The input RDF
document for a service invocation may contain at most one
parameter instance, which affects the processing of all input
instances within the input RDF document.
o _default parameter instance_ -- an instance of the parameter OWL
class that represents the default values for all service execution
parameters. These values are used when an input RDF document does
not explicitly specify values for execution parameters.
6. Motivation and Goals
6.1. Motivation
The original motivation for the development of SADI was the
complexity of discoverying, accessing, and integrating public data
and software in the domain of bioinformatics. While there are
currently thousands of interrelated bioinformatics databases and
software tools freely available on the web, they are published using
a plethora of incompatible data models, schemas, and software
interfaces that impedes their combined use. The authors sought to
develop a set of best practices for publishing data and software
resources that would simultaneously offer the benefits of Semantic
Web standards and technologies, such as the ability to automatically
merge data sets and to automatically compute logical inferences from
data.
While the development of SADI has been motivated by bioinformatics,
there is nothing that prevents its application to other domains. It
is applicable in any scenario where integrating data and/or software
across multiple sites is required.
6.2. Design Goals
6.2.1. Interoperability with the Semantic Web
One of the primary goals of SADI is to create web services that are
compatible with the Semantic Web. In particular, it is desirable that
services should be able to exchange data directly with various
consumers and producers of RDF data such as triple stores, static RDF
documents, OWL reasoners, and RDF browsers. For this reason, SADI
services consume a standard RDF document as input and generate a
standard RDF document as output.
Another key point of compatibility with the Semantic Web is the use
of OWL to define the requirements for the input data, output data,
and execution parameters of a service. This permits the use of an
Vandervalk, et al. Expires August 3, 2012 [Page 7]
Internet-Draft SADI January 2012
OWL reasoner as the main vehicle for data and service matchmaking
tasks, such as:
o identifying services that can consume a subset of a given RDF
graph as input
o extracting input instances for a service from a given RDF graph
o matching the output interface of one service to the input
interface of another service, in order to create service execution
chains (workflows)
The intent of SADI is to facilitate the use of web services within
Semantic Web applications. For example, the authors have developed a
prototype query engine called SHARE [SHARE] that integrates SADI
services with a SPARQL query engine, a triple store, and an OWL
reasoner in order to answer queries over the data that can be
generated by a collection of SADI services.
6.2.2. Stateless Services
The scope of SADI is limited to stateless services so that services
and clients can be implemented in a straightforward manner, at the
expense of certain types of advanced applications. The set of
stateless services includes services that perform any type of data
retrieval or data analysis, but excludes services that effect changes
in the real world. A common example of the latter type of service is
a service that makes a withdrawal from a bank account. Previous
Semantic Web Service standards such as WSMO and OWL-S have been
developed to model such stateful services. However, the formal
description of stateful services is complex, and the design of
software agents to coordinate such services is an ongoing research
problem.
6.2.3. Batch Processing of Inputs
In order to minimize overhead due to network latency, it should be
possible to group independent inputs for a service into a single
request, and to receive the corresponding outputs in a single
response. In SADI, the input RDF document for a service invocation
may contain any number of input instances which represent independent
inputs to the service. Likewise, the output RDF document may contain
any number of independent output instances.
6.2.4. Support for Long-running Services
The processing time of a service should not be limited to the
lifetime of a TCP connection. Asynchronous SADI services support
Vandervalk, et al. Expires August 3, 2012 [Page 8]
Internet-Draft SADI January 2012
long-running computations by means of client polling and HTTP
redirects, as described in Asynchronous Services (Section 10.2).
6.2.5. Explicit Relationship Between Service Input and Output
It is desirable to ensure that related input and output instances
from a service invocation are explicitly linked. This saves a client
from the task of tracking input/output relationships on its own, and
ensures that the RDF produced by service invocations forms a
connected graph that is queriable in a meaningful manner. In SADI,
related input and output instances are linked because they share the
same URI. This constraint is demonstrated concretely in Running
Example: The SADI "Hello, World!" Service (Section 8) and is
described more formally in The Output OWL Class (Section 9.3.2).
6.2.6. Minimal Constraints on Data Modeling
Aside from the constraint of the previous section, SADI does not
provide any rules about how service input and output data should be
modeled in RDF. Service providers are free to encode the data using
any OWL or RDFS ontologies deemed suitable. Further, the input and
output RDF documents for a service invocation consist only of data
that is consumed or generated by the service, respectively. There
are no SADI-specific messaging structures required within the input/
output RDF documents.
7. Relationship to Other Web Service Standards
7.1. Web Services Description Language (WSDL)
WSDL [WSDL] is an XML schema that is the current de facto standard
for machine-readable description of web service interfaces. At the
time of writing this document, the most recent version of WSDL is
WSDL 2.0.
The most important difference between SADI and WSDL is that SADI uses
RDF for message content, whereas WSDL conventionally uses XML. WSDL
uses XML Schema [XML Schema] as the default schema language for
message structures, but is also extensible to use other schema
languages. To date, there have been proposals for extensions that
use Document Type Definitions (DTDs) and RelaxNG as alternative
schema languages for WSDL. In principle, a similar extension could
be created for the use of OWL as a schema language, although none has
been put forward to date.
SADI uses only a small, fixed subset of the behaviours that can
described by WSDL. In the terminology of WSDL, SADI services must
Vandervalk, et al. Expires August 3, 2012 [Page 9]
Internet-Draft SADI January 2012
have:
o _one operation per service_, where an _operation_ is interaction
between the client and the service to accomplish some result. An
operation is analogous to a function call in a programming
language.
o _one endpoint per service_, where an _endpoint_ is an URL where
the client interacts with the service
o _a fixed protocol_, where the _protocol_ is the mechanism for
transporting messages between the client and the service. All
SADI services use HTTP as the underlying protocol.
o _a fixed message exchange pattern_, where a _message exchange
pattern_ is a sequence of messages that are exchanged between a
client and a service during an operation. SADI services have one
of two possible message exchange patterns, corresponding to
synchronous services (Section 10.1) and asynchronous services
(Section 10.2).
The only variables of a SADI service interface are the graph
representations of the input data, the output data, and the service
execution parameters, which are defined by the input OWL class
(Section 9.3.1), the output OWL class (Section 9.3.2), and the
parameter OWL class (Section 9.4.1), respectively. For SADI, these
three OWL classes are the functional analog of a WSDL service
description file.
7.2. Semantic Annotations for WSDL (SAWSDL)
SAWSDL [SAWSDL] is a small set of extensions to the WSDL XML schema
that facilitates the mapping of XML-based services to a semantic data
model (e.g. RDF). Specifically, SAWSDL defines 3 additional XML
attributes for WSDL:
o modelReference
o loweringSchemaMapping
o liftingSchemaMapping
_modelReference_ is used to annotate elements of a WSDL interface
with entities from a semantic data model, such as class URIs from an
OWL ontology. _liftingSchemaMapping_ and _loweringSchemaMapping_ are
used to provide mappings of XML datatypes to and from a semantic data
model, respectively. The values of _liftingSchemaMapping_ and
_loweringSchema_ are URIs that identify documents that define the
Vandervalk, et al. Expires August 3, 2012 [Page 10]
Internet-Draft SADI January 2012
transformation; however, SAWSDL is agnostic with respect to the
specific mapping language that is used. For example, when
translating between XML and RDF, the required mappings might be
accomplished with XSLT for the lifting transformation and SPARQL
followed by XSLT for the lowering transformation.
SAWSDL can be used as an adaptor layer that maps a WSDL service to
the expected behaviour of a SADI service.
7.3. OWL-S and the Web Service Modeling Ontology (WSMO)
OWL-S [OWL-S] and WSMO [WSMO] are two previous Semantic Web Services
standards that are similar in their goals and approaches. Both
standards define ontologies for describing the _capablities_ and
_choreographies_ of stateful web services, where capabilities are
changes to the world that are effected by a service, and
choreographies are the sequences of messages exchanged between a
client and a service during an interaction. (Choreographies
correspond to message exchange patterns in WSDL.) OWL-S and WSMO
exceed the descriptive power of WSDL by providing a generic framework
for modeling both the internal state of a service and the state of
external variables that are affected by the service (e.g. a credit
card balance). Transitions between states are formally described by
boolean formulas that express preconditions and postconditions for an
event.
The principal difference between OWL-S and WSMO is that OWL-S uses
OWL as its ontology language, whereas WSMO uses a more expressive
language called the Web Service Modeling Language (WSML). The OWL-S
and WSMO standards are complex, and the development of software
agents to coordinate OWL-S/WSMO services to accomplish higher order
tasks in an ongoing area of research.
In comparison to OWL-S and WSMO, SADI is a simpler standard that is
limited to the description of stateless services. SADI uses OWL
ontologies only for defining the schema of input data, output data,
and service execution parameters, and not to define the effects or
choreography of a service. The choreography of a SADI service is
fixed to one of two possibilities, corresponding to synchronous
services (Section 10.1) and asynchronous services (Section 10.2)
respectively.
8. Running Example: The SADI "Hello, World!" Service
To illustrate the different aspects of the SADI protocol in a
concrete manner, we will frequently make reference to the SADI
"Hello, World!" service located at
Vandervalk, et al. Expires August 3, 2012 [Page 11]
Internet-Draft SADI January 2012
http://sadiframework.org/examples/hello. The purpose of this section
is to describe the behaviour of this service and at the same time to
provide a brief, non-normative introduction to the key aspects of the
SADI protocol.
The SADI "Hello, World!" service consumes one or more input instances
representing people with names (e.g. "Guy Incognito") and returns
corresponding output instances representing greetings for each person
(e.g. "Hello, Guy Incognito!"). The following shows an example
input RDF document for the service, in N3:
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix hello: <http://sadiframework.org/examples/hello.owl#> .
@prefix input: <http://sadiframework.org/data/examples/hello-input
.n3#> .
input:GuyIncognito
a hello:NamedIndividual;
foaf:name "Guy Incognito" .
input:HomerSimpson
a hello:NamedIndividual;
foaf:name "Homer Simpson" .
In response, the service generates the following output RDF document:
@prefix hello: <http://sadiframework.org/examples/hello.owl#> .
@prefix input: <http://sadiframework.org/data/examples/hello-input
.n3#> .
input:GuyIncognito
a hello:GreetedIndividual;
hello:greeting "Hello, Guy Incognito!" .
input:HomerSimpson
a hello:GreetedIndividual;
hello:greeting "Hello, Homer Simpson!" .
In this example, the input RDF document contains two input instances
with the URIs input:GuyIncognito and input:HomerSimpson. Each input
instance is processed independently by the service, and so the same
result could be generated by invoking the service twice with the
input graphs for Guy Incognito and Homer Simpson separately, and
afterwords performing an RDF-merge on the two output RDF documents.
The input instances are identified by the service as those URIs
having an rdf:type matching the service's _input OWL class_ (hello:
NamedIndividual). The purpose of the input OWL class is to describe
the expected structure of the input instances. More will be said
Vandervalk, et al. Expires August 3, 2012 [Page 12]
Internet-Draft SADI January 2012
about the purpose and design of the input OWL class in The Input OWL
Class (Section 9.3.1).
Analogously to the case for input instances, each output instance in
the output RDF document is assigned an rdf:type equal to the URI of
the service's _output OWL class_ (hello:Greetedindividual). The
purpose of the _output OWL class_ is to describe the expected
structure of the output instances generated by the service.
Comparing the input and output RDF documents, the reader will observe
that the URI of each output instance is equal to URI of its
corresponding input instance (input:GuyIncognito and input:
HomerSimpson, respectively). This is a general requirement for SADI
services that ensures that related input and output instances are
always explicitly linked. As a result, SADI clients are able to
merge the input and output RDF documents from a service invocation
into a single, coherent RDF graph that captures the relationships
between the input and output data. For example, a client could load
the two RDF documents above into a triple store, and then pose
queries against the triple store such as "What is the greeting for
Homer Simpson?".
9. Service Metadata
The metadata for a SADI service provides information that is
potentially helpful to human and/or software clients attempting to
use the service. All provider-specified metadata for a SADI service
MUST be retrievable as an RDF document by issuing an HTTP GET request
to the service URL. Within the RDF document, all metadata items MUST
be represented as part of a single, connected RDF graph whose root
URI is the URL of the service.
The metadata graph MUST include the following items:
o _input OWL class_ -- an OWL class describing the expected
structure of the input RDF graphs consumed by the service
o _output OWL class_ -- an OWL class describing the expected
structure of the output RDF graphs generated by the service
If the service has one or more execution parameters, the metadata
graph MUST also include:
o _parameter OWL class_ -- an OWL class describing execution
parameters for the service
o _default parameter instance_ -- an instance of the parameter OWL
class which provides default values for the service execution
Vandervalk, et al. Expires August 3, 2012 [Page 13]
Internet-Draft SADI January 2012
parameters
The following items are optional:
o _service name_ -- a human readable label for the service
o _description_ -- a human readable description of the service
functionality
o _contact e-mail address_ -- an e-mail address where the provider
of the service may be contacted
o _service type URI(s)_ -- one or more rdf:type URIs indicating the
type of service. These URIs may be used to categorize the service
by a wide variety of criteria, such as the task performed, the
algorithm utilized, or the intended users of the service.
o _unit test(s)_ -- one or more input RDF graph(s) that MUST
constitute valid input(s) to the service. The expected output RDF
graphs corresponding to these input graphs MAY also be provided.
o _authoritative flag_ -- a boolean value that MUST be true if the
person or organization hosting the service is also the author or
owner of the data underlying the service, or the author or curator
of the software which will generate the service output. If a SADI
service acts as an interface to third party data or software, the
value of the authoritative flag MUST be false. This is to provide
some Quality-of-Service information in cases where multiple
services report to provide the same output data.
In addition, any other items deemed useful to clients of the service
MAY be included in the metadata graph.
9.1. Retrieving Service Metadata
An RDF document containing the metadata graph MUST be retrievable by
an HTTP GET request to the service URL.
The GET request MAY include an Accept header indicating the desired
RDF serialization format for the response document. A SADI service
MUST support content types of text/rdf+n3 for N3 and application/
rdf+xml for RDF/XML, and MAY support additional content types for
these formats or for any other RDF serialization formats. In the
event of an omitted, unrecognized, or unsupported content type, the
default content type used for the response MUST be RDF/XML.
Vandervalk, et al. Expires August 3, 2012 [Page 14]
Internet-Draft SADI January 2012
9.2. Representing Service Metadata in RDF
The schema for the metadata graph is beyond the current scope of the
SADI specification.
At the time of writing, all SADI services and SADI-related tools
known to the authors use the myGrid/Moby service ontology [myGrid/
Moby] to encode the service metadata graph. For illustrative
purposes, the service metadata graph for a parameterized version of
the "Hello, World!" service
(http://sadiframework.org/examples/hello-param) is shown below in N3
format.
@prefix protege-dc: <http://protege.stanford.edu/plugins/owl/dc/pr
otege-dc.owl#> .
@prefix mygrid: <http://www.mygrid.org.uk/mygrid-moby-service#> .
@prefix hello: <http://sadiframework.org/examples/hello.owl#> .
@prefix test: <http://sadiframework.org/examples/t/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://sadiframework.org/examples/hello-param>
a mygrid:serviceDescription ;
#----------------------------------------
# Service Name
#----------------------------------------
mygrid:hasServiceNameText
"ParamaterizedHelloWorld"^^xsd:string ;
#----------------------------------------
# Service Description
#----------------------------------------
mygrid:hasServiceDescriptionText
"A \"Hello, world!\" service where the output language is sp
ecified in a parameter"^^xsd:string ;
#----------------------------------------
# Contact E-mail Address, Authoritative Flag
#----------------------------------------
mygrid:providedBy
[ a mygrid:organisation ;
protege-dc:creator "[email protected]"^^xsd:string ;
mygrid:authoritative "false"^^xsd:boolean
] ;
Vandervalk, et al. Expires August 3, 2012 [Page 15]
Internet-Draft SADI January 2012
mygrid:hasOperation
[ a mygrid:operation ;
#----------------------------------------
# Input OWL Class
#----------------------------------------
mygrid:inputParameter
[ a mygrid:parameter ;
mygrid:objectType hello:NamedIndividual
] ;
#----------------------------------------
# Parameter OWL Class, Default Parameter Graph
#----------------------------------------
mygrid:inputParameter
[ a mygrid:secondaryParameter ;
mygrid:objectType hello:SecondaryParameters ;
mygrid:hasDefaultValue
[ a hello:SecondaryParameters ;
hello:lang "en"^^xsd:string
]
] ;
#----------------------------------------
# Output OWL Class
#----------------------------------------
mygrid:outputParameter
[ a mygrid:parameter ;
mygrid:objectType hello:GreetedIndividual
] ;
#----------------------------------------
# Unit Test
# (test input/output RDF included directly)
#----------------------------------------
mygrid:hasUnitTest
[ a mygrid:testCase ;
mygrid:exampleInput
[ a hello:InputClass ;
foaf:name "Guy Incognito"
] ;
mygrid:exampleOutput
[ a hello:OutputClass ;
hello:greeting "Hello, Guy Incognito!"
Vandervalk, et al. Expires August 3, 2012 [Page 16]
Internet-Draft SADI January 2012
]
] ;
#----------------------------------------
# Unit Test
# (test input/output RDF in external documents)
#----------------------------------------
mygrid:hasUnitTest
[ a mygrid:testCase ;
mygrid:exampleInput test:hello-param-input.rdf ;
mygrid:exampleOutput test:hello-param-output.rdf
]
] .
9.3. Describing Service Interfaces Using OWL
The input and output OWL classes for a service provide a machine-
readable representation of the service interface. This facilitates
the automation of various data and service matchmaking tasks, such
as:
o identifying services that can consume a subset of a given RDF
graph as input
o extracting input instances for a service from a given RDF graph
o matching the output interface of one service to the input
interface of another service, in order to create service execution
chains (workflows)
Moreover, the use of OWL for describing service interfaces enables
the use an _OWL reasoner_ as the main vehicle for accomplishing these
tasks.
9.3.1. The Input OWL Class
The primary purpose of the input OWL class is to identify and extract
valid input instances for a service from a given RDF data set. Each
SADI service has exactly one input OWL class which MUST either be
referenced by or directly included in the metadata graph for the
service.
For illustrative purposes, the following excerpt shows the definition
for hello:NamedIndividual, which is the input OWL class for the SADI
"Hello, World!" service:
Vandervalk, et al. Expires August 3, 2012 [Page 17]
Internet-Draft SADI January 2012
<owl:Class rdf:ID="NamedIndividual">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="http://xmlns.com/foaf/0.1/name
"/>
<owl:minCardinality rdf:datatype="http://www.w3.org/2001/XML
Schema#int">1</owl:minCardinality>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
This class definition states that a URI is an instance of hello:
NamedIndividual if and only if it has one or more values for the
foaf:name property. As a result, each input instance for the "Hello,
World!" service is required to have at least one foaf:name property.
9.3.1.1. Instance Checking and the Input OWL Class
The identification of instances of an OWL class within an RDF graph
is a commonly supported operation of OWL reasoners, which we we will
refer to here as _instance checking_. The purpose of this section is
provide guidelines for writing an input OWL class that enables an OWL
reasoner to perform instance checking in a useful manner.
The most important consideration when authoring an input OWL class is
that the conditions for class membership should be defined using
necessary and sufficient ('if and only if') conditions. In OWL,
necessary conditions ('if') are defined using the rdfs:subClassOf
property whereas necessary and sufficient conditions ('if and only
if') are defined using the owl:equivalentClass property. For
example, the following two excerpts show alternate definitions of
hello:NamedIndividual which use necessary conditions and necessary
and sufficient conditions, respectively:
<owl:Class rdf:ID="NamedIndividual">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://xmlns.com/foaf/0.1/name
"/>
<owl:minCardinality rdf:datatype="http://www.w3.org/2001/XML
Schema#int">1</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>