Search This Blog

Friday, 21 October 2011

Multi-tier Architecture

1 comments
MULTI-TIER ARCHITECTURE
A Web Server is special software, which usually runs on a remote machine and responds to client requests by providing resources like HTML documents. Requests are made by the client, which is a browser running on a local machine using the address typed by the user (called Uniform Resource Locator – URL). The web server maps the URL to a file on the server (or to a file on the server’s network) and returns the result in the form of HTML document to the client.
During the interaction, the web server and the client communicate using the platform independent Hyper Text Transfer Protocol (HTTP), a protocol for transferring requests and files over the Internet. There are two most common HTTP request types (methods): Get and Post. These request types send and receive data from a web server. Generally, the get request is for retrieving some resources from the web server, whereas the post request updates the contest of a web browser.
System Architecture:
A web server is software, which is running as part of a multi-tier application (sometimes referred to as n-tier application). The Multi-tier architecture divides the functionality of a web application into separate tiers (i.e., logical groupings of functionality). There are three major tiers in a multi-tier application: information tier, middle tier and the client tier. These tiers can be located on the same computer or on separate computers.
The information tier (also called the data tier or the bottom tier) maintains data for the application. This tier typically stores data in a RDBMS database. For e.g., a retail store may have a database for product information such as descriptions, prices and quantities in stock.
The middle tier implements logic like business logic and presentation logic that control interaction between application client and application data. This tier acts as an intermediary between data in the information tier and the application clients. Its duty is to process the clients’ requests from the top tier (e.g., a request to view a product catalog) and retrieves data from the database. Then, the retrieved data are processed and presented to the client as a web page by the presentation logic.
Business logic in the middle tier enforces business rules and ensures that data are reliable before updating the database or presenting data to the user. It applies business rules that dictate how clients can and can’t access application data and how applications process data.
The client tier or top tier is the client application, which is usually a browser. Users interact directly with a browser through its application window. The client interacts with the middle tier to make request and to retrieve data from the information tier.
Client-side Scripting vs. Server-side Scripting:
Client-side scripting is done using scripting languages like JavaScript, VBScript, HTML and DHTML. Such scripts are stored in the web page itself and sent to the client side for their execution by the Web Browser. The user of the web page can open and see the coding and alter it if they want. Client-side scripting is responsible for the following activities:
  1. Validating the user input.
  2. Accessing the browser and
  3. Enhancing web pages with ActiveX controls and Java programs that run on a browser
The client-side validation reduces the number of requests that need to be passed to the server. Interactivity allows users to make decisions, click buttons and play games with out server interaction. Client-side scripts can access the browser, use features specific to that browser and manipulate browser documents. To conserve server resources and minimize internet traffic and delays, perform as much as processing as possible on the client.
Server-side Scripting:
Scripts that execute on a server and generate web pages dynamically as responses to the client request are known as server-side scripts. Programmers have greater flexibility when using server-side scripts. Server side script often queries the database in response to the client’s request, dynamically generates HTML pages containing the data of request and sends the pages to the client. Server-side scripts are not visible to the client.
Server-side scripts are written using languages such as ASP and JavaServlets, which are having wider range of programming capabilities than their client-side equivalents. For e.g., server-side scripts can access the server’s file directory structure, whereas client-side scripts can’t access the client’s file directory.
Server-side scripts also have access to server-side software that extends server functionality. These pieces of software are called ActiveX components for MS web servers and modules for Apache web servers.
Accessing Web Services:
Web servers are of two types: local web server and remote web server. Local web server is server software like PWS or IIS that runs on the current machine, which also runs the browser software. Whereas, a remote web server is server software like IIS or Apache, which generally runs on a machine connected in the same network or another network in the Internet.
To request a document from a web server, users must know the machine name (called host name) on which the web server software resides. Local web servers can be accessed either using the machine name or through an ID called host name (also called localhost) that refers to the local machine hosting the web server software.
To access a remote web server, which runs on the same network, we can make use of the network ID of the machine hosting the web server (called hostname). But, to access a server, which runs on another network connection in the internet, we need to have a different ID called Domain Name or IP Address that refers to the network which hosts the web server.

One Response so far

  1. Anonymous says:

    Hi there everybody, here every person is sharing such experience, so it's pleasant to read
    this web site, and I used to pay a visit this webpage all the time.


    Here is my web site minecraft net

Leave a Reply