Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Similar documents
Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Network Technologies

Installation Instructions

Installation of PHP, MariaDB, and Apache

APACHE WEB SERVER. Andri Mirzal, PhD N

Setting Up a Development Server

ThinPoint Quick Start Guide


1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

Chapter 21 Web Servers

Installing Drupal on Your Local Computer

LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Livezilla How to Install on Shared Hosting By: Jon Manning

INTRODUCTION TO WEB TECHNOLOGY

W H I T E P A P E R. Best Practices for Building Virtual Appliances

Web Hosting Wordpress, Joomla, Drupal Integration

Linux and the Internet, Servers, Ports, Firewalls

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Labtech Learning Management System. Windows Installation. Standart Version 1.0

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

CrownPeak Playbook CrownPeak Hosting with PHP

Installing The SysAidTM Server Locally

Apache Server Implementation Guide

WWPass External Authentication Solution for IBM Security Access Manager 8.0

Sequential Query Language Database Networking Using SQL

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

Web Browsing Examples. How Web Browsing and HTTP Works

Embedded Based Web Server for CMS and Automation System

SiteCelerate white paper

Web Server for Embedded Systems

An Introduction To The Web File Manager

District of Columbia Courts Attachment 1 Video Conference Bridge Infrastructure Equipment Performance Specification

Lesson 7 - Website Administration

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Installing an open source version of MateCat

Interwise Connect. Working with Reverse Proxy Version 7.x

SAIP 2012 Performance Engineering

Web Technologies Week 4 Hosting, Servers and Databases. Context. Contents. MSc in Computing Computing - IBITE Liverpool Hope University College

Upgrading from Call Center Reporting to Reporting for Call Center

The Benefits of Verio Virtual Private Servers (VPS) Verio Virtual Private Server (VPS) CONTENTS

Performance Evaluation of Shared Hosting Security Methods

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

Installation documentation for Ulteo Open Virtual Desktop

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

Ulteo Open Virtual Desktop Installation

How To Understand The Architecture Of An Ulteo Virtual Desktop Server Farm

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

Cloud Computing for Control Systems CERN Openlab Summer Student Program 9/9/2011 ARSALAAN AHMED SHAIKH


S y s t e m A r c h i t e c t u r e

CS5331 Web Security - Assignment 0

How to Make the Client IP Address Available to the Back-end Server

SSL VPN Server Guide Access Manager 3.1 SP5 January 2013

2. Accessing Databases via the Web

MAGENTO HOSTING Progressive Server Performance Improvements

BASICS OF SCALING: LOAD BALANCERS

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

Budget Event Management Design Document

E-commerce. Web Servers Hardware and Software

Monitoring Nginx Server

Instructor: Betty O Neil

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Network Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper

Web Server Architectures

Enterprise Manager. Version 6.2. Installation Guide

Upgrading from Call Center Reporting to Reporting for Contact Center. BCM Contact Center


HW9 WordPress & Google Analytics

Mobile Device Management Version 8. Last updated:

FAQs, Hints and Tips

Quick Installation Guide

Network setup and troubleshooting

W3Perl A free logfile analyzer

Internet Content Distribution

E-Commerce for IT Advanced. Louis Aguila & Matt Burt

Enterprise Solution for Remote Desktop Services System Administration Server Management Server Management (Continued)...

Load Balancing Microsoft Sharepoint 2010 Load Balancing Microsoft Sharepoint Deployment Guide

Lecture 2. Internet: who talks with whom?

ClusterLoad ESX Virtual Appliance quick start guide v6.3

How to Install and Setting Up Drupal

TESTING & INTEGRATION GROUP SOLUTION GUIDE

Oracle9i Application Server: Options for Running Active Server Pages. An Oracle White Paper July 2001

Write a Web Application for Free Edition 2

Quick Start Guide for VMware and Windows 7

MASTER THESIS. TITLE: Analysis and evaluation of high performance web servers

IBM Cloud Manager with OpenStack

HDFS Users Guide. Table of contents

Protect, License and Sell Xojo Apps

Availability Digest. Raima s High-Availability Embedded Database December 2011

Facility Connect API: Setup & Troubleshooting. Version 1

Transcription:

Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence

2. Web Servers

Introduction Web content lives on Web servers Web servers speak the platform independent HyperText Transfer Protocol (HTTP) (so they are often called HTTP servers) HTTP: A protocol for transferring requests and files over the Internet or local intranet These HTTP servers store the Internet s data and provide data when it is requested by HTTP clients Clients send HTTP requests to servers and servers return the requested data in HTTP responses 3

Web clients and servers Introduction 4

Introduction Multitier Application Architecture (Three-tier architecture): 5

What is a Web Server? The term can refer to either the hardware (i.e. the computer) or the software (i.e. the application) that delivers web content A Web server software is a server-side application in charge of hosting Web sites The Web server s primary role is to handle or delegate HTTP requests and to generate or route HTTP responses 6

What is a Web Server? The most simplistic form of a Web server may simply receive GET or POST requests, read a local file based on a requested URL, and stream the file back to the Web client Higher-end enterprise-class Web servers support Concurrent requests from scalable number of clients Implement some form of secure access control Support various APIs for extending the functionality of a Web server to dynamically generate Web documents in an application-specific fashion 7

What is a Web Server? Web servers are available in many forms You can install and run general-purpose software web servers on standard computer systems If you don t want the hassle of installing software, you can purchase a web server appliance, in which the software comes preinstalled and preconfigured on a computer, often in a snazzy-looking chassis Given the miracles of microprocessors, some companies even offer embedded web servers implemented in a small number of computer chips 8

Tasks performed by a Web Server 1. Set up connection accept a client connection, or close the connection if the client is unwanted 2. Receive a request read an HTTP request message from the network 3. Process the request interpret the request message and take action 4. Access a resource access the resource specified in the message 9

Tasks performed by a Web Server 5. Construct the response create the HTTP response message with the right headers 6. Send response send the response back to the client 7. Log transaction place notes about the completed transaction in a log file 10

Tasks performed by a Web Server 11

1. Accepting Client Connections If a client already has a persistent connection open to the server, it can use that connection to send its request Otherwise the client needs to open a new connection to the server When a new client requests a connection (through TCP) to the Web server, the Web server establishes the connection and determines which client is requesting the connection by extracting the IP address from the TCP connection 12

1. Accepting Client Connections Once a new connection is established and accepted the server adds the new connection to its list of existing Web server connections and prepares to watch for data on the connection The Web server is free to reject and immediately close any connection Some Web servers close connections because the client IP address or hostname is unauthorised or is a known malicious client 13

2. Receiving Request Messages As the data arrives on the connection, the Web server reads out the data from the internet connection and parses out the pieces of the request message When parsing the request message, the Web server: Parses the request line looking for the request method, the specified resource identifier (URI) and the version number Reads the message headers Detects the end-of-headers blank line Reads the request body 14

2. Receiving Request Messages High-performance Web servers support thousands of simultaneous connections Web servers constantly watch for new web requests, because requests can arrive at any time Different Web server architectures service requests in different ways 15

2. Receiving Request Messages Different Web server architectures: Single-threaded Web Servers: Process one request at a time until completion When the transaction is complete, the next connection is processed Simple to implement, but during processing, all other connections are ignored Appropriate only for low-load servers 16

2. Receiving Request Messages Different Web server architectures (contd.): Multi-process and Multithreaded Web Servers: Dedicate multiple processes or higher efficiency threads to process requests simultaneously Threads/processes may be created on demand or in advance Some servers dedicate a thread/process for every connection this may consume too much memory or system resources when a server processes hundreds, thousands or even tens of thousands of simultaneous connections 17

2. Receiving Request Messages Different Web server architectures (contd.): Multiplexed I/O Web Servers: To support large numbers of connections, many Web servers adopt multiplexed architectures In a multiplexed architecture, all the connections are simultaneously watched for activity Work is done on a connection only when there is something to be done; threads and processes are not tied up waiting on idle connections 18

3. Processing Requests Once the Web server has received a request it can process the request using the method, resource, headers, and optional body Some methods, example POST require entity body data in the request message Other methods, example GET, forbid entity body data in request messages 19

4. Mapping and Accessing Resources Web servers are resource servers They deliver pre-created content, such as HTML pages or JPEG images, as well as dynamic content from resource-generating applications running on the servers Before the Web server can deliver content to the client, it needs to identify the source of the content, by mapping the URI from the request message to the proper content or content generator on the Web server 20

4. Mapping and Accessing Resources Web servers support different kinds of resource mapping The simplest form of resource mapping uses the request URI to name a file in the Web server s file system Typically, a special folder in the Web server file system is reserved for Web content This folder is called the document root 21

4. Mapping and Accessing Resources The Web server takes the URI from the request message and appends it to the document root Virtually hosted Web servers host multiple Web sites on the same Web server, giving each site its own distinct document root on the server A virtually hosted Web server identifies the correct document root to use from the IP address or hostname in the URI or the Host header This way, two Web sites hosted on the same Web server can have completely distinct content 22

4. Mapping and Accessing Resources Web servers can also map URIs to dynamic resources that is to programs that create content on demand These Web servers are called Application Servers that connect Web servers to sophisticated backend applications 23

5. Building Responses Once the Web server has identified the resource, it performs the action described in the request method and returns the response message The response message contains: HTTP version Response status code Response headers A response body if one was generated Web servers sometimes return redirection responses instead of success messages that redirect the browser to go elsewhere 24

6. Sending Responses The Web server may have many connections to many clients: Some idle Some sending data to the server, and Some carrying response data back to the clients The server needs to keep track of the connection state and handle persistent connections with special care 25

6. Sending Responses For non-persistent connections, the server is expected to close its side of the connection when the entire message is sent For persistent connections, the connection may stay open, in which case the server needs to be extra cautious to compute the Content-Length header correctly, or the client will have no way of knowing when a response ends 26

7. Logging When a transaction is complete, the Web server notes an entry into a log file, describing the transaction performed Most Web servers provide several configurable forms of logging 27

Accessing Web Servers To request documents from Web servers, users must know the hostname on which the Web server software resides Users can request documents from local Web servers Web servers residing on User s machine Can be accessed through your computer s name or through the name localhost a hostname that references the local machine and normally translates to the IP address 127.0.0.1 (known as the loopback address) 28

Accessing Web Servers Users can request documents from remote Web servers Web servers residing on different machines Referenced by a fully qualified hostname or an IP address 29

Web Servers The market share of the top Web servers on the internet 1 Server September 2013 Percent October 2013 Percent Apache 346,288,706 46.86% 344,408,387 44.89% Microsoft IIS 160,691,763 21.74% 177,216,296 23.10% nginx 111,680,078 15.11% 123,114,800 16.05% Google GWS 34,806,502 4.71% 34,127,482 4.45% 1 http://news.netcraft.com/archives/2013/10/02/october-2013-web-server-survey.html 30

Installing Apache HTTP Server The Apache HTTP Server, maintained by the Apache Software Foundation, is the most popular Web server in use today because of its stability, efficiency, portability, security and small size It is open source and it runs on Linux, Mac OS X, Windows and numerous other platforms The Apache HTTP server can be downloaded and installed directly, however this requires additional configuration on your part 31

Installing Apache HTTP Server There are many integrated installers that install and configure Apache HTTP Server for you on various operating-system platforms For simplicity, we ll use the free and open source XAMP integrated installer provided by the Apache Friends website (www.apachefriends.org) The advantage of this integrated installer is that apart from installing the Apache HTTP server, it will install and configure PHP and MySQL as well for you!! 32

Installing Apache HTTP Server Other integrated installers: WAMP Windows Apache MySQL PHP LAMP Linux Apache MySQL PHP MAMP Mac OS X Apache PHP Testing Your setup: once you have started the servers, you can open any Web browser on your computer and enter the address http://localhost/ to confirm that the Web server is up and running If it is, you ll see the default XAMP webpage displayed 33