Web Technology Basics

Client-Server Service Model
Most Internet Service including SMTP, POP3, FTP etc are running on session-based & stateful protocols, and in Client-Server service model. However, HTTP is quite similar except that it is stateless protocol running on TCP connection,  
imageDifference between Web Site and Web Application 
Web Site is basically a group of static web pages cross-referenced to each other using hypertext links, and it mainly delivers static information. Whereas, Web application dynamically present tailored multi-medial contents based on users’ input. What is more, web app server is more like a portal or interface to retrieve information from remote databases, systems, applications; and present them all in a single webpage.

imageWeb Technology components
There are 3 major components for Web Technology: Markup language for formatting and presenting hypertext documents (HTML), Uniform resource address scheme(URI), and Protocol for transporting messages (request & response) over the network (HTTP).
URI format:
Scheme :// host [:port#] /path/ … / [;url-params] [?query-string] [#anchor]

Scheme
: http; ftp
Host: DNS name or IP address 
/path/: path from the root directory of the server to the desired documents, e.g. /blog/index.html
url-params: session identifiers in the web server supporting Java Servlet API
Query-String: dynamic parameters associated with the request, produced as the result of user-entered variables in HTML formats. E.g ?name= svi&age=18
Anchor: a reference to a positional marker within the requested document, like a bookmark
HTTP Overview
HTTP is a session-based stateless protocol carried on TCP connection, and running on Client-Server or Request-Response paradigm. An HTTP request usually consists of a single block command.  
image In HTTP 0.9 and 1.0, lifetime of session or connection is a single request-response exchange.
But later in HTTP 1.1, persistent TCP connection is provided, which means HTTP session or connection can now outlive a sequence of request-response exchanges until the TCP connection is explicitly torn down. Thus browsing is speeded up by eliminate the need to re-negotiate TCP connection and to go through the TCP slow-start-mechanism.
The Persistent TCP connection in HTTP 1.1 enables batch HTTP requests together (E.g. you request a web page with lots of pictures embedded, and you want both the text and picture portions of webpage to be all displayed in one connection or session while each pic is retrieved using a single request-response exchange).
HTTP Session State maintained by Cookies: HTTP 1.1 persistent TCP connection only maintain the TCP connections throughout the session, but not the HTTP Session State. Those Session States are the information that need to be stored for the successive request-response transactions(E.g. E-commercial websites), which are stored in Cookies.
To be Continued

2 Comments

Comments are closed.