Service Oriented Programming 1 Javier Espinosa, PhD

Slides:



Advertisements
Similar presentations
Pierre-Johan CHARTRE Java EE - JAX-RS - Pierre-Johan CHARTRE
Advertisements

REST - Representational State Transfer
REST Vs. SOAP.
REST Introduction 吴海生 博克软件(杭州)有限公司.
Introduction to Web Services
Siebel Web Services Siebel Web Services March, From
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
Building RESTful Interfaces
SOAP.
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.
SOAP Quang Vinh Pham Simon De Baets Université Libre de Bruxelles1.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Understand Web Services
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Communication in Distributed Systems –Part 2
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
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.
Service-Oriented Programming
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request.
Prepared By : Monika Darji Web Services using REST & JAX-WS.
DP&NM Lab. POSTECH, Korea - 1 -Interaction Translation Methods for XML/SNMP Gateway Interaction Translation Methods for XML/SNMP Gateway Using XML Technologies.
Web Services (SOAP, WSDL, UDDI) SNU OOPSLA Lab. October 2005.
Architecting Web Services Unit – II – PART - III.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Distributed Programming CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
A Limited Definition of Web Services Paul Kopacz CIS* Service Oriented Architecture Instructor: Qusay H. Mahmoud, Ph.D. February.
1 Seminar on Service Oriented Architecture Principles of REST.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Kemal Baykal Rasim Ismayilov
Representational State Transfer (REST). What is REST? Network Architectural style Overview: –Resources are defined and addressed –Transmits domain-specific.
CSCE 315 – Programming Studio Spring Goal: Reuse and Sharing Many times we would like to reuse the same process or data for different purpose Want.
CS 6401 The World Wide Web Outline Background Structure Protocols.
RESTful Web Services What is RESTful?
Web Services An Introduction Copyright © Curt Hill.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
.NET Mobile Application Development XML Web Services.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
REST API Design. Application API API = Application Programming Interface APIs expose functionality of an application or service that exists independently.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
Sabri Kızanlık Ural Emekçi
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
z/Ware 2.0 Technical Overview
WEB SERVICES.
REST- Representational State Transfer Enn Õunapuu
Node.js Express Web Services
Unit – 5 JAVA Web Services
WEB API.
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
$, $$, $$$ API testing Edition
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Middleware, Services, etc.
WEB SERVICES From Chapter 19, Distributed Systems
Introduction to Web Services and SOA
Week 05 Node.js Week 05
Distributed System using Web Services
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Service Oriented Programming 1 Javier Espinosa, PhD

+ Reminder 2

+ Outline Service Oriented Computing Service Services Coordination Service Taxonomy Service Implementation Web Service RESTful Service Case study: CouchDB + Deezer

4

Fill Her Up - Sting 5

+ Service Component exporting operations accessible via a network 6 op 2 op 3 op 1 Service Network Exported Operations URL Applications

+ Service Example " Retrieve the current song listened by a Deezer user " 7 op 2 Service URL XML getCurrentSong ( String user )

op 2 Service URL Operation Call Example 8 getCurrentSong ( "bob" )

op 2 Service URL Operation Call Example 9 …

+ Services' Coordination Application synchronizing ordered calls to services' operations 10 Ordered Calls

+ Services' Coordination Implementation Implemented as a Workflow ( WF ) Activity Calls a service operation Control Flow Operator Specify order among activities 11 Activity Sequence Activity Parallel Service Calls

+ 12 Services' Coordination Example Status Updater Update Twitter Update Facebook Get Song Write Read Write

+ Service Data Oriented Application Support Oriented Application Support Oriented Business Oriented Data Querying Data Provision Data Administration Data Administration Data Processing Stream On-Demand Services Taxonomy ( Overview )

+ Outline Service Oriented Computing Service Services Coordination Service Taxonomy Service Implementation Web Service RESTful Service Case study: CouchDB + Deezer

+ History Evolution of Software Paradigms 15 [ Racoon,1997 ]

+ 16

+ Web Service 17 Provides a standard means of interoperating between applications running on different platforms Exposes an API described in a machine- processable format ( WSDL ) Other systems interact with it using SOAP messages that are conveyed using HTTP and other web-based technologies SOAP HTTP TCP / IP Web Service WSDL

+ C/S: Low Level Primitives 18 Client Server request response - Interaction protocol - Message packaging (marshalling) - Interaction protocol - Message unpackaging (unmarshalling)

+ C/S: Middleware RPC 19 Stub Skeleton Code generated automatically Client Server

+ Web Service Protocol Stack Set of standards addressing interoperability aspects 20 Used for managing Service state Basic Standards

+ Simple Object Access Protocol ( SOAP ) 21 Messaging Framework for passing data back and forth between disparate systems Message structure: Envelop defines what is in the message and how to process it Header defines a set of encoding rules for expressing instances of application-defined data types Body defines conventions for representing RMI calls and responses

+ SOAP Message Example 22

+ Web Service Description Language ( WSDL ) 23 XML document that describes the mechanics for interacting with a particular service what a service does  i.e., the operations the service provides where it resides  i.e., details of the protocol and the specific URL how to invoke it  i.e., details of the data formats and protocols necessary to access the service’s operations

+ WSDL Structure 24 SOAP Messages

+ Web Service Architecture 25

+ Example of Web Services Interaction 26

27 DEMO

+ Stateless Service 28

+ Stateful Service (i) 29

+ Stateful Service (ii) 30

+ Outline Service Oriented Computing Service Services Coordination Service Taxonomy Service Implementation Web Service RESTful Service Case study: CouchDB + Deezer

+ RESTful Service 32 Service that conform to the REST architecture style Offers a simple, interoperable, and flexible way for developing Web applications

+ REST ( i ) 33 Stands for Representational State Transfer Architecture style defined by Roy T. Fielding in his PhD thesis Describes the architecture of the Web Specifies how Web standards are supposed to be used (HTTP, URIs and data formats) Principles Every resource has an ID Use standard HTTP operations for interacting with resources Resources have multiple representations Communications is stateless

+ REST ( ii ) 34 REST is not: A protocol A standard A replacement for Web services (i.e. SOAP) Note: Using HTTP without following the REST principle is equal of abusing HTTP

+ Resource 35 Key abstraction of information, data and operations Everything object (or "thing") in a system can be a resource Each resource is addressable via a URI (Uniform Resource Identifier) Extensible naming schema Works pretty well on global scale and is understood by practically everybody Can be human-readable

+ URI Schema 36 Defines a set of rules for identifying a resource Examples HTTP MAIL mailto : GEO geo : , Spotify spotify : user:javieraespinosa Skype skype : javiera.espinosa LastFM lastfm : //user/javieraespinosa

+ URI Types Uniform Resource Locator ( URL ) Identifies and provides means for locating a resource Uniform Resource Name ( URN ) Persistent even if the resource ceases to exit or is unavailable 37

+ URL Schema and Syntax (i) 38 URL Schema Identifies and provides means for locating a resource scheme : // host [ : port ] path [ ? query ] [ # fragment ] e.g. http :// : 80 /javiera.espinosa ? sk=info Allowed characters 0 … 9 Digit A … Z Alphabet - … ~ ASCII symbols Reserved characters / ? # [ : ! $ & ‘ ( ) * +, ; =

+ URL Schema and Syntax (ii) 39 Principle Encodes non ASCII-symbols and reserved-characters using the triple % HEXADIG HEXADIG Example Hi Zoé !  Hi %20 Zo %C3 %A9 space é !

+ Interacting with Resources ( i ) 40 All resources supports the same API (i.e. HTTP operations) Each operation has a specific purpose and meaning Note: The actual semantics of POST are defined by the server

+ Interacting with Resources ( i ) 41 HTTP Codes

+ Interacting with Resources ( ii ) 42 Example

+ Interacting with Resources ( iii ) 43 Get a resource

+ Interacting with Resources ( iv ) 44 Create/Update a resource

+ Interacting with Resources ( v ) 45 Delete a resource

+ Representation of Resources 46 A resource referenced by one URI can have different representations HTML (for browsers), XML (for application), JSON (for JavaScript) If the client "knows" both the HTTP application protocol and a set of data formats then it can interact with any RESTful service in the world

+ Stateless Communication 47 No client session data stored on the server If there are needs for session-specific data, it should be held and maintained by the client and transferred to the server with each request as needed A service layer that does not have to maintain client sessions is much easier to scale It isolates the client against changes on the server

+ Resource Oriented VS Operation Oriented 48

+ REST in a Nutshell REST is all about  Resources  How to manipulate the resource  How to represent the resource in different ways 49

+ JSON Data Representation Lightweight text format for interchanging structured data Based on a complex data model Similar to XML Fundamental Concepts Object : unordered set of name : value pairs Array : ordered set of values Value : member of the String, Boolean, Object or Array set 50

+ JSON Syntax 51

+ JSON Serialization 52 JSON Parser JSON Serializer.NET object JSON Object class Person { string name; int age; } { “ age ” : 42, ” name ” : ” John ” }

+ Books 53

54 DEMO

+ Outline Service Oriented Computing Service Services Coordination Service Taxonomy Service Implementation Web Service RESTful Service Case study: CouchDB + Deezer

?

+ Business Oriented Used by final users Examples File Synchronization Services iCloudDropboxSkyDriveGoogle Drive

Application Support Oriented Application Support Oriented Used by a other applications as building blocks Examples Platform as a Service Virtual MachineStorageMessage Queues

+ Data Provision Service interface example Set getCollection ( ) Set getCollection ( String collectionName ) Gives read access to a set of typed collections

On-Demand Communication Protocol Request - Response The client will block until ALL the collection is retrieved

Continuous Communication Protocol Publish – Subscribe ( i.e. Push ) The client specifies a callback for receiving the data RSS

+ Data Administration Offers operations for manipulating typed collections and their elements Service Interface example + Boolean update ( T element ) + Boolean insert ( T element ) + Boolean delete ( T element )

+ Data Processing Provides a set of operations for querying (and processing) data Service Interface example Real count ( Set collection ) Boolean contains (Set collection, T element ) Set filter ( Set collection, String condition ) Set > groupBy ( Set collection, String condition )

+ Data Querying Evaluates query expressions and return their results Service Interface example Set evaluate ( String queryExpression ) YQL expression example select * from flickr.photos.search where text = “San Francisco”