Intro - Department of Electronic and Information Engineering

Download Report

Transcript Intro - Department of Electronic and Information Engineering

THE HONG KONG
POLYTECHNIC UNIVERSITY
Department of Electronic and Information Engineering
EIE424
Distributed Systems and Network
Programming
Part-II
Case Study: Web Services
1
Lecturer:
Dr. Daniel Pak-Kong LUN
Room:
E-Mail:
Web page:
DE637 Tel: 27666255
[email protected]
www.eie.polyu.edu.hk/~enpklun/EIE424/E
IE424.html
THE HONG KONG
POLYTECHNIC UNIVERSITY
Department of Electronic and Information Engineering
Contents






2
Introduction to Web Services
XML-RPC
SOAP
WSDL
UDDI
Security issues in Web Services
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
References
Ethan Cerami, Web Services Essentials,
O’Reilly, 2002.
U.Wahli, G.G. Ochoa, S. Cocasse and M.
Muetschard, WebSphere Version 5.1 Web
Services Handbook, IBM Redbooks, 2nd Ed,
2004
3
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Introduction to Distributed Systems


Distributed systems have been the development
trend of current computer systems
A distributed system consists of a collection of
autonomous computers
–
–

Offer many advantages comparing with a
centralized multi-user system
–
–
4
linked by a computer network
equipped with distributed software
–
Better price / performance ratio
Fault tolerance
Modular expandability
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Centralized Multi-user System
(popular in 80’s)
Mainframe or
Minicomputer
Terminals
Network
Problems: Single point of failure
Expansive development and maintenance cost
Difficult to expand
5
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Distributed Systems
Heterogeneous type of computers
Network
6
Servers and databases
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Difficulties of Developing a
Distributed System


For a distributed system to function correctly,
application components (e.g. objects)
executing on different computers throughout a
network must be able to communicate
In 80’s, no formal way was provided to allow
communication between application
components running in different computing
platforms
–
7
E.g. a Unix application could never talk with a DOS
application
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services


Start to be aware of the problem in early 90’s
Many companies and organizations began
developing technologies to enable
communication between distributed
components, e.g.
–
–
–
–

8
OMG’s CORBA
Microsoft’s DCOM
Sun Microsystem’s RMI
IBM’s DSOM
Businesses could use these technologies to
integrate applications with business partners’
computer systems
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services





9
Problem: Interoperability among these
technologies was still limited
E.g. DCOM and CORBA cannot communicate
easily
May need a DCOM/CORBA bridge to allow
communication
If DCOM’s or CORBA’s underlying protocols
change, programmers must modify the bridge
to reflect the change
Hence not transparent to programmers
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Emergence of Web Services




10
Web Services improve distributed computing
capabilities by addressing the issue of limited
interoperability
Unlike DCOM and CORBA, use open
standards (nonproprietary)
In 1999, HP first introduces the concept of Web
Services in their product e-Speak, however the
underlying technologies is still proprietary
In June 2000, Microsoft coined the actual term
“Web Services” as a key component of its .Net
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services


Currently many competing frameworks and
proposals for Web Services
Three main contenders:
–
–
–


11
Microsoft’s .NET
IBM Web Services
SUN’s Java System (or formerly Open Net
Environment (ONE))
They all share the basic Web Services
definition and vision
All of the frameworks share a common set of
technologies, mainly SOAP, WSDL, and UDDI
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Advantages of Web Services

Use open standards
–

Use modular approach
–

Use the Web
Can be implemented incrementally
–
12
The same Web Services can be used for different
applications and different companies
Comparatively inexpensive to implement
–

Enable components written in different languages
and for different platforms to communicate
Allow easier startup
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
What exactly is a Web Service?

A Web Service is a service on the Internet that
–
–

Optional features
–
–
13
Use a standardized XML messaging system
Not tied to any one operating system or
programming language
Self-describing: provide public interface to the
service via a common XML grammer
Discoverable: Interested parties can find a service
and locate its interface
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
A Basic Web Service
XML-RPC
SOAP
HTTP GET/POST
14
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Human-Centric vs ApplicationCentric

Traditional web applications are human centric
–
Humans are the primary actors initiating most web
requests
HTTP GET:
HTTP response
with HTML page:
15
Web Server
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services

With web services, we move from a humancentric Web to an application-centric Web
–
Conversation takes place directly between
applications as easily as between web browsers
and servers
XML Request:
Application
XML Response:
On to other
applications
16
Web Server
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Web Services Vision: Automated Web

In the long term, Web services offer the
promise of the automated Web, or “just-in-time”
application integration
1. Discover services
2. Ask for service description
3. Receive service description
4. Invoke remote service
5. Obtain results
Service Registry
Web Server

Application
17



EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Automated Web: Example




18
Travel agencies have been making use of Web
Services to automate the ticket booking services
A customer can make on a Web site various
bookings such as flight ticket, car rental, hotel
room, etc. at one shot
Based on Web Services, business data can be
passed from one party to another
A final plan will be devised that meets the
schedule and budget of the customer
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Service
Registry
• Customer makes
specifications on
schedule, budget
ranges, and other
specific
requirements (e.g.
non-smoking
room etc.)
• System responses
him with a list
packages for him
to choose
19
Web Server
of Company
A
A: Flight ticket
B: Car Rental
C: Hotel Booking
A’s App
Server for
generating
a package
for flight
ticket
Web
server of
Company
C
Web service
gateway
B’s App Server for
generating a
package for car
rental
Web
Server of
Company
B
C’s App
Server for
generating
a package
for hotel
room
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Real Life Example – Providence
Health System





20
Providence Health System - a system of hospitals, clinics
and assisted-living complexes in the Northwest, USA with
over 600,000 members
Launch a Web Service project for some years to make
medical and other records, which are spread across
disparate systems, accessible to patients and physicians
The system aggregates data from 27 physician offices
Those offices store their data in back-end billing, clinical
laboratory and ambulatory care record systems in 10
Oracle databases Providence maintains on its network
Save more than $1 million per year and lead to better
patient care and potentially save lives
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services



ER doctor
Vignette portal server

Eclipsys
Master
Patient
Index
System
21
Web services gateway
built on Infravio software

“Data mart” built on
Oracle databases
Primary care physician
VitalWorks
Enterprise
Practice
manager
Logician
Patient
Record
System
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
1. ER doctor uses portal to request info of a patient
2. Web services gateway manages connection to portal
and kicks off Web service to collect info on patient from
“data mart” and display them in portal
3. Behind the scenes, the “data mart” collects on 30minute intervals the back-end physician systems that
store the records
4. ER doctor is presented with a complete record from
the patient’s primary care physician
5. Primary care physician can use the same portal
interface and Web service to collect medical records
for new or referral patients
22
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Remarks
 Providence Health System is an internal system
 Will have exploited the full power of Web Services
when other external healthcare organizations work
together to jointly provide the services
 However, a more stringent security measure needs
to be devised to protect patients’ data
23
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Do we have Automated Web now?



With Web Services, most of the above processes
can be automated
However, there is no mechanism for automating
business relationships
Human intervention is still required in
–
–
–
–

24
Price bargaining
Negotiation on delivery schedule
Legal ramifications if deliveries are not made
Interaction when the deliverable has bug!
May not be easily solved hence “just-in-time”
application integration may take time to achieve
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Web Service Architecture

Three major roles within the web service architecture:
Service Provider
–
Implement the service and make it available on the Internet
Service Requestor
–
Utilize an existing web service by opening a network
connection and sending an XML request
Service Registry
Service Registry
–
25
Provide a central place where
developers can publish new
services or find existing ones
1. Discover Service
2. Invoke Service

Service
Requestor

Service
Provider
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Web Service Protocol Stack
Searching /
Publishing
Web Services
Describing
Web Services
interface
Discovery
UDDI
Description
WSDL
XML Messaging
XML-RPC, SOAP,XML
Transport
HTTP,SMTP,FTP, BEEP
Encoding messages in XML format
Transporting XML messages between client and server
26
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Deploying Web Services
- Service Requestor Perspective
Step 1:
Find services via UDDI
Retrieve service description file:
WSDL or XML-RPC instructions
Step 2:
Step 3:
Step 4:
27
Create XML-RPC or SOAP Client
Invoke remote service
EIE424
Distributed Systems and Networking Programming –Part II
1. Introduction to Web Services
Deploying Web Services
- Service Provider Perspective
Step 1:
Create core functionality
Create an XML-RPC or
SOAP service wrapper
Step 2:
Create WSDL service description or
XML-RPC integration instructions
Step 3:
Step 4:
Step 5:
28
Deploy service by, e.g.
installing an App Server
Register new service via
UDDI