COMP 7100: Computers in the Information society Web Services Hongjun SongComputer ScienceThe University of Memphis
What is a Web Service? • A web service is a collection of protocols and standards used for exchanging data between applications or systems. • Software applications written in various programming languages and running on various platforms can use web services.
Creating a Web Service • Useful tools to create a Web Service are • Simple Object Access Protocol (SOAP) • a way for applications to communicate with one another over the Internet, independent of platforms • XML • a way for applications to communicate with one another over the Internet, independent of format/platforms
Creating a web service 2 • Web Services relies on XML-formatted messages to send data and receive commands • Web Services support three standard protocols, • Http-Get • Http-Post • SOAP
Example: simple web service • a Web Service that converts degree Fahrenheit and Celsius each other using VB.Net • 1 <%@ WebService Language="VB" Class="TempConvertor" %> • 2 Imports System.Web.Services • 3 Public Class TempConvertor : Inherits WebService • 4 <WebMethod()> Public Function TemptureF(intF as integer) As Integer • 5 dim intC as integer = (intF - 32) * (5.0/9.0) • 6 Return (intC) • 7 End Function • 8 <WebMethod()> Public Function TemptureC(intC as integer) As Integer • 9 dim intF as integer = intC * (9.0/5.0) + 32 • 10 Return (intF) 11 End Function 12 End Class
Web Services: Wikis • Wiki is a piece of server software that allows users to freely create and edit Web page content using any Web browser • Creator of the concept: Ward Cunningham • Where do they fit in ? • used to provide a group collaborative web presence • Famous Wikis:
Key characteristics • enables documents to be written collectively in a simple markup language using a web browser • easy-to-use user-maintained database for searching or even creating information. • Most wikis are open to the general public without the need to register any user account • session log-in is requested to acquire a "wiki-signature" cookie for auto-signing edits. • Private wiki servers require userauthentication to edit, sometimes even to read pages
Wiki Communites • wiki communities are private, particularly within enterprises as collaborative software • English-languageWikipedia is, by far, the world's largest wiki; the German-language Wikipedia is the second-largest. • Other large wikis include the WikiWikiWeb, Memory Alpha, Wikitravel, World66 and Susning.nu, a Swedish-language knowledge base • For those interested in creating their own wiki, there are many publicly available "wiki farms",
List of wikis • EvoWiki – an Evolution-related wiki • Unilang – an online community and database dedicated to languages • Javapedia – a wiki focused on all aspects of the Java platform. • Mac Guide – a wiki about Apple Mac issues, run by MacRumors.com • Wikisource – Primary sources for use in Wikipedia, a sister project of Wikipedia • Wikipedia – the world's largest Encyclopedia • Wikibooks – textbooks; sister project of Wikipedia Wikinews – A collaborative news service; sister project of Wikipedia • Intellipedia - a classified wiki that runs the top-secret network that links the U.S. intelligence community. It is not accessible to the public
Web Services: Blogs • BLOG = WEB LOG • Blog combines text, images, and links to other blogs, web pages, and other media related to its topic. • Automated Website Publishing • Facilitates Publishing Content • Every Mary, Sue and John has a blog on the Internet. • No Fussing with layout/design • Just Login, write something and post it away.
Why Blogging ? • Wouldn't it be good to get your own web page where you could publish these comments ? • Make political statements • Promote products and services • Provide research information • Showcase tutorials • If there is a subject that you are interested in, there is a good chance that some one is writing a blog about it. • Blogs are written by politicians, musicians, novelists, sports figures, newscasters, yourself
A Taxonomy of Blogs • By Media type • Videos- vlog, links- linklog, photos- photoblog • By device • Blogs can also be defined by which type of device is used to compose it. A blog written on/for a mobile device(s) is called a moblog • Genre • Some blogs focus on a particular subject, such as political blogs or travel blogs • Blog search engines • search blog contents (known as the blogosphere), such as blogdigger, Feedster, and Technorati
Blogs: Legal issues • Major areas of concern are the issues of proprietary or confidential information, libel, and defamation • Employers have fired employees who maintain personal blogs that discuss their employers • In Singapore, two ethnic Chinese were punished under the country’s anti-sedition law for posting anti-Muslim remarks • Ellen Simonetti, a US airline attendant, lost her job after posting photos of herself in uniform displaying more cleavage than ordinary on her blog.
Virtual Communities • It’s a group of people that primarily or initially communicates or interacts via the Internet • People bring different perspectives, needs, knowledge and amount of experience to the process.
Virtual Community 2 • Why ? • Socializemeeting people, playing around, sharing jokes/stories, just taking interest in each other. • Work together • Share interests in issues and causes • Can form a nucleus for an online community. • Have topical conversations • Online salons and discussion forums
Virtual Community 3 • Building a virtual community • Identify your community purpose or goal • Identify your target audience • Think about which interaction tools would serve your purpose and audience and how to structure the space. • Think about how you want to host or facilitate your community • Build it • Draw in the members • Keep nurturing it (or it will die)!
Virtual Community 4 • BBS or Internet Forum: The WELL, GEnie, Dead Runners Society • Blog: LiveJournal, Xanga, MySpace, Facebook, • Virtual world: LucasFilm's Habitat, VZones, Secondlife • IM: ICQ, Yahoo! Messenger, Windows Live Messenger, AIM • P2P: Kazaa, Morpheus, Napster, Limewire • USENET • Wiki: Wikipedia, WikiWikiWeb, Wetpaint, PBWiki, Netcipia • WWW: eBay, GeoCities, Slashdot, Digg
Towards a Semantic Web • The current Web represents information using • Texts in natural language (English, Chinese ...) • graphics, multimedia, page layout • Humans can process this easily because they • can deduce facts from partial information • can create mental associations • are used to various sensory information • (well, sort of… people with disabilities may have serious problems on the Web with rich media!)
However ... • However: machines are not human ! • partial information is unusable • difficult to make sense from, e.g., an image • drawing analogies automatically is difficult • difficult to combine information • is <foo:creator> same as <bar:author>? • how to combine different XML hierarchies?
Example • But .. your automatic airline reservation sys • knows about your preferences • builds up knowledge base using your past • can combine the local knowledge with remote services: • airline preferences • dietary requirements • calendaring • etc
What is needed (technically) • Can a computer understand web content? • unambiguous names for resources (that may also bind data to real world objects): URI-s • a common data model to access, connect, describe the resources: RDF • access to that data: SPARQL • define common vocabularies: RDFS, OWL, SKOS • reasoning logics: OWL, Rules • The “Semantic Web” is an extension of the current Web, providing a more semantically oriented infrastructure for the automatic integration and interpretation of data on the Web
Semantic Web: A Case Study • You need to decide where to spend a night on Chicago next Friday • Hotel location information on web • Meeting location information on desktop … but what brain will connect it all? • If talk downtown and overnight stay for early flight from O’Hare, ONLY need hotels near airport, rides to/fro downtown • Semantic web should return only such listings, or even more personalized to you if it knows who you are (your choices) …
Semantic web- RDF Example (RDF/XML) -RDF (Resource Description Framework) is a graph. -A set of RDF statements is a directed, labeled graph
How to Achieve it? • There is a need to support Ontologies on the Semantic Web: “defines the concepts and relationships used to describe and represent an area of knowledge” • Examples • OWL- A language for making ontological statements. OWL is intended to be used over the World Wide Web. • XOL-XML Based Ontology language
Components of OWL • The basic elements of OWL includes classes, properties and individuals. • Classes • A class is a concept in a domain. • Constitute a taxonomic hierarchy (a subclass-superclass hierarchy • Defined using the owl:Class element • E.g. banking domain might include Account or Customer. <owl:Class rdf:ID="SavingsAccount"> <rdfs:subclassOf rdf:resource="#Account"/> </owl:Class>
Components of OWL 2 • Properties have two main categories • Object properties, which relate individuals to other individuals. • Datatype properties, which relate individuals to datatype values, such as integers, floats, and strings. • A property can have domain and range. • Functional: Person’s age, height etc • Inverse Functional: bankNumber or SSN • Symmetric: includes “is sibling of” or “is same as” • Transitive: If AB and BC, then AC
Components of OWL 3 • Individuals • Individuals are instances of classes, and properties can relate one individual to another • Example, • individual named Smith belongs to an instance of the class Person • might use the property hasEmployer to relate Smith to the individual Webify Solutions <owl:Thing rdf:about="SmithAccount"> <rdfs:type="#Account"/> </owl:Class>
Components of Semantic web A data model for referring to objects ("resources") and how they are related (RDF- Resource Description Frame Work) language for restricting the structure of XML documents provides a surface syntax for structured documents
Outlook on Web Services • Web is becoming a universal infrastructure for communication and interaction • Social interaction • Economic • Scientific • “You can't tell how something will spreadjust by looking at how the html code works” [Tim Berners-Lee] • Web Science Research Initiative [WSRI, 'wiz-ree‘] [MIT and University of Southampton, 2006]A collaboration aimed at promoting analysis … A new science is emerging that must include elements ofsocial science, psychology, economics and law, along with computer science/engineering. ...