CSC 546: Client/Server Fundamentals
Fall 2000
Midterm Review
Overview
client/server relationship
distributed processing terminology
multiprogramming vs. multitasking vs. multiprocessing, IPC
mainframe vs. file-sharing vs. client/server
advantages
flexibility, reduced traffic, reduced development & maintenance, data access
disadvantages
resistance to change, high training costs, planning required, security
Driving forces
business perspective
productivity, quality, responsiveness, focus on core business
productivity vs. efficiency, reengineering work flows
technology perspective
enabling technologies: intelligent desktop devices + network architectures
technology advances: faster components, VLSI & CPU & memory advances
technology trends: standardization, HCI, info dissemination
computing vision
enterprise computing, info reachability, info access, info handling
information-driven productivity, information-driven economy
Client/server communications
message passing, ports
connectionless (datagrams) vs. connection-oriented (datastreams)
duplex vs. half-duplex vs. simplex
static vs. dynamic name resolution
blocking vs. non-blocking
remote procedure calls
message queueing
World Wide Web
Web as client/server
Hypertext Transfer Protocol (HTTP)
connectionless (HTTP/1.0) vs. connection-oriented (HTTP/1.1)
GET, HEAD, POST, PUT, DELETE requests
request header fields (e.g., If-Modified-Since)
response header fields (e.g., status code, Date, Last-Modified, Expires)
caching, cookies
client-side vs. server-side programming
Common Gateway Interface (CGI)
C++ review
variables: int, double, char, bool, ...
control: if, if-else, while, for
functions: prototypes, return type, by-value vs. by-reference parameters
class (type) vs. object (instance)
useful classes: string, vector, ifstream/ofstream
Abstract Data Type (ADT): data (variables) + operations (member functions)
class definition split into header file (.h) and implementation file (.cpp)
templated class (parameterized, must be intantiated when declared)
Client/server protocols
OSI 7-layer model
application, presentation, session, transport, network, data link, physical
communication up & down the layers, across the network
protocol suites
Microsoft: named pipes (turns communication channel into file-like entity)
NetBIOS (commands formatted in 64 byte Network Control Block)
NetBEUI (encapsulates NCB, adds reliability)
IBM: APPC (transaction programs communicate via a conversation)
LU 6.2 (processes that transaction programs attach to)
PU 2.1 (addresses used to administer physical devices)
Internet: RPC/XDR (remote procedure calls)
Sockets (file-like interface, developed for UNIX)
IP (packet network interface, handles Internet routing)
IP addresses (32 bits, divided into dotted decimal)
IPng (a.k.a. IPv6) addresses
TCP (reliable, connection-oriented transport protocol)
UDP (fast, unreliable, connectionless transport protocol)
Sockets
session layer protocol on top of TCP or UDP
file-like interface, accessible to applications via C libraries
datastream sockets (use TCP)
client must: create socket, connect to server socket, read/write, close
server must: create socket, bind to address (IP number + port),
listen for a connection, accept the connection, read/write, close
datagram sockets (use UDP)
client must: create socket, specify server address, sendto/recvfrom
server must: create socket, bind to address, sendto/recvfrom