2b.1 Grid Computing Software Infrastructure Background information ITCS 4146/5146, UNC-Charlotte, B. Wilkinson, 2007 Feb 2, 2007 History, remote procedure.

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Web Service Architecture
31242/32549 Advanced Internet Programming Advanced Java Programming
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
RPC Robert Grimm New York University Remote Procedure Calls.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
A1.1 Assignment 1 “Deploying a Simple Web Service”
WEB SERVICES DAVIDE ZERBINO.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
3c.1 Elements of a WSDL document. 3c.2 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
3b.1 Web Services Part II Implementation details ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3b version 0.1.
Comparison of the RMI and the socket APIs
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
3d.1 More on XML XML Schema Definition Language (XSD)
Web Service What exactly are Web Services? To put it quite simply, they are yet another distributed computing technology (like CORBA, RMI, EJB, etc.).
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
Web Services Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
Processing of structured documents Spring 2003, Part 6 Helena Ahonen-Myka.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
6-1.1 Grid Computing Software Infrastructure I: Web services Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC.
6-1.1 Grid Computing Software Infrastructure I: Web services © 2010 B. Wilkinson/Clayton Ferner. Spring 2010 Grid computing course. slides6-1.ppt Modification.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
WSDL Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
Web Services (SOAP, WSDL, and UDDI)
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Dodick Zulaimi Sudirman Lecture 14 Introduction to Web Service Pengantar Teknologi Internet Introduction to Internet Technology.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Web Services Standards. Introduction A web service is a type of component that is available on the web and can be incorporated in applications or used.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Chapter 10 Intro to SOAP and WSDL. Objectives By study in the chapter, you will be able to: Describe what is SOAP Exam the rules for creating a SOAP document.
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
© Drexel University Software Engineering Research Group (SERG) 1 An Introduction to Web Services.
1 Web Services Web and Database Management System.
XML and Web Services (II/2546)
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Kemal Baykal Rasim Ismayilov
6-1.1 Grid Computing Software Infrastructure I: Web services Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC.
WSDL : Web Service Definition Language Dr. Yuhong Yan NRC-IIT-Fredericton Internet logic.
Web Services An Introduction Copyright © Curt Hill.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
INFSO-RI Enabling Grids for E-sciencE Web Services Mike Mineter National e-Science Centre, Edinburgh.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
1 Web services for DIP LDIWG meeting C.H.Sicard 7 Jan 2003.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
From last time Grid computing concept started in mid-90’s
An Introduction to Web Services
Sabri Kızanlık Ural Emekçi
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Outline SOAP and Web Services in relation to Distributed Objects
Outline SOAP and Web Services in relation to Distributed Objects
Web Server Administration
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
WEB SERVICES DAVIDE ZERBINO.
Web Services Introduction
Introduction to Web Services
Distributed System using Web Services
Distributed System using Web Services
Presentation transcript:

2b.1 Grid Computing Software Infrastructure Background information ITCS 4146/5146, UNC-Charlotte, B. Wilkinson, 2007 Feb 2, 2007 History, remote procedure calls Service-Oriented Architecture Web services Implementation

2b Distributed computing Remote Procedure calls (RPC) Concept of service registry Beginnings of service oriented architecture Object oriented approaches CORBA (Common Request Broker Architecture) Java Remote Method Invocation (RMI) Software Techniques: Web services Adopted for grid infrastructure components Mark-up languages, HTML XML Client-server model Sockets InternetWWW Networks

2b.3 Distributed Computing Concepts One of the underlying concepts is the client-server model. Client Server Request service Server response Example Database Network

2b.4 Remote Procedure Call Early “client-server” system introduced in 1980’s. Allows a local program to execute a procedure on a remote computer and get back results from the procedure. Basis of certain remote operations such as mounting remote files in a shared file system.

2b.5 Remote Procedure Call Fundamental issues We need to know how and where to make the call. Basic RPC requires calling program to know details about how to make the call (meaning and types augments and return value) Calling program also needs to know where to send request.

2b.6 Service Registry RPC introduced concept of a service registry, a third party used to identify location of “service” (procedure). Using a service registry is now part of what is now called a Service-Oriented Architecture.

2b.7 2. Find 3. Bind 1. Publish Service-Oriented Architecture Service requester Service registry Service provider

2b.8 Service-Oriented Architecture Steps: Services “published” in a Service registry. Service requestor asks Service Registry to locate service. Service requestor “binds” with service provider to invoke service.

2b.9 Later “RPC” systems (1990’s) Later forms of remote procedure calls in 1990’s introduced distributed objects: Examples CORBA (Common Request Broker Architecture) Java RMI (Remote Method Invocation)

2b.10 Some aspects for a better system Need: Universally agreed standardized interfaces Inter-operability Flexibility Internet standards (using Internet as network communication). Enter Web services and XML

2b.11 Web Services Introduced in the Software components designed to provide specific operations (“services”) accessible using standard Internet technologies and standardized protocols. The specific standards and protocols will be described shortly. For machine interaction over a network.

2b.12 Key aspects Has similarities with RMI and other distributed object technologies (CORBA etc.) but: Web Services are platform independent –They use XML –They use standardized packaging and Internet network protocols.

2b.13 Service Description Need a way of formally describing a service, what is does, how it is accessed, etc. Concept of an Interface Description Language (IDL) developed previously.

2b.14 XML-based Web Services XML provides a flexible basis for storing and retrieving service information on web services. In web services, the IDL is an XML language. Called Web Service Definition Language (WSDL)

2b.15 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties of a service: What it is - operations (methods) it provides. How it is accessed - data format, protocols. Where it is located - protocol specific network address. W3C -- The World Wide Web Consortium (W3C),

2b.16 Simple Object Access Protocol (SOAP) Communication protocol for passing XML documents. W3C specification describes SOAP as: “SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses.” SOAP originally abbreviation of Simple Object Access Protocol, but now simply SOAP.

2b.17 Simple Object Access Protocol (SOAP) Provides mechanisms for: –Defining communication unit - a SOAP message –Error handling –Extensions –Data representation –Remote Procedure Calls (RPC’s) –Document-centric approach for business transactions –Binding to HTTP

2b.18 Web Service Protocols Usually a HTTP transport protocol carries SOAP (Simple Object Access Protocol) messages holding XML documents. XML document SOAP message HTTP envelope

2b.19 SOAP Envelope <SOAP-ENV:Envelope xmlns=“ envelope/”>... namespace

2b.20 What goes down the Wire HTTP packet containing: –Stuff about context, transactions, routing, reliability, security –SOAP message –Attachments XML/SOAP standardization body, World Wide Web Consortium (W3C) covers SOAP and attachments.

2b.21 Service registries

2b.22 Universal Description Discovery, and Integration (UDDI) Registry Web service registries can be based upon UDDI registries introduced in UDDI specification standardized by OASIS (Organization for the Advancement of Structured Information Standards) See:

2b.23 Notes UDDI registry is a web service itself. UDDI registry itself has to be known to both client(s) and service. Usually some form of service registration and locator needed. In grid computing, basic locator service is called an index service.

2b.24 Steps to access a web service in a Service-Oriented Architecture Client (Service requester) Server (Service provider) UDDI Service registry Publish Find WSDL Service definition UDDI Service definition Location of service Give me your WSDL WSDL Request service operation Result

2b.25 Question Could the WDSL document be provided by the registry, and if so, is that better? Answer

2b.26 Web Services “Stack” HTTP transport SOAP message carrying XML documents WSDL (Web Services Description Language used to describe message syntax for invoking a service and its response. UDDI (Universal Description, Discovery and Integration) used as web service discovery mechanism.

2b.27 Web Services Stack HTTP WSDL Service description UDDI Service discovery SOAP + XML Service invocation Service message transport ActivityProtocol/Language

2b.28 Web Service Implementation WSDL, containers, stubs, SOAP …

2b.29 Web Service Container Web Services generally “hosted” in a web service container – software environment that provides communication mechanisms to and from the web services and clients.

2b.30 Several possible software environments designed for web services: Apache Axis (Apache eXtensible Interaction System) IBM Websphere Microsoft.NET J2EE (Java 2 Enterprise Edition) server container Candidate for hosting web services especially in enterprise (business) applications.

2b.31 Apache Axis available for free down (Windows or Linux): Used for a web service assignment in Fall 2004/Fall 2005 grid course, see home page. Apache Axis requires an application server. –Can be installed on top of a servlet engine such as Apache Jakarta Tomcat. –However, could be installed on top of a fully- fleldged J2EE server.

2b.32 Web service environment Web service container Web services Client Will use an Application server (servlet engine) (e.g. Apache Jakara Tomcat ) (e.g. Apache Axis) Network SOAP messages carried with HTTP transport

2b.33 Client-Service Implementation In the implementation, it is convenient to use client and service stubs - java classes for interfacing to the web service SOAP messaging.

2b.34 Client Stub Between client code and the network is a client stub, sometimes called client proxy. Client stub responsible for taking request from client and converting request into a SOAP request on network - marshalling. Also responsible for receiving SOAP responses on network and converting to a suitable form for client.

2b.35 Server Stub Between service and network is a server stub, sometimes called a skeleton. Responsible for receiving SOAP request from client stub and converting it into a suitable form for the service - unmarshalling. Also converts response from service into a SOAP message for client stub.

2b.36 Web Service Application Call client stub SOAP request Request service Result returned SOAP response Client receives result

2b.37 Steps Client calls client stub. SOAP request sent across network Server stub receives request and sends request to service Service send result to serve stub Server stub sends result across network to client stub. Client stub sends result to client.

2b.38 Math Web service For concreteness, let us consider web service used in Fall 2004/2005 assignment 1. A simple version is: public class MyMath { public int squared(int x) { return x * x; }

2b.39 Question What does this service do? Answer

2b.40 Web Service Description Recall use an Interface Description language (IDL) called WSDL to formally describe a service, what is does, how it is accessed, etc.

2b.41 Parts of a WSDL Document Root definitions - namespaces portType definitions - abstract definition of service Message definitions - parameters in method signature Type definitions - data types Binding definitions - to protocols i.e. SOAP over HTTP Service definitions - where service is, ports

2b.42 <wsdl:definitions targetNamespace=" xmlns:apachesoap=" xmlns:impl=" xmlns:intf=" xmlns:soapenc=" xmlns:wsdl=" xmlns:wsdlsoap=" xmlns:xsd=" <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> Namespaces Message definitions portType Bindings Service definitions WSDL file for math web service

2b.43 Root Definitions Namespaces <wsdl:definitions targetNamespace=" xmlns:apachesoap=" xmlns:impl=" xmlns:intf=" xmlns:soapenc=" xmlns:wsdl=" xmlns:wsdlsoap=" xmlns:xsd="

2b.44 portType Describes “What” - an abstract definition of service operation. Uses the elements: message definitions - a set of parameters referred to by method signature, decomposed into parts type definitions - defines all data types used

2b.45 <wsdl:input message="impl:squaredRequest“ name="squaredRequest"/> <wsdl:output message="impl:squaredResponse“ name="squaredResponse"/> portType Definitions

2b.46 Message Definitions Standard XML integer type – no special types in this example

2b.47 Binding Describes “how” the elements in abstract interface (portType) are converted in actual data representations and protocols e.g. SOAP over HTTP.

2b.48 <wsdlsoap:binding style="rpc" transport=" soap/http"/> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> Binding definitions

2b.49 port and service Describe “where” service is. port - describes how a binding is deployed at the endpoint of a network service - a named collection of ports

2b.50 <wsdl:port binding="impl:MyMathSoapBinding“ name="MyMath"> <wsdlsoap:address location=" Port/Service Definitions Where math service is

2b.51 Build and deploy a web service Several ways to create web service within a container and have accessible by clients. Fundamental service components to build: Web service code WDSL service description file Web service stub and client components: Client stub Client code

2b.52 What to create to deploy and test a service ClientClient stub Server stub Service ContainerClient Applications WSDL service description Web service code WDSL service description file Web service stub Client stub Client code

2b.53 In the following, will assume that we are using Apache Axis, which has several tools for building and deploying a web service.

2b.54 Java Web Service (JWS) deployment facility Absolute simplest way in Axis to deplore a web service: First, web service class file with methods created. Then file simply renamed as.jws and dropped into a specific directory that axis expects.jws services to be. Service code with.jws extension interpreted as a web service..jws file automatically compiled if necessary when service called. All public methods in service code available and accessible as service operations. Simple but has restrictions/limitations.

2b.55 jws facility Could actually use web service after deployment with JWS without using a WSDL file nor stubs. One could just use service URL, which would have a.jws extension. Client and service need code to make SOAP calls. However, one would normally create a WSDL file and stubs, and get stubs to handle SOAP.

2b.56 Creating WSDL file Several ways this can be approached: Create service code first and use as basis for WSDL file or Create WSDL file first and use this as basis for the service code Second method probably better from a Software Engineering perspective, but will look at both.

2b.57 WSDL from Service Code Java2WSDL Tool Axis Java2WSDL program generates WSDL file (and its schema) from service code. Program has number of flags including to specify: Name of the output WSDL file (-o flag) Location (URL) of the service (-l flag) Namespace of WSDL file (-n flag) Mapping from package to namespace (-p flag)

2b.58 <wsdl:definitions targetNamespace=" xmlns:apachesoap=" xmlns:impl=" xmlns:intf=" xmlns:soapenc=" xmlns:wsdl=" xmlns:wsdlsoap=" xmlns:xsd=" <!--WSDL created by Apache Axis version: 1.2 Built on May 03, 2005 (02:20:24 EDT)--> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> WSDL file created

2b.59 Stubs from WSDL If we have WSDL document for service, can use tools to generate client and server stubs. –Axis WSDL2Java program generates stubs for use on client and server.

2b.60 Web Service Deployment Descriptor (WSDD) WSDD is an XML language used to describe how to deploy a service. Provides for greater flexibility than with jws “instant” deployment facility.

2b.61 WSDD file for MyService <deployment xmlns=" xmlns:java= "

2b.62 Deployment with WSDD file Once WSDD file say called service.wsdd created, can deploy service with Axis tool, AdminClient: java org.apache.axis.client.AdminClient service.wsdd (WSDD was not used in assignment 1 in Fall 2004/5)

2b.63 Client side programming Once deployed service, want to use it or allow others to use it. Depending upon details of deployed service and web service environment, a simple Java program can be used to access service such as: import localhost.axis.yourusername.MyMath_jws.MyMathServiceLocator; import localhost.axis.yourusername.MyMath_jws.MyMathService; import localhost.axis.yourusername.MyMath_jws.MyMath; public class MyMathClient { public static void main(String args[]) throws Exception { MyMathService service = new MyMathServiceLocator(); MyMath myMath = service.getMyMath(); int x = (new Integer(args[0])).intValue(); System.out.println("The square of " + args[0] + " is " + myMath.squared(x)); }

2b.64 More information Assignment 1 in Fall 2004/Fall 2005 grid computing required one to write and deploy a web service into tomcat container using axis tools, and test it with a simple client, see: This assignment dropped from Spring 2007 to allow us to other new true grid computing assignments.

2b.65 Quiz (Multiple Choice)

2b.66 What is a WSDL document? (a) One that describes how to access a service and use it (b) One that describes the data of a service (c) One that describes how to use the client code (d) None of the other answers

2b.67 What is SOAP? (a) Something you use to clean yourself (b) A protocol for passing XML documents (c) A protocol for passing object-oriented programs (d) None of the other answers

2b.68 What can UDDI be used for? (a) To transmit data between computers (b) As a universal data description interface (c) As a web services registry (d) To encode the characters of the world

2b.69 What is Apache Axis? (a) A tool used by American Indians (b) A hosting environment for web services (c) A compiler (d) A type of make tool

2b.70 Which of the following contains all the services that have been deployed? (a) Class (b) Shell (c) Container (d) Object

2b.71 What is a client stub? (a) A way of offending a customer (b) Code between the client code and the network (c) A document that explains the client code (d) None of the other answers

2b.72 More information on Axis

2b.73 Questions