|
CS 580 Client-Server Programming
Fall Semester, 2000
Client-Server Protocol
|
|
|
Previous   
Lecture Notes Index
   Next    
© 2000, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 20-Nov-00
|
|
Contents of Doc 23, Client-Server Protocol
References
CS
580, Spring 1997 lecture notes,
http://www.eli.sdsu.edu/courses/spring97/cs596/notes/protocol/protocol.html
Protocol
Communication
between client and server
Good
protocols are hard to design
Requirements
for a "good protocol":
- Available
protocol document
Well
defined
Every
bit of data sent in either direction has to have its place in the protocol
description.
Protocol
is a Language
Common
formal description:
- BNF
and Augmented BNF
Format
of the description language needs to be part of the protocol document.
Examples
are important
Complete
The
protocol must cover
all
possible situations.
- Garbage
data
- Old
client or server (different protocol versions)
- Illegal
requests
- Boundary
conditions
- Etc.
Parsable
Both
clients and servers are computer programs.
A
computer program's IQ is generally 0.
Design
goals:
- Distinct
information packets or messages
-
- Allow
parsing independent of semantics
-
- Allow
for code reuse
-
- For
example name-value pairs
Available
Different
groups may write clients and servers at different times.
Central
registry for Internet protocols
Self
regulating:
- RFC
- Request For Comment
- IETF
- Internet Engineering Task Force
Official:
Protocol
Types
Two
basic types
Typical
synchronous
- Client
sends request to server
- Server
responds with a reply
Examples
- HTTP,
POP, SMTP, GOPHER, XMODEM
Typical
asynchronous
Client
and server both send information to each other concurrently.
Examples
- TELNET,
RLOGIN, ZMODEM
A
hybrid protocol is also possible
Protocol
Design Issues
Protocol
design is difficult!
Learn
from examples
Some
issues
- Protocol
extendibility and versioning
- Byte
order used for sending values
- ASCII
vs. Binary protocol
- Easy
of debugging
- Efficiency
- Synchronous
vs. Asynchronous
-
- Protocol
overhead
- Roundtrip
delays
-
- Who
is writing, who is reading?
-
- Timeouts
vs. Synchronous protocols
Copyright ©, All rights reserved.
2000 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.
Previous   
visitors since 20-Nov-00
   Next