protocols and interaction models for web services csci 8710 fall 2006

98
Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Upload: georgina-quinn

Post on 28-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocols and Interaction Models for

Web ServicesCSCI 8710Fall 2006

Page 2: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

OutlineNetworksClient/ServerPeer-to-PeerWeb Service Protocols

Page 3: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

NetworksOriginated with ARPANET

Packet-switchedStarted in late 1960’sARPA - Advanced Research Projects

Agency (now known as DARPA)Then: about 10 nodes (~100 million today)Goal: resource sharingResult: reached goal + demonstrated

importance of networks as tool for communication and interaction via email

Page 4: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

NetworksKleinrock at UCLA

Did much of the early work in queueing models of networks, measurement and management of networks and network protocols

Page 5: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Networks1983: ARPANET split into two

networks:MILNET (military purposes)ARPANET (reduced version)Term “Internet” first introduced -- came into being in 1983

Page 6: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Today’s InternetWorldwide collection of interconnected

WANsCharacterized by:

IP - networking protocolTCP - process-to-process protocol

Page 7: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Types of NetworksWANsLANsLAN-to-WAN connectionHome-to-WAN connection

Page 8: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

WANs Wide-area network

City-wide, muti-city, country-wide, continent …

Uses packet switching: Messages transmitted between hosts are broken

down into chunks called packets with some max size

Packet header has routing and sequencing info

Consists of: Packet switches or routers High speed links connecting the routers

Page 9: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

RoutersCommunication computers that:

Store incoming packetsExamine headersLook up routing tablesDecide next router to send packet toPlace packet on output queue for selected

link

Known as “store and forward”

Page 10: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Technologies used to build WANs

X25 - a standard of the ITU (International Telecommunications Union)

ISDN - Integrated Services Digital NetworkService offered by telephone companies;

integrates voice and data over ordinary telephone lines

Frame RelayA high-speed WAN service offered by long-

distance carriers

Page 11: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Technologies used to build WANs (cont’d)

SMDS - Switched Multi-megabit Data ServiceAnother high-speed WAN service offered

by long-distance carriersATM - Asynchronous Transfer Mode

Packet-switched technology that uses small fixed-size packets (53 bytes), called cells, to provide fast switching to voice, video, and data over WANs

Page 12: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

LANsTypically confined to a building or set

of closely located buildingsBoth wired and wirelessMost popular:

10-Mbps Ethernet100-Mbps Ethernet4- or 16-Mbps Token Ring100-Mbps FDDI

Page 13: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

EthernetInvented by Metcalfe in the early

1970sHave bus topology:

computer Network interface card (NIC)

Shared bus

Page 14: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

EthernetComputers connect to a shared coaxial

cable through NICsPackets transmitted by one NIC can be

received by all others: broadcast communicationBut, since packets have destination

addresses, only destination NIC will (typically) copy the packet to the computer’s main memory

Page 15: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Ethernet All NICs can try to talk at once

which reminds EK of a faculty meeting ;^) No central coordinator

CSMA/CD is used: Carrier Sense with Multiple Access / Collision Detection NIC that wants to transmit “listens” to see if a

transmission is in progress (carrier sense) If so, it waits

But two may start “talking” at about the same time (collision)

Collisions are detected and NICs stop “talking”, wait for a randomly selected time period(so they don’t just collide again), and then try to retransmit

Page 16: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

EthernetWhat happens as number of nodes

and/or traffic increases? probability of collision increasesNetwork throughput decreases

Because more bandwidth spent on collisions and retransmissions

Page 17: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Token RingInvented at IBM Research LabsBased on a ring topology:

= computer

= Network interface card (NIC)

ring

Page 18: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Token RingAccess to ring is controlled by a token

(special bit pattern that circulates in the ring)

NIC with token can transmitIf NIC has nothing to transmit, just

passes the token

Page 19: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Token RingSender (NIC with token) inserts the bits

representing its packet into the ringPacket goes around the ring, is copied

by the NIC of the destination addressPacket flows back around to sender;

sender removes packet and performs error checking (compares received packet with sent packet)

Page 20: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Token RingAs more stations are added to the

token ring …Delay in obtaining token increases

Token must circulate through more NICsProbability that token is used by other NICs

increases

Page 21: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

FDDIUses optical fibers and token-passingDiffers in that it uses 2 rings

= computer

= Network interface card (NIC)

ring

Page 22: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

FDDIBenefits of 2nd ring?

Data flows in opposite directions in the 2 rings

If a station fails, the hardware can reconfigure the ring and turn it into a single functioning ring by bypassing the malfunctioning station

Page 23: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

LANs: limits on sizeTwo types of limits:

Physical limitsPerformance limits

Examples:Ethernet physical limits:

Cable no more than 500 m in lengthMininum separation of 3 m between stations

Page 24: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Managing performance limits on

LANsNumber of stations may be limited

because of adverse impact of additional stations on overall performance

Approach:Can divide larger LAN into LAN segments

with fewer stations eachSegments joined by connecting devices

such as routers and bridgesStations that communicate frequently

should be in same segment

Page 25: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Wireless LANsStations communicate via RF (radio

frequency) Modulation of transmitted wave is

interpreted as sequence of 0s and 1sIEEE standard for LANs is the IEEE 802.11

protocolCan transmit data at 1 or 2 Mbps depending on

underlying modulation technology

Page 26: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

IEEE 802.11 protocolProvides a carrier sense signal that

indicates if a transmission is in progressData sent by one station can be received

by all stations in the coverage areaSubject to the “hidden terminal” problem

Happens when walls or other structures obstruct the RF signals

Station C may hear A and B, but they may not be able to communicate with one another

Page 27: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

IEEE 802.11 protocol within their cells or

basic service set (BSS), stations ( ) can communicate with one another and with an access point (AP).

Through the AP stations may communicate with stations in another BSS

Stations may also form an ad-hoc network (without an AP)

BSS

BSS

AP

AP

Page 28: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

IEEE 802.11 protocol: handling interference

Uses CSMA/CA Carrier Sense Multiple Access/Collision Avoidance If channel is sensed idle for time equal to DIFS

(distributed inter frame space), station may transmit Receiver of a correct frame then sends ack frame to

sender after short time (SIFS=short interframe spacing) If channel is busy:

sender defers access, listens again If quiet for DIFS, xmits after random backoff time expiresUse of random prevents all waiting from sending at same

time Doesn’t detect collisions, tries to avoid Transmitted frame contains transmission duration; others

know how long to wait

Page 29: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

IEEE 802.11:handling the hidden

station problemTwo stations (A and B) hidden from

one another may transmit to same station (C)Can use RTS (request to send) and CTS

(clear to send) exchange of frames before actual transmission

B will “hear” C send the CTS to A and will not send.

Page 30: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

LAN-to-WAN connection

LANS usually connect to WANS through dedicated leased lines at T1 (1.544 Mbps) or T3 (45 Mbps) speeds

LANS may be of any typeExample:

3 LANS: 1 FDDI, 1 ethernet, 1 Token ringEach connects to Frame Relay WAN

through router and T1 line

Page 31: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Home to WAN connection

Many alternatives:Dialup modem, 14.4 - 15.6 Kbps

simple, cheapISDN Basic Rate Interface (BRI)

Dialup digital modemSpeed up to 128 Kbps

ISDN Primary Rate Interface (PRI)1.544 Mbps

Leased T1 line1.544 Mbps

Page 32: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Home-WAN connection, continued

High Bit Rate Digital Subscriber Line (HDSL) 1.544 Mbps

Asymmetric Digital Subscribe Line (ADSL) 640 Kbps outbound 6 Mbps inbound Good for web access (http requests are small, returned

images, videos, etc. may be large) Cable modems

Cable is shared; actual bandwidth seen by customer depends on load on network

Most cable modems are asymmetric Typical speeds 1- 10 Mbps downstream, 128 Kbps

upstream

Page 33: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

ProtocolsPurposeIPTCP

Page 34: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocols Protocol:(in this context)

A set of rules governing communication between two computers or two processes over a computer network

Consists of functions/rules for:Addressing Routing

Together ensure that message from A to B arrives at BError detectionError recoverySequence control

Together handle situation in which messages from A are lost or corrupted due to noise or network failures

Flow control To handle situation in which A sends at faster rate than B can

consume

Page 35: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

ProtocolsConnectionless

Messages from A to B are independent of one another; may arrive at destination in order different from transmission orderThink of mailing off a batch of postcards that

together contain the content of a novelGood when data to be exchanged fit into

maximum data unit (all fits on one postcard)

Page 36: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

ProtocolsConnection-oriented

Used when messages that are much larger than the maximum data unit are transmitted

Sequencing and data recovery importantThink of making a phone call: a connection

is set up, and the channel remains open for transmission until you disconnect

Page 37: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocol specification Syntax

Specifies the types of messages that can be sent, the format of those messages, and the meaning of each field in the message

Semantics Specifies the actions taken by each entity when

specific events occurExample: when a message arrives, when a message

times out, etc.

Page 38: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocol specification ISO (International Standards Organization)

defined a seven-layer model, the Reference Model for Open Systems Interconnection1. Physical2. Data link3. Network4. Transport5. Session6. Presentation7. Application

Page 39: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

(ISO) OSI Each entity at layer n communicates only

with remote nth-layer entities Layer n uses local services provided by layer

n-1

N-th layer

(N-1)th layer

N-thlayer

network

N-th layer protocol

(N-1)th layer

Page 40: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocol LayersData exchanged between nth-layer

entities have to be: physically processed by layers n to 1 at

the sending computerTransported through the networkMoved from layer 1 to n at the receiving

end

Page 41: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Protocol LayersEach entity at layer n exchanges a

Protocol Data Unit (PDU) with a remote layer n entity

PDU has:Layer n dataLayer n header

The layer n PDU becomes layer (n-1) data:Layer (n-1)

header

<---------- layer (n-1) data ---------------------->

Layer nheader

Layer n data

Page 42: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP/IP IP = Internet Protocol

a network layer protocol TCP = Transmission Control Protocol

A transport layer protocol Connection-oriented

UDP = User Datagram Protocol A transport layer protocol A connectionless protocol

Together: TCP/IP protocol suite; forms the core of the internet

Page 43: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

On top of TCP:HTTP- hypertext transfer protocol

(web)FTP - file transfer protocolSMTP - simple mail transfer protocolTelnet - an interactive login protocol

Page 44: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

On top of UDP:RPC - remote procedure call

NFS - network file sytem - runs on top of RPC

DNS - Domain Name ServerSNMP - Simple Network Management

Protocol

Page 45: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Internet Protocol (IP)Specifies:

the formats of packets sent across the Internet,

the mechanisms used to forward these packets through a collection of networks

Routers from source to destination

Page 46: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Internet Protocol (IP)Every host connected to the internet

has a unique address: an IP addressA 32-bit numberRepresented by a dotted notation:

129.192.4.5, for exampleEach of the four numbers represents the

value of 8 bits in the addressDivided into prefix and suffix

Prefix: indicates the networkSuffix: host within the network

Page 47: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Internet Protocol (IP)Number of bits allocated to prefix

determines number of unique network numbers

Number of bits allocated to suffix determines number of hosts per network

Currently, IPv4 uses 32-bit address fieldBut … may be approaching limits of

number of servers to be on …IP v 6 uses 128 bits

Page 48: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Internet Protocol (IP)IP datagram: the data unit transported

by IP IP is connectionless and

can “lose” datagrams can deliver datagrams out-of-order (may

travel to destination by different routes) is known as “best effort” service

Page 49: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Internet Protocol (IP) Header is 20 bytes long

4 bytes for IP address of source 4 bytes for IP address of destination

Performs routing of datagrams from source to destination

IP implementation at router maintains an in-memory routing table; used to search for next router or host to which to forward the datagram.

Page 50: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Tuesday’s classKelly,

Stop here …On Thursday, pick up here with TCP…

Thanks!Ek

Page 51: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Transmission Control Protocol (TCP)

Provides a:Connection-orientedReliableFlow-controlledEnd-to-end

communication service between processes residing at hosts connected through a network

Page 52: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Transmission Control Protocol (TCP)

Guarantees that data is delivered and is in-order

Provides full-duplex communicationBoth ends of the connection can

communicate simultaneouslyProvides a stream interface

Accepts a continuous stream of bytes from the application to be sent through the connection

Page 53: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Transmission Control Protocol (TCP)

PDU exchanged at the TCP level is called a segmentHeader is 20 bytes longSegments reside within IP datagrams

Connection must be established before data can be exchanged:Three-way handshake is mechanism for

establishing connections

Page 54: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP: three-way handshake

host A establishes connection with host B A sends SYN(synchronization) segment to B (#1) B replies with a SYN segment(#2); places A in

queue of incomplete connections A sends ACK to B (#3 of 3-way handshake) Connection complete when B receives ACK Data may now be exchanged in both directions

Note: Denial of Service attack: fills queue of incomplete connections(A never

sends the ACK) -- host can’t accept new connections

Page 55: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP - closing the connection

TCP connection closing is half-close Host closing connection indicates that host won’t

send more data but is still willing to receive Host A to host B

Host A sends FIN to host B B replies with ACK B can still send to A

To completely close the connection Host B sends FIN to host A A replies with ACK

So, total of 4 segments to close the connection

Page 56: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCPError control:

Handled via ACKs, timeouts, and retransmission

Flow control:Implemented via a sliding window mechanism

Window = max num bytes sent before an ACK is received

Window size limited by Buffer size at receiverNetwork congestion perceived by sender

Page 57: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP flow controlConnection first established

Receiver advertises Wm - its maximum window size

Sender’s window size can’t exceed this or receiver will have buffer overflow and packets will be lost

Network congestion causes some packets to be dropped at some router or to not be ack’d before a timeout occursSender then reduces window size to Wc , which

reduces its transmission rate and attempts to mitigate network congestion

Page 58: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP flow controlTwo phases:

Slow startWc is initialized to 1, increased by 1 for each ACK

received (note ACK count is cumulative)Wc = 1, 1 packet sent, ACK’d in 1 RTT -> Wc now 2

Wc = 2, 2 packets sent, ACK’d in 1 RTT ->Wc now 4

Wc = 4, 4 packets sent, ACK’s in 1 RTT -> Wc now 8

… doubles every RTT up to max of Wm

Congestion avoidance

Page 59: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006
Page 60: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP control flowNetwork congestion detected by

Receipt of a duplicate ACK (receiver received an out-of-sequence segment)

Timeout at the sender

Response:Save current value of window size to Wssthr

(slow start threshhold window size)Reduce Wc

Page 61: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP flow controlTCP actually has different versions.TCP Reno (a common version) reduction of

window size upon congest works like this:If duplicate ACK received: Wc divided by two,

enter congestion avoidance phaseIf a timeout occurs, Wc set to 1; go back to slow

startWhen Wc reaches Wssthr during slow start,

switch to congestion avoidance

Page 62: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP flow controlCongestion avoidance phase:

Wc increased by 1/Wc for every ACK received

XTCP, throughput of a TCP connection, measured in segments per second:Decreases with RTTDecreases with probability packets are

droppedIncreases with Wm, measured in segmentsDecreases with T0, TCP timeout value

Page 63: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006
Page 64: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

TCP performance and limitations …

… some derivation of performance formulas, to be performed when EK returns …

Page 65: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client/ServerClient/Server paradigmServer typesHTTP

Page 66: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client/Server Paradigm

Client process:Runs on desktop or user workstation and

provids GUI code for data capture and display

Makes requests for specific services to be performed by one or more server processes, usually located at remote machines

Executes a portion of the application code

Page 67: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client/Server Paradigm

Server process Executes a set of functionally-related

services that usually require a specialized hardware/software component

Never initiates a message exchange with any client; a passive entity that listens to client requests, executes them, and replies to clients

Usually runs on a machine that is faster and has more main memory and disk space than a client machine

Page 68: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client-Server interaction protocol

Request-reply protocolClients send requestsServers reply to client requestsMay run on TCP, UDP, or other

Page 69: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client-Server Server may receive many requests

Forms a queue of requests at server Serving only one request at a time may

Under-utilize machineLimit server throughput Increase response time to clients

Most servers create multiple processes or threads to handle the queue of incoming requests

As number of threads increases, response time will initally decrease (clients don’t need to wait as long) and then go up or flatten out as the multiple threads contend for resources

Page 70: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client-ServerTwo-tier architecture

Client runs: GUI + application logicServer runs: SQL server

Three-tier architectureClient runs: GUI Application server runs: application logic

(and acts as client to…)SQL server

Page 71: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Fat clients v. thin clients

“Fat” clients incorporate more of the transaction logic

than thin clientstend to require fewer interactions with

servercost: higher computing requirements for

client

Page 72: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client-Server: caching

Cache = copy of data stored “closer” to clientclient may keep cached copy of fileserver may keep main memory cache of

recently/frequently accessed filesweb server may cache popular docs

use of caches can improve performance and increase system scalability

Page 73: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Client-server: cachingcache hit – data of interest found at

the cachecache miss – not found

Benefits: better performanceCosts: need to maintain consistency of

cache, extra processing time for cache misses

Page 74: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Caching - exampleFile server receives requests to read 8-KB

file blocks at a rate of 900 req/secWhat is the effect at the server if 30% of

requests generate a cache hit at the client?(1-0.30) * 900 req/sec = 630 req/sec at server

What if 25% of the requests that reach the server can be satisfied from server’s main memory cache?(1-0.25) * 630 req/sec = 472.5 req/sec

Page 75: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Server typesfile serversdatabase serversapplication serversgroupware serversobject serversWeb serverssoftware servers

Page 76: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

File serversprovide networked computers with

access to a shared files system Example: NFS (networked file system)

can use UDP (usually) or TCP/IP

Client requests:look up directoryretrieve file attributesread and write blocks from files

Page 77: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Database serversprovide access to one or more shared

databasesClient requests:

SQL statements

Server response:list of records

Page 78: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Application serversprovide access to remote procedures

invoked through the Remote Procedure Call (RPC) mechanismtypically implement business logic & make

SQL calls to backend DB engine

Page 79: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Transaction Processing Monitors

(TPMs)perform load balancing amoung

several servers that implement the same service

Page 80: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Groupware Serversprovide access to unstructured and

semi-structured info such as text, images, mail, BBoards, workflows

Page 81: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Object serverssupport remote invocation of methods

in support of distributed object-oriented application development

ORB = Object Request Broker – the “glue” between clients and remote objects

Page 82: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Software serversused to provide executables to

Network Computers (NCs), which do not have hard drives

Page 83: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Web serversprovide access to documents, images,

sound, executables, and downloadable applications through HTTP

Page 84: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTML/HTTPHTML = markup language for

documents: formatting, links to other documents, links to inline images, video, software, etc.

inline images impact performance:single click -> multiple requests

Page 85: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTTP application-level protocol, runs on top of TCP simple request-response interaction: “Web

transaction” map server name to IP address establish TCP connection with server transmit request receive response close TCP/IP connection

in HTTP 1.1 the connection remains open for embedded images

Page 86: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTTP requestrequest includes:

action (GET, HEAD, PUT, POST)URL that identifies info requestedother: type of doc client will accept,

authentication, payment authorization, etc.

Page 87: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTTP responsestatus line (success or failure)meta-info about object returned and

info requestedfile or output generated by server-side

app (CGI script, for example)

Page 88: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTTP“stateless”

single request/response, no continuing conversation

servers don’t have to keep track of clients and their histories

adverse effect on performancenew connection established for every requestin HTTP 1.0 – new connection for document + 1

for every image on the page

Page 89: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006
Page 90: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

HTTP 1.1persistent connection – leaves the TCP

connection open between consecutive operations

avoids many RTT delayssupports “pipeline of requests”

can send multiple requests without waiting for a response

Page 91: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Peer-to-Peer Modelused in sharing files, disk space, even

computing cyclestwo styles

meta-data servermore messages

purely distributedmore scalable

Page 92: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006
Page 93: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Web Service Protocols

IntroSOAPWSDLUDDI

Page 94: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

Web Servicebusiness functionality exposed by a

company, for the purpose of allowing another company or software program to use the service

Components:service providerservice registryservice requester

Page 95: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006
Page 96: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

WSDLWeb services description language

XML formatdescribes services as endpoints operating

on messages containing either document-oriented or procedure-oriented information

describes what service does, where it is, how to invoke it

Page 97: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006

UDDIUniversal Description, Discovery,and

Integrationfor finding services that meet

requirements

Page 98: Protocols and Interaction Models for Web Services CSCI 8710 Fall 2006