08/10/09 Web Transactions 1
Web-based Transactions
Fulvio Corno
08/10/09 Web Transactions 2
Evolution
The world wide web, if we analyze the involved technologies, evolved through 3 main phases:1.Static and informative Web2.Dynamic and interactive Web3.Integrated and application-oriented Web
E-commerce and e-business are a particular application domain of Phase 3.
08/10/09 Web Transactions 3
Summary
Static Transactions Dynamic Transactions Database-driven Transactions Rich-Client Asynchronous Transactions
08/10/09 Web Transactions 4
Static web transaction
Client
Web server
Internet
URL http request
HTMLfiles
http responsedisplaypage
TCP/IP
path
browser server file system
HTMLsend
08/10/09 Web Transactions 5
Adopted standards URL (uniform resource locator) for finding
web pages HTML (hyper text markup language) for
writing web pages GIF (graphics interchange format) for
images HTTP (hyper text transfer protocol) for
client-server interaction TCP/IP (transmission control protocol over
internet protocol) for data transfer
08/10/09 Web Transactions 6
URL
http://elite.polito.it/~corno/index.html
DNS
130.192.5.26
TCP
Contact server
File system
URI Rewriting
HTML file contents
/home/corno/public_html/index.html
RFC 2396http://www.w3.org/Addressing/
08/10/09 Web Transactions 7
HTTP protocol
GET /~corno/index.html HTTP/1.0Accept: text/htmlAccept: image/gifUser-Agent: CornoSoft SuperBrowser 9.45
HTTP/1.0 200 OKDate: Monday, 01-Jan-2001 00:00:00 GMTServer: Apache 1.3.0MIME-Version: 1.0Last-Modified: 31-Dec-2000Content-type: text/htmlContent-lemgth: 3021
<HTML> . . .
RFC 2616, RFC 2617http://www.w3.org/Protocols
08/10/09 Web Transactions 8
Static web transaction
Browser
Webserver
Diskaccess
t0
t1
t2
t3
t4
t6
t7
t8
t9
t5
t’0
t’1
total response time
server response time user think timenetwork transfer time
08/10/09 Web Transactions 9
Response time
Browser elaboration time (t0-t1): power uf the users’ computer
Transmission time for http request (t1-t2): latency of Internet connection
Browser
Server
Disk
t0
t1
t2
08/10/09 Web Transactions 10
Response time
Server elaboration time (t2-t3, t6-t7): power of the server and number of simultaneous accesses
Disk access time (t3-t6): I/O architecture del server and number of simultaneous accesses
Browser
Server
Disk
t0
t1
t2
t3
t4
t6
t7
t5
08/10/09 Web Transactions 11
Response time
Transmission time for the HTML page (t7-t8): size of the page and of the images, latency, available bandwidth
Visualization time of the page (t8-t9): power of the users’ computer and complexity of the page
Browser
Server
Disk
t0
t1
t2
t3
t4
t6
t7
t8
t9
t5
08/10/09 Web Transactions 12
Examples
www.w3c.org
08/10/09 Web Transactions 13
Summary
Static Transactions Dynamic Transactions Database-driven Transactions Rich-Client Asynchronous Transactions
08/10/09 Web Transactions 14
Dynamic web transaction
Client
Web server
Internet
URL http request& POST data
http responsedisplaypage
TCP/IP
com-mand
browser server application
HTMLsend
Application
para-meters
logic
08/10/09 Web Transactions 15
Adopted standards
HTTP-POST for sending user-specified data CGI (common gateway interface), ISAPI
(internet information server application programming interface), server-side script, java servlet for integrating application logic into web servers
ASP (active server pages), PHP, PERL as new languages for application development
08/10/09 Web Transactions 16
URL (HTTP GET)
http://www.cad.polito.it/pap/pap.pl?author=Corno
CPU
Application
HTML
Parameters
DiskLibraries
08/10/09 Web Transactions 17
Dynamic web transaction
Browser
Webserver
Applicationserver
t0
t1
t2
t3
t5
t6
t7
t8
t9
t4
total response time
application timetotal server time
t’0
t’1
08/10/09 Web Transactions 18
Response time
Communication time between web server and application server (t3-t4, t5-t6): speed of the local network
Execution time of the application (t3-t6): server power, number of accessese, complexity of the application
Browser
Web
Application
t0
t1
t2
t3
t5
t6
t7
t8
t9
t4
08/10/09 Web Transactions 19
Examples
www.sun.com www.lastampa.it www.altavista.com
08/10/09 Web Transactions 20
Summary
Static Transactions Dynamic Transactions Database-driven Transactions Rich-Client Asynchronous Transactions
08/10/09 Web Transactions 21
Database-driven transactions
Client
Web server
Internet
URL http& POST
httpdisplaypage
TCP/IP
com-mand
browser server application
HTMLsend
Application
para-meters
database
data
Database
query
08/10/09 Web Transactions 22
Adopted standards
Cookies for storing the state of a session Java, JavaScript, ActiveX, Flash to program
the user interface on the browser SQL (structured query language), ODBC
(open database connectivity) to access data bases
08/10/09 Web Transactions 23
URL (HTTP GET)
http://www.cad.polito.it/pap/pap.pl?author=Corno
CPU
Application
HTML
Parameters
DiskLibraries
Database
08/10/09 Web Transactions 24
Database-driven transaction
Browser
Webserver
Applicationserver
Databaseserver
t0
t1
t2
t3
t5
t6
t7
t8
t9
t4
t’0
t’1
total response time
application timetotal server time
database time
08/10/09 Web Transactions 25
Response time
Application: server power, number of accesses, complexity of application
Database: number of queries, complexity of queries, size of the database
Communications: local network
Browser
WebApplication
t0
t1
t2
t3
t5
t6
t7
t8
t9
t4
t’0t’1
Database
08/10/09 Web Transactions 26
Examples
www.amazon.com
08/10/09 Web Transactions 27
Summary
Static Transactions Dynamic Transactions Database-driven Transactions Rich-Client Asynchronous Transactions
08/10/09 eBWA-www2eB 28
Web 2.0
Web applications support social interaction models
Peer exchange and user-contributed content instead of rigid publisher/reader pattern Online communities
Rich, dynamic, interactive user interfaces Integration of contents across web sites
(mashups)
08/10/09 Web Transactions 29
Rich-Client Asynchronous Transactions
Client
Web serverInternet
URL http& POST
httpdisplaypage
TCP/IP
com-mand
browser server application
HTMLsend
Application
para-meters
database
data
Database
query
Client-sideApplication
runtimeevents
DOM
http
XML/JSON
08/10/09 Web Transactions 30
Adopted standards
Dynamic HTML: DOM, Javascript, CSS JavaScript, Flash to handle a runtime
environment on the browser DOM (XHTML Document Object Model) to allow
on-the fly modification of the web page CSS 2.1 to modify attribute and handle objects
AJAX: Asynchronous Javascript and XML XMLHttpRequest for asynchronous
communication to the server Data transfer formats: JSON, XML, RDF, RSS,
Atom, FOAF, ... Mash-up technology
08/10/09 Web Transactions 31
Rich-client transaction
Browser
Webserver
Applicationserver
Databaseserver
t9t0
t1
t2
t3
t5
t6
t7
t8
t4
t’0
t’1
Runtime