2. web architecture

Upload: jatin-jain

Post on 04-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 2. Web Architecture

    1/32

  • 7/31/2019 2. Web Architecture

    2/32

    Basic Web Architecture

    Web ArchitectureExtensibility

    Other Transfer Protocols

  • 7/31/2019 2. Web Architecture

    3/32

    This section describes the current architecture ofthe World Wide Web (WWW).

    The following sections describe :

    The basic two-tier architecture of the web in whichstatic web pages (documents) are transferred frominformation servers to browser clients world-wide,

    Extensions that permit three-tiered architectureswhere content pages can be constructeddynamically and where programs as well as datacan be transferred,

    Other information transfer protocols, and relatedstandards.

  • 7/31/2019 2. Web Architecture

    4/32

    Introduction

    Web ArchitectureExtensibility

    Other Transfer Protocols

  • 7/31/2019 2. Web Architecture

    5/32

    The basic web architecture is two-tiered andcharacterized by a web client that displaysinformation content and a web server that

    transfers information to the client.

    This architecture depends on three keystandards:

    1) HTML for encoding document content,

    2) URLs for naming remote information objectsin a global namespace, and

    3) HTTP for staging the transfer.

  • 7/31/2019 2. Web Architecture

    6/32

  • 7/31/2019 2. Web Architecture

    7/32

    The common representation language forhypertext documents on the Web. HTML had afirst public release as HTML 0.0 in 1990, was

    Internet draft HTML 1.0 in 1993, and HTML 2.0in 1994. HTML 3.0 and Netscape HTML arecompeting next generations of HTML 2.0.Proposed features in HTML 3.0 include: forms,

    style sheets, mathematical markup, and textflow around figures.

  • 7/31/2019 2. Web Architecture

    8/32

    HTML is an application of the StandardGeneralized Markup Language (SGML ISO-8879),an international standard approved in 1986, whichspecifies a formal meta-language for defining

    document markup systems. An SGML Document Type Definition (DTD)

    specifies valid tag names and element attributes. In addition, documents can be inter or

    intra linked by establishing source and target anchor

    points. Many HTML documents are the result ofmanual authoring or word processing HTMLconverters, but now several WYSIWYG editorssupport HTML styles

  • 7/31/2019 2. Web Architecture

    9/32

    HTML files are viewed using a WWWclient browser(software), the primary user interfaceto the Web. HTML allows for embedding ofimages, sounds, video streams, form fields and

    simple text formatting. References, called hyperlinks, to other objects are

    embedded using URLs . When an object is selectedby a hyperlink, the browser takes an action based

    on the URL's type, e.g., retrieve a file, connect toanother Web site and display a HTML file storedthere, or launch an application such as an E-mail ornewsgroup reader.

  • 7/31/2019 2. Web Architecture

    10/32

    An addressing protocol for objects in theWWW

    There are two types of URIs, UniversalResource Names (URN) and the UniversalResource Locators (URL).

  • 7/31/2019 2. Web Architecture

    11/32

    Both URNs (names) and URLs (locators) areURIs, and a particular URI may be a name anda locator at the same time.

    The URIs are part of a larger Internetinformation architecture which is composed ofURNs, URLs. Each plays a specific role:

    URNs are used for identification,

    URLs for locating or finding resources.

  • 7/31/2019 2. Web Architecture

    12/32

    A URN is like a person's name, while a URL islike their street address. The URN definessomething's identity, while the URL provides a

    method for finding something. URNs are often compared to the ISBN system

    for uniquely identifying books (and in fact youcan encode an ISBN as a URN). Having a book's

    unique identifier lets you discuss the book, suchas whether you've read it, enjoyed it, etc. Toactually read the book, however, you need itslocation.

  • 7/31/2019 2. Web Architecture

    13/32

    An application-level network protocol for theWWW.

    , father of the Web, describes itas a "generic stateless object-oriented protocol."

  • 7/31/2019 2. Web Architecture

    14/32

    In HTTP, commands (request methods) can beassociated with particular types of network objects(files, documents, network services). Commandsare provided for establishing a TCP/IP connection to a WWW server, sending a request to the server (containing a method to be

    applied to a specific network object identified by theobject's identifier, and the HTTP protocol version,followed by information encoded in a header style),

    returning a response from the server to the client(consisting of three parts: a status line, a response header,and response data), and

    closing the connection.

  • 7/31/2019 2. Web Architecture

    15/32

    Introduction

    Basic Web Architecture

    Other Transfer Protocols

  • 7/31/2019 2. Web Architecture

    16/32

    This basic web architecture is fast evolving toserve a wider variety of needs beyond staticdocument access and browsing.

    The Common Gateway Interface (CGI) extendsthe architecture to three-tiers by adding a back-end server that provides services to the Webserver on behalf of the Web client, permitting

    dynamic composition of web pages.Helpers/plug-ins and Java/JavaScript provideother interesting Web architecture extensions.

  • 7/31/2019 2. Web Architecture

    17/32

  • 7/31/2019 2. Web Architecture

    18/32

    CGI is a standard for interfacing external programswith Web servers.The server hands client requests encoded in URLsto the appropriate registered CGI program, which

    executes and returns results encoded as MIME(Multipurpose Internet Mail Extensions) messagesback to the server.CGI programs are executable programs that run onthe Web server. They can be written in any

    scripting language (interpreted) or programminglanguage . Security precautions typically requirethat CGI programs be run from a specifieddirectory (e.g, /cgi-bin) under control of thewebmaster (Web system administrator), that is,

    they must be registered with the system.

  • 7/31/2019 2. Web Architecture

    19/32

    Arguments to CGI programs are transmittedfrom client to server via environment variablesencoded in URLs. The CGI program typically

    returns HTML pages that it constructs on thefly.

  • 7/31/2019 2. Web Architecture

    20/32

    Client

  • 7/31/2019 2. Web Architecture

    21/32

    Client Server

    HTTP REQUEST

  • 7/31/2019 2. Web Architecture

    22/32

    Client Server CGIApplication

    HTTP REQUEST HTTP REQUEST

    CGI

  • 7/31/2019 2. Web Architecture

    23/32

    Client Server CGIApplication

    HTTP REQUEST HTTP REQUEST

    MIME MESSAGE

    CGI

  • 7/31/2019 2. Web Architecture

    24/32

    Client Server CGIApplication

    HTTP REQUEST HTTP REQUEST

    MIME MESSAGEHTTP HEADER,MIME MESSAGE

    CGI

  • 7/31/2019 2. Web Architecture

    25/32

  • 7/31/2019 2. Web Architecture

    26/32

    One way to send form data to a CGI program isby appending the form information to the URL,after a question mark. You may have seen

    URLs like the following:http://some.machine/cgi-bin/name.pl?fortune

  • 7/31/2019 2. Web Architecture

    27/32

    Helpers/Plug-ins - When a client browserretrieves a file, it launches an installed helperapplication or plug-in to process the file based

    on the file's MIME-type . For example, it maylaunch a Postscript or Acrobat reader, or MPEGor QuickTime player. A helper application runsexternal to the browser while a plug-in runs

    within the browser.

  • 7/31/2019 2. Web Architecture

    28/32

    Java/JavaScript - Java is a cross-platform WWWprogramming language modeled after C++ from SunMicrosystems. Java programs embedded in HTMLdocuments are called applets and are specified using

    tags. The HTML for an applet containsa code attribute that specifies the URL of the compiledapplet file. Applets are compiled to a platform-independent bytecode which can be safely downloaded

    and executed by the Java interpreter embedded intothe Web browser. Browsers that support Java are saidto be Java-enabled.

  • 7/31/2019 2. Web Architecture

    29/32

    JavaScript is a scripting language designed for creatingdynamic, interactive Web applications that linktogether objects and resources on both clients andservers. A client JavaScript can recognize and respond

    to user events such as mouse clicks, form input, andpage navigation, and query the state or alter theperformance of an applet or plug-in. A server

    JavaScript can exhibit behavior similar to common

    gateway interface (CGI) programs. JavaScript scriptsare embedded in HTML documents using tags. Similar to Java applets, JavaScript scripts aredirectly interpreted within the client's browser and aretherefore platform-independent.

  • 7/31/2019 2. Web Architecture

    30/32

    Introduction

    Basic Web Architecture

    Web ArchitectureExtensibility

  • 7/31/2019 2. Web Architecture

    31/32

    The Web also uses other HTTP-related protocols fortransferring and representing information, including

    Transmission Control Protocol/Internet Protocol(TCP/IP) - the fundamental protocol that provides for

    the reliable delivery of streams of data from one host toanother.

    File Transfer Protocol (FTP) - a common method ofmoving files between two Internet sites. It is based onTCP/IP.

    Secure Socket Layer (SSL) - a security protocoldeveloped by Netscape for sending and receivingencrypted information. It is based on encryptiontechnology.

  • 7/31/2019 2. Web Architecture

    32/32

    Multipurpose Internet Mail Extensions (MIME)- the protocol for multimedia email and abuilding block of HTTP. The first packet ofinformation received by a client identifies thetype of file the server has sent, e.g., binary,audio, video, movie, formatted word-processordocuments, graphics, spreadsheets, etc. Whenmultimedia files are sent using the MIME

    standard they are encoded into non-readabletext. The Web browser maintains a list of pairsof MIME-Types and helper applications forhandling each type.