Server Architectures Omer Aungkyawoo Piperdi

52
Server Architectures Omer Aungkyawoo Piperdi Kedar Sivashanmugam Krishna Raju Datla Vamsi Marist College, Poughkeepsie, NY Marist College, Poughkeepsie, NY

description

 

Transcript of Server Architectures Omer Aungkyawoo Piperdi

Page 1: Server Architectures Omer Aungkyawoo Piperdi

Server Architectures

Omer Aungkyawoo Piperdi

Kedar Sivashanmugam

Krishna Raju Datla Vamsi

Marist College, Poughkeepsie, NYMarist College, Poughkeepsie, NY

Page 2: Server Architectures Omer Aungkyawoo Piperdi

What is a Server?

A server consists of one or more computers that receive and process requests from one or more client machines. A server is typically designed with some redundancy in power, network, computing and file storage.

Page 3: Server Architectures Omer Aungkyawoo Piperdi

Server definition doesn’t make any sense !!!

• Behind every successful man, there is a woman…

• Similarly, behind every server there is a client

Page 4: Server Architectures Omer Aungkyawoo Piperdi

Now, what is a Client?

A client is an individual user's computer or a user application that does a certain amount of processing on its own. It also sends and receives requests to and from one or more servers for other processing and/or data.

Page 5: Server Architectures Omer Aungkyawoo Piperdi

What is an Architecture?

The Structure and Organization of a Computer’s Hardware or System Software.

Page 6: Server Architectures Omer Aungkyawoo Piperdi

Server Architecture

• Limitations of Mainframe Architectures and File Sharing Architectures

SYSTEM SOFTWARE COMPATIBILITY

• This has led to something called as Client/Server Architectures.

Page 7: Server Architectures Omer Aungkyawoo Piperdi

How the Server Architectures work?• Let us take an example of a database server. Using a

relational database management system (DBMS), user queries could be answered directly. The server architecture reduces network traffic by providing a query response rather than total file transfer. It improves multi-user updating through a GUI front end to a shared database.

• Server Architectures uses Remote Procedure Calls (RPC’s) or standard query language (SQL) statements to communicate between the client and server.

Page 8: Server Architectures Omer Aungkyawoo Piperdi

Types of Architectures

• Two Tier Architecture

• Three Tier Architecture

• Distributed/collaborative enterprise architecture

Page 9: Server Architectures Omer Aungkyawoo Piperdi

Dedicated Server• A dedicated server is a single computer in a network

reserved for serving the needs of the network.

• Examples of Dedicated Servers are:

File Server

Database Server

Web Server… etc.

• We shall take an example of a Web Server and explain it in the following slides.

Page 10: Server Architectures Omer Aungkyawoo Piperdi

BROWSER

WEB SERVER

Operating System

ServletCGI

ProgramFiles

Resources

Page 11: Server Architectures Omer Aungkyawoo Piperdi

How Web Servers Work?

Let's say that you are sitting at your computer, surfing the Web, and you get a call from a friend who says, "I just read a great article! Type in this URL and check it out. It's at http://computer.howstuffworks.com/web-server.htm." So you type that URL into your browser and press return. And magically, no matter where in the world that URL lives, the page pops up on your screen.

Page 12: Server Architectures Omer Aungkyawoo Piperdi

How Web Servers Work? (Contd.)

                                                                

                                                                     

At the most basic level possible, the following diagram shows the steps that brought that page to your screen:

                                                                

                                                                     

Your browser formed a connection to a Web server, requested a page and received it.

Page 13: Server Architectures Omer Aungkyawoo Piperdi

The Internet

• So what is "the Internet"? The Internet is a gigantic collection of millions of computers, all linked together on a computer network. The network allows all of the computers to communicate with one another. A home computer may be linked to the Internet using a phone-line modem, DSL or cable modem that talks to an Internet service provider (ISP). A computer in a business or university will usually have a network interface card (NIC) that directly connects it to a local area network (LAN) inside the business. The business can then connect its LAN to an ISP using a high-speed phone line like a T1 line. A T1 line can handle approximately 1.5 million bits per second, while a normal phone line using a modem can typically handle 30,000 to 50,000 bits per second.

Page 14: Server Architectures Omer Aungkyawoo Piperdi

The Internet (Contd.)ISPs then connect to larger ISPs, and the largest ISPs maintain fiber-optic "backbones" for an entire nation or region. Backbones around the world are connected through fiber-optic lines, undersea cables or satellite links. In this way, every computer on the Internet is connected to every other computer on the Internet.

                                                       

                                                                                         

Page 15: Server Architectures Omer Aungkyawoo Piperdi

Clients and Servers

• In general, all of the machines on the Internet can be categorized as two types: servers and clients. Those machines that provide services (like Web servers or FTP servers) to other machines are servers. And the machines that are used to connect to those services are clients. When you connect to Yahoo! at www.yahoo.com to read a page, Yahoo! is providing a machine (probably a cluster of very large machines), for use on the Internet, to service your request. Yahoo! is providing a server. Your machine, on the other hand, is probably providing no services to anyone else on the Internet. Therefore, it is a user machine, also known as a client. It is possible and common for a machine to be both a server and a client, but for our purposes here you can think of most machines as one or the other.

Page 16: Server Architectures Omer Aungkyawoo Piperdi

Clients and Servers (Contd.)

• A server machine may provide one or more services on the Internet. For example, a server machine might have software running on it that allows it to act as a Web server, an e-mail server and an FTP server. Clients that come to a server machine do so with a specific intent, so clients direct their requests to a specific software server running on the overall server machine. For example, if you are running a Web browser on your machine, it will most likely want to talk to the Web server on the server machine. Your Telnet application will want to talk to the Telnet server, your e-mail application will talk to the e-mail server, and so on...

Page 17: Server Architectures Omer Aungkyawoo Piperdi

Behind the Scenes• The browser breaks the URL into three parts:

(i) The protocol ("http")

(ii) The server name ("www.howstuffworks.com")

(iii) The file name ("web-server.htm")

• The browser communicates with a name server to translate the server name, "www.howstuffworks.com," into an IP address, which it uses to connect to that server machine.

• The browser then forms a connection to the Web server at that IP address on port 80.

• Following the HTTP protocol, the browser sends a GET request to the server, asking for the file "http://computer.howstuffworks.com/web-server.htm."

• The server sends the HTML text for the Web page to the browser. (Cookies may also be sent from server to browser in the header for the page.)

• The browser reads the HTML tag and formats the page onto your screen.

Page 18: Server Architectures Omer Aungkyawoo Piperdi

Examples of Web Servers

• Apache

• Microsoft - IIS

• Netscape - iPlanet Server

• AOL Server

• Jigsaw

Page 19: Server Architectures Omer Aungkyawoo Piperdi

History of Web servers

Web

Server

Main

arch.

Dev type 1st

release

Code

size (KLOC)

Lang. Arch. stable

Apache Robert Thau

Open source

April 1995 80 C 5 yrs

AOL Server - Commercial

May 1995 164 C & TCL -

Jigsaw Yves Lafon

Experimental

May 1996 106 Java 2.5 yrs

Page 20: Server Architectures Omer Aungkyawoo Piperdi

Hardware / Network Architecture for Web Servers

Page 21: Server Architectures Omer Aungkyawoo Piperdi

Various types of Network Architectures

• Multi-process

• Multi-threaded

• Single-process event-driven

• Asymmetric Multi-Process Event-Driven

Page 22: Server Architectures Omer Aungkyawoo Piperdi

Multi-Process

In the multi-process (MP) architecture, a process is assigned to execute the basic steps associated with serving a client request sequentially. The process performs all the steps related to one HTTP request before it accepts a new request. Since multiple processes are employed (typically 20-200), many HTTP requests can be served concurrently. Overlapping of disk activity, CPU processing and network connectivity occurs naturally, because the operating system switches to a runnable process whenever the currently active process blocks.

Page 23: Server Architectures Omer Aungkyawoo Piperdi

Multi-Process (Contd.)

Since each process has its own private address space, no synchronization is necessary to handle the processing of different HTTP requests. However, it may be more difficult to perform optimizations in this architecture that rely on global information, such as a shared cache of valid URLs. The figure illustrates the MP architecture.

Page 24: Server Architectures Omer Aungkyawoo Piperdi

Multi-threaded

Multi-threaded (MT) servers, depicted in Figure, employ multiple independent threads of control operating within a single shared address space. Each thread performs all the steps associated with one HTTP request before accepting a new request, similar to the MP model's use of a process.

Page 25: Server Architectures Omer Aungkyawoo Piperdi

Multi-threaded (Contd.)

The MT model requires that the operating system provides support for kernel threads. That is, when one thread blocks on an I/O operation, other runnable threads within the same address space must remain eligible for execution.

Page 26: Server Architectures Omer Aungkyawoo Piperdi

Differences between Multi-process and Multi threaded

• The primary difference between the MP and the MT architecture, however, is that all threads can share global variables. The use of a single shared address space lends itself easily to optimizations that rely on shared state. However, the threads must use some form of synchronization to control access to the shared data.

Page 27: Server Architectures Omer Aungkyawoo Piperdi

Single-process Event-Driven

The single-process event-driven (SPED) architecture uses a single event-driven server process to perform concurrent processing of multiple HTTP requests. The server uses non-blocking systems calls to perform asynchronous I/O

operations. The figure depicts the SPED architecture.

Page 28: Server Architectures Omer Aungkyawoo Piperdi

Single-process Event-Driven (Contd.)

A SPED server can be thought of as a state machine that performs one basic step associated with the serving of an HTTP request at a time, thus interleaving the processing steps associated with many HTTP requests. In each iteration, the server performs a select to check for completed I/O events (new connection arrivals, completed file operations, client sockets that have received data or have space in their send buffers.) When an I/O event is ready, it completes the corresponding basic step and initiates the next step associated with the HTTP request, if appropriate.

Page 29: Server Architectures Omer Aungkyawoo Piperdi

Single-process Event-Driven (Contd.)

In principle, a SPED server is able to overlap the CPU, disk and network operations associated with the serving of many HTTP requests, in the context of a single process and a single thread of control. As a result, the overheads of context switching and thread synchronization in the MP and MT architectures are avoided. However, a problem associated with SPED servers is that many current operating systems do not provide suitable support for asynchronous disk operations.

Page 30: Server Architectures Omer Aungkyawoo Piperdi

Asymmetric Multi-Process Event-Driven

The Asymmetric Multi-Process Event-Driven (AMPED) architecture, illustrated in the figure, combines the event-driven approach of the SPED architecture with multiple helper processes (or threads) that handle blocking disk I/O operations. By default, the main event-driven process handles all processing steps associated with HTTP requests. When a disk operation is necessary (e.g., because a file is requested that is not likely to be in the main memory file cache), the main server process instructs a helper via an inter-process communication (IPC) channel (e.g., a pipe) to perform the potentially blocking operation. Once the operation completes, the helper returns a notification via IPC; the main server process learns of this event like any other I/O completion event via select.

Page 31: Server Architectures Omer Aungkyawoo Piperdi

Asymmetric Multi-Process Event-Driven (Contd.)

The AMPED architecture strives to preserve the efficiency of the SPED architecture on operations other than disk reads, but avoids the performance problems suffered by SPED due to inappropriate support for asynchronous disk reads in many operating systems. AMPED achieves this using only support that is widely available in modern operating systems.

Page 32: Server Architectures Omer Aungkyawoo Piperdi

Conceptual vs. ConcreteArchitecture

• Conceptual Architecture:– Resides in the head(s) of the developer(s)

– Mental model: incomplete, inaccurate, ideal

• Concrete Architecture:– Extracted from the system’s implementation

– Many mismatches with the conceptual architecture

Page 33: Server Architectures Omer Aungkyawoo Piperdi

Reference and Software Architectures for Web Servers.

Page 34: Server Architectures Omer Aungkyawoo Piperdi

AOLServer

ConcreteArchitecture

ConceptualArchitecture

Reference Architecture for Web Servers

Apache

ConcreteArchitecture

ConceptualArchitecture

Jigsaw

ConcreteArchitecture

ConceptualArchitecture

Page 35: Server Architectures Omer Aungkyawoo Piperdi

Reception

ResourceHandler

RequestAnalysis

Access Control

RecordTransaction

Util Operating System Abstraction Layer

Control flow All depend on

Web Server ReferenceArchitecture

Page 36: Server Architectures Omer Aungkyawoo Piperdi

Apache Web Server

• One of the most extensively used Web server

• Open Source Software which enhances development over a wide range of ideas.

• FREE !!!

Page 37: Server Architectures Omer Aungkyawoo Piperdi

OSAL.Util.

Req. Handler.

Request Trans.

Access Ctrl.

Req. Analysis.

Recep.

Apache:

Conceptual

Architecture

Core

MIMEtype

Response

LoggingTranslation

Authen-tication

Author-ization

Util OS Layer

Apache: Conceptual to ref. architecture mapping

Page 38: Server Architectures Omer Aungkyawoo Piperdi

State of art in today’s world

• Most of the companies today use a Two-Tier Architecture.

• Apache Web server is free and widely used, can be implemented in a two-tier web server architecture.

• We shall discuss in detail about the two-tier architectures over the following several slides.

Page 39: Server Architectures Omer Aungkyawoo Piperdi

Two Tier Software Architecture

• Two tier software architectures were developed in the 1980s from the file server software architecture design. The two tier architecture is intended to improve usability by supporting a forms-based, user-friendly interface. The two tier architecture improves scalability by accommodating up to 100 users (file server architectures only accommodate a dozen users), and improves flexibility by allowing data to be shared, usually within a homogeneous environment. The two tier architecture requires minimal operator intervention, and is frequently used in non-complex, non-time critical information processing systems.

Page 40: Server Architectures Omer Aungkyawoo Piperdi

Maturity

Two tier client/server architectures have been built and fielded since the middle to late 1980s. The design is well known and used throughout industry. Two tier architecture development was enhanced by fourth generation languages.

Page 41: Server Architectures Omer Aungkyawoo Piperdi

Technical Detail

Two tier architectures consist of three components distributed in two layers: client (requester of services) and server (provider of services). The three components are

1. User System Interface (such as session, text input, dialog, and display management services)

2. Processing Management (such as process development, process enactment, process monitoring, and process resource services)

3. Database Management (such as data and file services)

Page 42: Server Architectures Omer Aungkyawoo Piperdi

Technical Detail (Contd.)

The two tier design allocates the user system interface exclusively to the client. It places database management on the server and splits the processing management between client and server, creating two layers. The figure depicts the two tier software architecture.

Page 43: Server Architectures Omer Aungkyawoo Piperdi

Technical Detail (Contd.)

In general, the user system interface client invokes services from the database management server. In many two tier designs, most of the application portion of processing is in the client environment. The database management server usually provides the portion of the processing related to accessing data (often implemented in store procedures). Clients commonly communicate with the server through SQL statements or a call-level interface. It should be noted that connectivity between tiers can be dynamically changed depending upon the user's request for data and services.

Page 44: Server Architectures Omer Aungkyawoo Piperdi

Technical Detail (Contd.)

As compared to the file server software architecture (that also supports distributed systems), the two tier architecture improves flexibility and scalability by allocating the two tiers over the computer network. The two tier improves usability (compared to the file sever software architecture) because it makes it easier to provide a customized user system interface.

It is possible for a server to function as a client to a different server- in a hierarchical client/server architecture. This is known as a chained two tier architecture design.

Page 45: Server Architectures Omer Aungkyawoo Piperdi

Usage Considerations

Two tier software architectures are used extensively in non-time critical information processing where management and operations of the system are not complex. This design is used frequently in decision support systems where the transaction load is light. Two tier software architectures require minimal operator intervention. The two tier architecture works well in relatively homogeneous environments with processing rules (business rules) that do not change very often and when workgroup size is expected to be fewer than 100 users, such as in small businesses.

Page 46: Server Architectures Omer Aungkyawoo Piperdi

Cost and Limitations

Scalability: The two tier design will scale-up to service 100 users on a network. It appears that beyond this number of users, the performance capacity is exceeded. This is because the client and server exchange "keep alive" messages continuously, even when no work is being done, thereby saturating the network

Page 47: Server Architectures Omer Aungkyawoo Piperdi

Cost and Limitations (Contd.)

Interoperability: The two tier architecture limits interoperability by using stored procedures to implement complex processing logic (such as managing distributed database integrity) because stored procedures are normally implemented using a commercial database management system's proprietary language. This means that to change or interoperate with more than one type of database management system, applications may need to be rewritten. Moreover, database management system's proprietary languages are generally not as capable as standard programming languages in that they do not provide a robust programming environment with testing and debugging, version control, and library management capabilities.

Page 48: Server Architectures Omer Aungkyawoo Piperdi

Cost and Limitations (Contd.)

System administration and configuration: Two tier architectures can be difficult to administer and maintain because when applications reside on the client, every upgrade must be delivered, installed, and tested on each client. The typical lack of uniformity in the client configurations and lack of control over subsequent configuration changes increase administrative workload.

Page 49: Server Architectures Omer Aungkyawoo Piperdi

Cost and Limitations (Contd.)

Batch jobs: The two tiered architecture is not effective running batch programs. The client is typically tied up until the batch job finishes, even if the job executes on the server; thus, the batch job and client users are negatively affected

Page 50: Server Architectures Omer Aungkyawoo Piperdi

Alternatives

Possible alternatives for two tier client server architectures are

• The three-tier architecture if there is a requirement to accommodate greater than 100 users

• Distributed/collaborative architectures if there is a requirement to design on an enterprise-wide scale. An enterprise-wide design is comprised of numerous smaller systems or subsystems.

Page 51: Server Architectures Omer Aungkyawoo Piperdi

References

[Dickman 95] Dickman, A. "Two-Tier Versus Three-Tier Apps." Informationweek 553 (November 13, 1995): 74-80.

[Edelstein 94] Edelstein, Herb. "Unraveling Client/Server Architecture." DBMS 7, 5 (May 1994): 34(7).

[Gallaugher 96] Gallaugher, J. & Ramanathan, S. "Choosing a Client/Server Architecture. A Comparison of Two-Tier and Three-Tier Systems." Information Systems Management Magazine 13, 2 (Spring 1996): 7-13.

[Louis 95] Louis [online]. Available WWW <URL: http://www.softis.is> (1995).

[Newell 95] Newell, D.; Jones, O.; & Machura, M. "Interoperable Object Models for Large Scale Distributed Systems," 30-31. Proceedings. International Seminar on Client/Server Computing. La Hulpe, Belgium, October 30-31, 1995. London, England: IEE, 1995.

[Schussel 96] Schussel, George. Client/Server Past, Present, and Future [online]. Available WWW <URL: http://www.dciexpo.com/geos/> (1995).

http://www.usenix.org/publications/library/proceedings/usenix99/full_papers/pai/pai_html/node4.html

http://www.serverwatch.com/hreviews/

http://computer.howstuffworks.com/web-server.htm

http://www.serverwatch.com

http://www.webopedia.com

http://www.apache.org

Page 52: Server Architectures Omer Aungkyawoo Piperdi

Thank You

By

- Kedar Sivashanmugam

- Krishna Raju Datla Vamsi

- Omer Aungkyawoo Piperdi