Wright State University CORE Scholar

The Ohio Center of Excellence in Knowledge- Kno.e.sis Publications Enabled Computing (Kno.e.sis)

2007

SA-REST: Semantically Interoperable and Easier-to-Use Services and Mashups

Amit P. Sheth Wright State University - Main Campus, [email protected]

Karthik Gomadam Wright State University - Main Campus

Jonathan Lathem

Follow this and additional works at: https://corescholar.libraries.wright.edu/knoesis

Part of the Bioinformatics Commons, Communication Technology and New Media Commons, and Information Systems Commons, OS and Networks Commons, and the Science and Technology Studies Commons

Repository Citation Sheth, A. P., Gomadam, K., & Lathem, J. (2007). SA-REST: Semantically Interoperable and Easier-to-Use Services and Mashups. IEEE Computing, 11 (6), 91-94. https://corescholar.libraries.wright.edu/knoesis/731

This Article is brought to you for free and open access by the The Ohio Center of Excellence in Knowledge-Enabled Computing (Kno.e.sis) at CORE Scholar. It has been accepted for inclusion in Kno.e.sis Publications by an authorized administrator of CORE Scholar. For more information, please contact [email protected]. Semantics & Services SA-REST: Semantically Interoperable and Easier- to-Use Services and Mashups

Amit P.Sheth and Karthik Gomadam • Wright State University Jon Lathem • University of Georgia

ervices based on the representational state required. If a company developing a mashup tool transfer (REST) paradigm, a lightweight wanted to add a new service that didn’t have a S implementation of a service-oriented archi- standard output or that wasn’t internal to their tecture, have found even greater success than their tool, it could modify its existing tooling in order heavyweight siblings, which are based on the Web to incorporate the new service’s interface. Howev- Services Description Language (WSDL) and SOAP er, this solution isn’t scalable because of the rate (see www.w3.org/2005/Talks/1115-hh-k-ecows/ for at which new services are coming online. The need a comparison). By using XML-based messaging, to change the tool itself also negates the idea of a RESTful services can bring together discrete data customizable Web. from different services to create meaningful data How, then, to address these limitations and find sets; mashups such as these are extremely popu- a less complex yet scalable approach? Reuse and lar today.1 data mediation have led to several proposals for services, leading to the W3C recom- Mashups mendation for the Semantic Annotation of WSDL Although mashups fully embrace the idea of cus- and XML Schemas (SAWSDL; www.w3.org/TR/ tomization on the Web, read–write is another story. /). But adding semantics to REST is more Without technical training, it’s difficult for aver- challenging than adding semantics to WSDL. age users to create a mashup — they need to Unlike WSDL, REST-based services are often understand not only how to write the code but also embedded in Web pages written largely in XHTML. the APIs and descriptions of data elements for all Although WSDL was specifically created to cap- the services to be included. To solve this problem, ture service descriptions and has a supporting several companies are developing tools for mashup schema for doing so, XHTML is a more general- creation that require little or no programming purpose language that adds semantic annotations knowledge. These tools, exemplified by Yahoo’s only to those page elements that wrap a service or pipes, IBM’s QEDwiki, and Google’s Mashup Edi- a service description. tor, facilitate the selection of some number of For an open, flexible, and standards-based RESTful Web services or other Web resources and approach to adding semantics to RESTful servic- chain them together by piping one service’s out- es, we built the SA-REST description by borrow- put into the next service’s input while filtering ing the idea of grounding service descriptions to content and making slight format changes. semantic metamodels via model reference anno- One drawback of these tools is that they’re lim- tations from SAWSDL. The key difference between ited in the number of services with which they can SAWSDL and SA-REST is that although SAWSDL interact — typically, they deal with services inter- annotations were added to formal service descrip- nal to the company that created them or to serv- tions in WSDL, SA-REST annotations will have to ices that have standard types of outputs such as be added to the services that are usually described RSS or Atom. Anyone with experience in data in Web pages composed in HTML. Consequently, interoperability and integration also knows that SA-REST uses RDFa (www.w3.org/TR/xhtml-rdf it’s hard to integrate data through purely syntac- a-primer/) and Gleaning Resource Descriptions tic and structural means — semantic techniques are from Dialects of Languages (GRDDL; www.w3.

84 Published by the IEEE Computer Society 1089-7801/07/$25.00 © 2007 IEEE IEEE INTERNET COMPUTING SA-REST Mashups

… org/TR/grddl/) to add and capture objective of REST is simplicity annotations. (WSDL facilitates significant

tooling support). The logical input of this service is an SA-REST: Foundations Most RESTful Web services and Annotations have HTML pages that describe Following several efforts to add formal to users what the service does http://lsdis.cs.uga.edu/ont.owl#Location_Query semantics to traditional Web services, and how to invoke it — in one the W3C recommendation for SAWS- sense, this HTML is somewhat object.The logical output of this service is a list of DL has became the baseline for devel- equivalent to WSDL for REST- oping a based ful Web services, making it an http://lsdis.cs.uga.edu/ont.owl#Location on WSDL (http://knoesis.wright.edu/ ideal place to add semantic 2 library/resource.html?id=00068). SA- annotations. The problem, objects.This service should be invoked using an REST borrows many ideas first pre- however, with treating HTML sented in our work on WSDL-S (www. like WSDL is that the former is HTTP GET w3.org/Submission/WSDL-S/) and then meant to be human readable adapted in SAWSDL, specifically the whereas the latter was Microformats might offer “http://craigslist.org/api/lifting.xsl”/> ontological concepts that describe it. a solution: they offer a way to metadata to “http://craigslist.org/api/lowering.xsl”/> DL adds are inputs, outputs, operation, human-readable text in such a of XML embedded as properties in has worked on standardizing

WSDL (basically, URIs of ontology two different objects). In other words, the annota- technologies, GRDDL and Figure 1. SA-REST document. For a tion of a concept in SAWSDL or SA- RDFa. GRDDL, which recently craigslist.com service, this document describes REST ties that concept to an ontology became a W3C recommenda- semantic annotations both inside the or a conceptual model. As with SAWS- tion, offers a way for the tag as well as inside formatting tags such as DL, SA-REST doesn’t enforce the human-readable text’s author .Annotations in the tags choice of language for representing an to choose any microformat aren’t visible to the user, but he or she can see ontology or a conceptual model, but it and specify a translation into annotations in the . does allow the use of OWL or RDF, machine-readable text; RDFa which are now accepted as preferred offers a way to embed RDF and standards-based approaches to triples into an XML, HTML, or XHTML subject should be the URL at which the represent ontologies. Because SAWS- document. For SA-REST, we recom- service is invoked; the predicate of the DL and SA-REST are more concerned mend using RDFa because it’s a subset triple should be sarest:input, with data structure than with the rela- of RDF, extends XHTML to annotate sarest:output, sarest:operation, tionships between objects and reason- with markups or annotations, has sarest:lifting, sarest:lowering, ing, developers will likely use RDF built-in support URIs and namespaces, or sarest:fault, where sarest is the more frequently in the near future and is recognized by the W3C. alias to the SA-REST namespace. The because of its simplicity. In SA-REST descriptions, we embed triple’s object should be either a URI or a semantic annotations in RDFa into the URL to a resource, depending on the Annotation Techniques HTML page that describes the service, predicate. Figure 1 gives a detailed and Languages thus making the page both human and example of an SA-REST document for a In SAWSDL, semantic annotations that machine readable and creating a single Web service to search for houses on describe a service appear in that ser- place to make an update if the service craigslist.com. vice’s WSDL, which is logical because changes. SA-REST leaves it up to the of the one-to-one correlation between user as to how and where to embed Using GRDDL WSDL and a traditional SOAP-based triples — they can be intermingled with To build in more flexibility and lower Web service. Most RESTful Web servic- the HTML or clustered together and not the barriers to entry, SA-REST also es don’t have WSDL because the main rendered by the Web browser. The triple’s allows the use of GRDDL for attaching

NOVEMBER • DECEMBER 2007 85 Semantics & Services

Back Forward Stop Refresh Home Print Mail @ Address: > go Client machine Movie finder service Proxy server

INPUT XML (Service 1 input) Internet Zone

... 1.URLs of the SA-REST services to be mashedup Smashup editor 92604

Data mediation between the output of service 1 and the input of service 2 using semantic annotations.

Annotated Annotated HTML Data HTML mediation using SA-REST lifting and SA-REST service service lowering

Movie finder service output XML (Service 1 output) AMC 30 At The Block

20 City Blvd West Ste. 1, Orange, CA, USA
Map service input XML (Service 2 input) 33.68278 -1 17.816743 xmlann:modelReference="MovieOnt#Location"> xmlann:modelReference= Underdog "MovieOnt#StreetAddress"> 20 City Blvd W est Ste. 1, Orange, CA, USA 1:30 3:50 Figure 2. Mashup architecture. User query (1) results in invocation of service1 (2.1 and 2.2); data mediation (DM1 and DM2) of output XML from service 1(2.2) maps the input of service2; and the proxy server is the container for the smashup editor, ontologies, and data mediation rules (as XSLT). annotations. To annotate an HTML format and add a profile attribute to file’s URL, which tells the agents com- page with GRDDL, the author must the tag in the HTML docu- ing to the HTML page that it was first embed the annotations in a micro- ment. This attribute is the GRDDL pro- annotated with GRDDL. The final step

86 www.computer.org/internet/ IEEE INTERNET COMPUTING SA-REST Mashups

is to add a link tag inside the head ele- ture is the proxy server, which hosts the vide a forum for community discussion. ment that contains the translation doc- smashup editor; the ontologies that Additional discussions on the role of ument’s URL. Although you can use capture the semantics are also deployed semantics in the broader context of any format to add annotations to this here, which lets a smashup developer services science that encompasses Web page, the data extracted after transla- achieve various tasks including seman- services and technical issues, as well as tion must result in RDF triples identi- tic reasoning and data mediation. Users human and organizational issues, cal to those that would be generated can also specify data mediation using appear elsewhere,4 as does a view of the via RDFa embedding. In other words, the principles of lifting and lowering number of experts in the Semantic Web a page annotated with GRDDL must with the that capture these services area.5 still produce triples whose subject is mediation rules. In Figure 2, we used the URL used to invoke the service, two services to create a smashup, and References whose predicate is the type of SA- the user submits the URLs of the anno- 1. B. Worthen, “Mashups Sew Data Together: REST annotation applied, and whose tated HTML pages to the proxy server. Software Tools Can Cut Costs, Time for object is the URI or URL of the The proxy server applies an XSLT to Linking Information Sources,” The Wall resource to which the predicate refers. the annotated pages and extracts (or Street J., 31 July 2007, p. B4. GRDDL’s advantage is that it’s less gleans, in the case of GRDDL) the RDF 2. K. Verma and A. Sheth, “Semantically intrusive than RDFa, and it lets the triples captured in the annotations and Annotating a Web Service,” IEEE Internet user embed annotations in whatever thus creates the service descriptions. Computing, vol. 11, no. 2, 2007, pp. 83–85. way is most convenient to them. The user then uses these descriptions to 3. A. Sheth, K. Verma, and K. Gomadam, RDFa’s advantage is that annotations create the smashup. “Semantics to Energize the Full Services Spec- are self-contained in the HTML page, At this time, the user can go through trum: Ontological Approach to Better Exploit so the user only needs to create and and specify from where all the inputs Services at Technical and Business Levels,” maintain a single document (GRDDL should be gathered and whether each Comm. ACM, vol., 49, no. 7, 2006, pp. 55–61. forces the user to create two docu- input should be an input to the service 4. J. Lathem, K. Gomadam, and A. Sheth, “SA- ments, the HTML page and the trans- or an output from a service higher up the REST and (S)mashups: Adding Semantics to lation document). RDFa also has the chain. In other words, if the first service RESTful Services,” Proc. IEEE Int’l Conf. advantage of being a standardized returns a location object as an output, , IEEE CS Press, 2007, microformat, which makes it simpler the input to the second service can either pp. 469–476. for a developer to maintain and under- be obtained as an input to the smashup 5. D. Martin et al., “Semantic Web Services: stand a page created by someone else. or be the location object from the first Part 2,” Part 1," IEEE Intelligent Systems, vol. service. In the example in Figure 2, the 22, no. 5, pp. 12-17. Also, D. Martin et al., Creating Mashups user sends a zip code object to the movie "Semantic Web Services: Part 2," to appear with SA-REST finder service. The proxy server extracts in IEEE Intelligent Systems, vol. 22, no. 6. A mashup uses RESTful Web services the location information from the out- to query providers and get content, put of the movie finder service and sends Amit P. Sheth is the LexisNexis Ohio Eminent usually in XML format. However, the it as an input to the mapping service. Scholar and director of the Knowledge- different data definitions and represen- Once the mapping service returns the enabled Information and Services Science tations used by various providers map canvas, the rest of the information (Kno.e.sis) Center (http://knoesis.wright.edu) necessitate a semantic approach for about the movie title and the timings are at Wright State University. He is an IEEE fel- seamless data integration. Using displayed in the map. low. Contact him via http://knoesis. semantics to integrate and coordinate wright.edu/amit. mashups thus gives us smashups (semantic mashups).3 e discuss SA-REST in more detail Karthik Gomadam is a PhD student and a Annotations give smashups the W elsewhere;4 it’s still in an early researcher at the Kno.e.sis Center in the ability to know more about a service’s form, but just as WSDL-S matured into areas of semantic middleware and Seman- inputs and outputs and what the serv- SAWSDL with community participation tic Web services. Contact him at gomadam ice does, which facilitates data media- in the W3C working group, we hope [email protected] . tion. Figure 2 shows a typical smashup additional effort will make SA-REST architecture that uses two RESTful more mature and useful. The W3C’s Jon Lathem is a software engineer at National Web services, (a movie finder service Semantic Web services testbed incuba- Crash Registry (NCR). He has an MS in com- and a mapping service). tor, SWS-XG (www.w3.org/2005/ puter science from the University of Georgia. The key component of this architec- Incubator/swsc), is also expected to pro- Contact him at [email protected].

NOVEMBER • DECEMBER 2007 87