340 likes | 626 Views
THE HONG KONG POLYTECHNIC UNIVERSITY. Department of Electronic and Information Engineering. EIE424 Distributed Systems and Network Programming Part-II Case Study: Web Services. Lecturer: Dr. Daniel Pak-Kong LUN. Room: DE637 Tel: 27666255 E-Mail: enpklun@polyu.edu.hk .
E N D
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering EIE424Distributed Systems and Network Programming Part-IICase Study: Web Services Lecturer: Dr. Daniel Pak-Kong LUN Room: DE637 Tel: 27666255 E-Mail: enpklun@polyu.edu.hk Web page: www.eie.polyu.edu.hk/~enpklun/EIE424/EIE424.html
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering Contents • 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
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 • linked by a computer network • equipped with distributed software • Offer many advantages comparing with a centralized multi-user system • 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
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Distributed Systems Heterogeneous type of computers Network 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 • 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. • 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 • 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 • 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 Servicesin 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: • 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 • Enable components written in different languages and for different platforms to communicate • Use modular approach • The same Web Services can be used for different applications and different companies • Comparatively inexpensive to implement • Use the Web • Can be implemented incrementally • 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 • Use a standardized XML messaging system • Not tied to any one operating system or programming language • Optional features • 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
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Human-Centric vs Application-Centric • Traditional web applications are human centric • Humans are the primary actors initiating most web requests HTTP GET: HTTP response with HTML page: Web Server
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services • With web services, we move from a human-centric 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 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 Service Registry 1. Discover services 2. Ask for service description 3. Receive service description 4. Invoke remote service 5. Obtain results Web Server Application
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Automated Web: Example • 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 A’s App Server for generating a package for flight ticket Web Server of Company A Service Registry A: Flight ticket B: Car Rental C: Hotel Booking • 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 Web server of Company C Web service gateway C’s App Server for generating a package for hotel room Web Server of Company B B’s App Server for generating a package for car rental
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Real Life Example – Providence Health System • 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 Vignette portal server Primary care physician ER doctor VitalWorks Enterprise Practice manager Web services gateway built on Infravio software Eclipsys Master Patient Index System Logician Patient Record System “Data mart” built on Oracle databases
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services • ER doctor uses portal to request info of a patient • 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 • Behind the scenes, the “data mart” collects on 30-minute intervals the back-end physician systems that store the records • ER doctor is presented with a complete record from the patient’s primary care physician • Primary care physician can use the same portal interface and Web service to collect medical records for new or referral patients
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
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 • 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 • Provide a central place where developers can publish new services or find existing ones Service Requestor • Discover Service • Invoke Service Service Provider
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Web Service Protocol Stack Searching / Publishing Web Services Discovery UDDI Description WSDL Describing Web Services interface XML Messaging XML-RPC, SOAP,XML Transport HTTP,SMTP,FTP, BEEP Encoding messages in XML format Transporting XML messages between client and server
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Step 1: Step 4: Find services via UDDI Invoke remote service Deploying Web Services - Service Requestor Perspective Retrieve service description file: WSDL or XML-RPC instructions Step 2: Step 3: Create XML-RPC or SOAP Client
EIE424 Distributed Systems and Networking Programming –Part II 1. Introduction to Web Services Step 1: Create core functionality Deploying Web Services - Service Provider Perspective Create an XML-RPC or SOAP service wrapper Step 2: Create WSDL service description or XML-RPC integration instructions Step 3: Deploy service by, e.g. installing an App Server Step 4: Register new service via UDDI Step 5: