"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Web Services - Introduction
1. Web Services (NSWI145)
Lecture 01a: Introduction to Web Services
Martin Nečaský, Ph.D.
Faculty of Mathematics and Physics
Charles University in Prague, Czech Republic
Summer 2013
2. Foundations of Web Services
communication of Component A and
Component B
consists of sequence of messages exchanged
between A and B
synchronous or asynchronous
based on standards or proprietary
Internet or
Component A other Component B
network
Summer 2013
3. Communication Patterns
Request – Response
send purchase order – confirm acceptation
Component A Component B
request
response
Summer 2013
4. Communication Patterns
Subscribe (Publish) - Notify
e.g. subscribe to account – notify account
change
Component A Component B
subscribe (publish)
notify
…
notify
Summer 2013
5. Communication Patterns
Arbitrary message exchange between two
components
Component A Component B
Summer 2013
7. Web Service
software component which can be
programmatically accessed by its clients
clients send and receive messages to and from
web service
messages are processed programmatically
comprises interface and implementation
interface strictly separated from implementation
interface is exposed to the clients
implementation is hidden
Summer 2013
8. Web Service Interface
defines set of operations provided by web service
each operation has well defined name and input and
output messages
binds operations to standardized message
transfer formats
e.g. HTTP requests and responses, SOAP over HTTP
binds messages to messaging formats
e.g. XML, JSON, RDF, AtomPub, RSS, etc.
defines service location
Summer 2013
9. Message
(human readable) document
unstructured (simple text, HTML, PDF, etc.)
• e.g. web page, weblog, ...
semi-structured document (XML)
• e.g. purchase order, public contract notification, etc.
data structure (XML, JSON, AtomPub, RSS)
e.g. personal profile from social network service, newspapers
feed, etc.
set of parameters
e.g. request for the weather information on given GPS location
at given time
media
image, video, etc.
out of scope of this course
Summer 2013
11. Web Service Contract
defines how service should be used
technical and non-technical documents Web Service Contract
(example)
technical contract part
Technical Contract
designed for runtime consumption
standardized machine readable notation
usually consists of
• message types definition (e.g. XML Schema)
• interface definition (e.g. WSDL) XSD WSDL WS-*
• other definitions (e.g. WS-*)
non-technical contract part
designed for human (design-time) Non-technical Contract
consumption
consists of, e.g.:
• description of semantics of message types
and interface
• documentation Semantics Docs SLA
• Service-Level Agreement (SLA)
Summer 2013
12. Service-Oriented Architecture (SOA)
web service ≠ service in SOA
SOA is an architectural style
service is a basic building block of SOA-based
solution which meets 8 key principles
Summer 2013
13. Technologies/Standards for Web Services
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message
Format
Message
Transfer
Message
Type
Definition
Interface
Definition
Other
technical
documents
Summer 2013
14. Technologies/Standards for Web Services
Enterprise
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message XML
Format
Message SOAP, HTTP
Transfer
Message XSD
Type
Definition
Interface WSDL
Definition
Other WS-*
technical
documents
Summer 2013
15. Technologies/Standards for Web Services
Web
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message XML, JSON XML, AtomPub,
Format or AtomPub, JSON
application JSON
specific
Message HTTP HTTP HTTP
Transfer
Message XSD CSDL
Type
Definition
Interface WADL
Definition
Other
technical
documents
Summer 2013
16. Technologies/Standards for Web Services
Research
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message XML, RDF
Format
Message SOAP, HTTP
Transfer
Message RDF
Type Schema,
Definition OWL
Interface SAWSDL,
Definition WSML
Other
technical
documents
Summer 2013
17. Technologies/Standards for Web Services
Web/Research
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message SPARQL, RDF
Format
Message HTTP,
SPARQL Graph
Transfer Store Protocol,
SPARQL
Protocol
Message RDF Schema,
Type OWL
Definition
Interface SPARQL Service
Description
Definition
Other SPARQL Query
Results
technical
documents
Summer 2013
18. Technologies/Standards for Web Services
In this semester
Subpart
Open Google Semantic Linked
of W3C
REST Data Data Web Data
Technical (+OASIS)
Protocol Protocol Services Services
Contract
Message XML XML, JSON AtomPub, AtomPub, XML, RDF SPARQL, RDF
Format JSON JSON
Message SOAP, HTTP HTTP HTTP HTTP SOAP, HTTP HTTP,
SPARQL Graph
Transfer Store Protocol,
SPARQL
Protocol
Message XSD XSD CSDL RDF Schema, RDF Schema,
Type OWL OWL
Definition
Interface WSDL WADL SAWSDL, SPARQL Service
WSML Description
Definition
Other WS-* SPARQL Query
Results
technical
documents
Summer 2013