norman white stern school of business csntier.ppt

38
N TIER CLIENT/SERVER CONCEPTS Norman White Stern School of Business Csntier.ppt

Upload: francis-green

Post on 22-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Norman White Stern School of Business Csntier.ppt

N TIER CLIENT/SERVER CONCEPTS

Norman WhiteStern School of Business

Csntier.ppt

Page 2: Norman White Stern School of Business Csntier.ppt

Agenda

Background Data communications TCP/IP Physical networks Database management systems

Page 3: Norman White Stern School of Business Csntier.ppt

But First, Some Background

Data Communications Networking …

Page 4: Norman White Stern School of Business Csntier.ppt

DATA COMMUNICATIONS

Some Basics

Page 5: Norman White Stern School of Business Csntier.ppt

Communication Components

SOURCE SINK MEDIUM

SOURCE MEDIUMSINK

telephonecable satellite

Page 6: Norman White Stern School of Business Csntier.ppt

Communications Media

Telephone Satellite Cellular Wifi Cable Fiber Optic Blue Tooth etc.

Page 7: Norman White Stern School of Business Csntier.ppt

Analog / Digital

Analog Represent information as a waveform

Music, video,voice Digital

Represent Information as a string of bits Digitization

Convert from analog to digital by sampling the waveform at fixed intervals

ISDN phone line 64000 bits per second 8000 samples per second (each sample an 8 bit (0-

255)) Number

Page 8: Norman White Stern School of Business Csntier.ppt

Modems modulator/demodulator

Converts Digital signal to analog so it can be sent over phone lines

Reconverts analog to digital on other end

01110000

0

1 1 1

00 0

0

Page 9: Norman White Stern School of Business Csntier.ppt

Communications Protocols

Need rules to communicate between systems

Communications protocols are the rules for a particular method of communication Who says what, when How are errors handled How much information in a message How is message routed from sender to

receiver

Page 10: Norman White Stern School of Business Csntier.ppt

Asynchronous vs. Synchronous Protocols

Asynchronous - A single character is a message Errors sometimes detected, but no recovery Horizontal parity used to detect single

character errors Synchronous - A group of characters

constitute a message Synchronous protocols usually recover from

errors

Page 11: Norman White Stern School of Business Csntier.ppt

Types of Synchronous protocols

Bisynchronous Point to point conversation Not used much any more Each message is acknowledged as received

Multilateral protocols Messages routed from one machine to another Message includes address of destination Needs to be routed by intermediate nodes

Page 12: Norman White Stern School of Business Csntier.ppt

TCP/IP ModelProtocol of the internet

Application Layer – Applications and processes that use network

Host-host Transport Level – end to end data delivery

Internet layer – defines the datagram and handles data routing

Network Access layer – routines for accessing physical networks

Page 13: Norman White Stern School of Business Csntier.ppt

TCP/IP

Protocol of the Internet

Page 14: Norman White Stern School of Business Csntier.ppt

History

Originally developed as a protocol that would withstand wide network outages (Arpanet)

Now it has become the standard protocol for almost all data communications

Consists of two parts, IP and TCP

Page 15: Norman White Stern School of Business Csntier.ppt

TCPTransmission Control Protocol

Handles communications between 2 processes anywhere on internet

Guarantees correct data is received by receiver

Uses IP for delivery and routing of packets

Page 16: Norman White Stern School of Business Csntier.ppt

Packets/Datagrams

Fixed size blocks of information that are sent using TCP

Packet includes information like Address of host to send this to Address of host it is coming from Destination Port Number Sending Port Number MAC address of sender/receiver (hardware

address) Sequence info Data

Page 17: Norman White Stern School of Business Csntier.ppt

IP - Internet Protocol

Handle datagrams Defines Internet addressing scheme Routes datagrams to remote hosts Performs fragmentation and reassembly

of datagrams

Page 18: Norman White Stern School of Business Csntier.ppt

IP Addressing

Every host has an address in the form of www.zzz.yyy.zzz (the “IP” address)

Each subcomponent refers to a particular breakdown of all of the machines on the internet.

128.122.197.133 = sales.stern.nyu.edu 128 = edu domain 122 = nyu network 197 = subnet at stern 133 = address of sales computer

Page 19: Norman White Stern School of Business Csntier.ppt

Name Resolution

The TCP/IP protocols include the concept of “name lookup”, where names like sales.stern.nyu.edu are translated into their numeric addresses

(128.122.197.133) Hence one has to specify the locations

of the “name servers” you wish to use. These are servers that are given a name

(sales.stern.nyu.edu) and return its address.

Page 20: Norman White Stern School of Business Csntier.ppt

Gateways

Gateways (also called IP routers) are the computers used to connect your network to the internet

Page 21: Norman White Stern School of Business Csntier.ppt

Sockets and ports

TCP/IP uses “ports” to connect services between machines

The destination machine has particular ports offering different types of service 23 = telnet , 80 = WWW etc.

Client machine uses random port when it connects to a service (i.e. port 80 for http requests)

Combination of destination port and originating port = socket (i.e. a destination port that is in use)

Page 22: Norman White Stern School of Business Csntier.ppt

Standard TCP/IP Services and ports

telnet - 23 Ssh - 22 ftp - 21 NFS - Network File Service - 2049 Talk - 517 Sendmail - 25 http - 80

Page 23: Norman White Stern School of Business Csntier.ppt

Other TCP/IP Services

World Wide Web (usually port 80) Hyper media interface to internet Connects clients and servers using HTTP

Hyper Text Transfer Protocol Subset of the internet

Page 24: Norman White Stern School of Business Csntier.ppt

Packet Switched Networks

Problem – How do we fully connect thousands of computers together? (How many wires?) 2 computers – 1 3 computers – 3 4 computers - 6 5 computers – 10 N computers – (N*(N-1)/2) 1000 computers – about .5 million connections

Solution Don’t connect every computer to every other

computer, instead “route” information from one computer to another

Page 25: Norman White Stern School of Business Csntier.ppt

Packet Switched Network

Page 26: Norman White Stern School of Business Csntier.ppt

Network Communication Protocols

Protocol Rules to follow telling each computer what to

send where, when Packet switched protocols include routing of

packets from source to destination Protocols also define rules to follow if there

are errors, I.e. how to recover, retransmit etc.

Page 27: Norman White Stern School of Business Csntier.ppt

Higher level protocols

Low level protocols route packets (of bits) around the network. Packets include address

High level protocols know what the packets contain TCP/IP client server protocols Client sends requests over network to a

“server” program running on another computer

WWW C/S application

Page 28: Norman White Stern School of Business Csntier.ppt

Client Server Concepts

A program on one computer (the Client) can request services from a program on another computer (the Server)

Client issues requests to a server someplace on the network

Requests are specially formatted messages which can be understood by almost any type of computer

Requests are sent using a “standard” telecommunications protocol

Page 29: Norman White Stern School of Business Csntier.ppt

CS Concepts

Server responds with a message in the “standard” format

Client receives message and processes it

Page 30: Norman White Stern School of Business Csntier.ppt

Example – WEB Requests

In the WWW model, the client is the browser (Firefox, Safari, I.E.) running on your computer

The server is the web server running somewhere on the internet

Both the client and server must be connected through a TCP/IP communications network

Page 31: Norman White Stern School of Business Csntier.ppt

N Tier Client Server

The situation gets more complex, if the initial (Tier 1) server in turn becomes a client and requests services from another server in order to process the web request. There are now 3 programs running on 3 different computers involved in the processing of the web request.

Page 32: Norman White Stern School of Business Csntier.ppt

User

Web Browser

Web Server

Data Base Server

Client Server

Page 33: Norman White Stern School of Business Csntier.ppt

C/S Architectures

Two tier Clients connect directly to servers Example PC clients, LAN DB server, Web

server Three … N tier

Clients connect to intermediate servers which in turn issue requests to other servers

Examples PC to UNIX to IBM Mainframe

Page 34: Norman White Stern School of Business Csntier.ppt

N Tier CS

User

Web Browser

Web Server

Data Base Server

Application

Server

Page 35: Norman White Stern School of Business Csntier.ppt

More Terms JAVA – Sun developed language that runs code

on the user’s machine (i.e. built in to the web browser) Off loads processing from server Basis for new JINI language for appliances

FAT Client Term used to refer to putting all of application

code on the user’s machine (on the hard drive)

THIN Client – Distribute applications directly over the

internet using JAVA. App is downloaded everytime your run it.

CACHE Keep recently used html pages, images,

applets etcs on user hard drive. Only download when they change

Page 36: Norman White Stern School of Business Csntier.ppt

Even More Terms

TCO Total Cost of Ownership – includes support

HTTP Hyper Text Transfer Protocol – Protocol of the

WWW Applet

A compiled Java program ready for distribution over WWW

Digital Signature Numeric identifier indicating that a document

hasn’t been compromised or that authenticates the creator.

Page 37: Norman White Stern School of Business Csntier.ppt

Common Server Examples

Data Base Servers Application Servers Web Servers Ad Servers (Double Click) Multimedia (audio/video servers) Calendar Servers Authentication (LDAP) servers Mail servers Proxy Servers

Page 38: Norman White Stern School of Business Csntier.ppt

Management Takeaway

CS computing isolates each layer from the other layers.

Computers can be added as necessary to scale performance

Processing can happen anywhere, so that bottlenecks can be eliminated

Machines can be dedicated/optimized for different kinds of processing

Can start with everything on one machine, but add machines as load grows

Needs TCP/IP network protocol