Date post: | 22-Dec-2015 |
Category: |
Documents |
Upload: | francis-green |
View: | 217 times |
Download: | 2 times |
N TIER CLIENT/SERVER CONCEPTS
Norman WhiteStern School of Business
Csntier.ppt
Agenda
Background Data communications TCP/IP Physical networks Database management systems
But First, Some Background
Data Communications Networking …
DATA COMMUNICATIONS
Some Basics
Communication Components
SOURCE SINK MEDIUM
SOURCE MEDIUMSINK
telephonecable satellite
Communications Media
Telephone Satellite Cellular Wifi Cable Fiber Optic Blue Tooth etc.
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
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
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
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
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
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
TCP/IP
Protocol of the Internet
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
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
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
IP - Internet Protocol
Handle datagrams Defines Internet addressing scheme Routes datagrams to remote hosts Performs fragmentation and reassembly
of datagrams
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
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.
Gateways
Gateways (also called IP routers) are the computers used to connect your network to the internet
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)
Standard TCP/IP Services and ports
telnet - 23 Ssh - 22 ftp - 21 NFS - Network File Service - 2049 Talk - 517 Sendmail - 25 http - 80
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
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
Packet Switched Network
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.
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
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
CS Concepts
Server responds with a message in the “standard” format
Client receives message and processes it
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
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.
User
Web Browser
Web Server
Data Base Server
Client Server
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
N Tier CS
User
Web Browser
Web Server
Data Base Server
Application
Server
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
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.
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
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