Web services 1

farmpaintlickInternet και Εφαρμογές Web

21 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

93 εμφανίσεις

Web Services

1.
Recap

a)
Objects

and Resource

b)
Service
Orientation

2.
Background

a)
Timeline

3.
Back to Data



a)
Semantic Web

b)
Web Services

c)
Semantic Web

Remember Object Orientation and

Resource Orientation?


In Object Oriented distributed systems an application has the
concept of a remote object that receives messages.


An object has lifetime (you can create it and destroy it).


It encapsulated State and operations on that state.


Examples:
Jini
, CORBA, DCOM, Legion


In Resource Oriented systems, applications support the concept
of resources


They are accessible via different protocols.


They have state, but no operations on that state.


Operations are defined by the access protocol.


The

example: the Web


Web Services are used to create Service Oriented Architectures


These are service oriented


What is Service Orientation?

Service Orientation


Service Orientation is an attempt to make distributed systems
more loosely coupled


In Object Orientation an object maintains data, and operations
for accessing
/manipulating
that data.


State and operations are combined into single entity

-

think
BankAccount.java


In Service Orientation state and the operations on it are
separated


A service is an interface to something with state, but we
don’t know and don’t care what that thing is.


All we see is the service interface which defines activities.


The Service interface provides
operations on the state but
does

not have state in itself
.

Benefits of Service Orientation


A service does not have state, so I don’t have to worry about lifetime
issues


The service interface is

typically defined as
a contract


The contract describes the messages received and sent by the
service.


Each message contains everything the service needs to know to
perform its task
-

nothing is implied through ‘shared knowledge’.


So I don’t have to ‘know’ what sort of thing it is, or what classes it
inherits from like I do with objects. Instead, I can interpret the
contract at runtime and communicate with the service immediately.


Service interfaces are usually coarse
-
grained


The lack of state in services and the fact that messages contain all
necessary information means many interactions can be idempotent


They have no side
-
effects if they are repeated.
-

I send a message,
wait… get no response, so send it again without worrying that I
have induced an inconsistent state at the server side.


Easy to swap
out/
replicate services if they have the same interface

data

object

Objects, Resources and Services

operations

service

data

operations

data

resource

operations

Access protocol

representation

What’s Important?


Objects
and Services
define their own operations
(interfaces)


Resources do not.


What does that mean?





Services and Resources are not ‘instances’


What does that mean?

Know this Man?

Tim Berners
-
Lee

Inventor of the WWW

Timeline


1991


first website (CERN
HTTPd
)

http://info.cern.ch/hypertext/WWW/TheProject.html



1998


XML becomes a W3C recommendation


WDDX (Web Distributed Data
eXchange
)


XML
-
RPC MS, Don Box, Dave
Winer
, et al


SOAP MS, Don Box


Dave
Winer
, et al


1999


Resource Description Framework (RDF) v1
becomes a W3C recommendation


2001


Dot
-
com bubble bursts



2002


Tim
Berners

Lee: “As we look forward, we are tempted to distinguish
between the multimedia world of information targeted for human
perception, and the well
-
defined world of data which machines
handle....”


Tim
Berners

Lee: “The Web technology must allow information
intended for a human to be effectively presented, and also allow
machine
processable

data to be conveyed. Only then can we start to
use computers as tools again”


2003


SOAP becomes a W3C recommendation


2004


Web 2.0 term coined


RDF v2 published


2001


2007


SOAP
vs

REST wars


Machine
-
to
-
Machine Web

Data
exported
as Web pages

machine
-
processable information

Web Services


Companies

needed standard
mechanisms to
be able to



Publish


Advertise


Discover


And a security model


links
to

applications
,
rather than
web
pages

No good for business or security scraping web
pages


Hence XML
-
RPC
-
> SOAP

Exchanging Data

This focus on representing and exchanging data
led
to
two main

development thrusts
:



The Semantic Web:
an extension of the current World Wide
Web (Resource Oriented)
in which information is given well
-
defined meaning, better enabling computers and people to
work in cooperation.


focused on the representation of data


seeks to create a machine
processable

Web.


led by W3C + large number of researchers and industrial partners.


based on the Resource Description Framework (RDF)



A Web Service:

a software system designed to support
interoperable machine
-
to
-
machine interaction over a
network
(Service Oriented)


They provide the definitions (and infrastructure) to allow applications to
remotely exchange XML messages with each other.

Semantic Web & Web Services

Complement each other:


Web Services

met
immediate
technology needs


Semantic Web

is still growing

Semantic Web


Based on RDF


subject, object,
predicate


classification of resources and properties is
called an ontology


example: FOAF


Dave
knows
Sally


Allows you to create graphs based on the
knows
predicate which model more
information than is present in an individual
person

FOAF visualized

Timothy M. O'Brien Aug. 21, 2005

OWL


Web Ontology Language (OWL)


extends RDF


Supports reasoning over resources


via classes, class hierarchies


axioms


restrictions on class properties
and their relationships with other classes


A cat is an animal; Felix is a cat; Therefore
Felix is an animal


also (disjoint) constraints

Semantic Web


Slow adoption


Why?


concepts are quite heavy


RDF XML is ugly


requires taxonomies (
ontologies
) and
agreement between them


very different from
folksonomies


But history doesn’t stop. More and more
people are becoming interested in it


HTML5+RDFa

Next…


Structured Data


Web Services technology deep dive