reasons:
(a) A hierarchical arrangement of information is familiar to many
users. Hierarchical directories containing items (such as
documents, servers, and subdirectories) are widely used in
electronic bulletin boards and other campus-wide information
systems. People who access a campus-wide information server will
expect some sort of hierarchical organization to the information
presented.
RFC 1436 Gopher March 1993
(b) A file-system style hierarchy can be expressed in a simple
syntax. The syntax used for the internet Gopher protocol is
easily understandable, and was designed to make debugging servers
and clients easy. You can use Telnet to simulate an internet
Gopher client's requests and observe the responses from a server.
Special purpose software tools are not required. By keeping the
syntax of the pseudo-file system client/server protocol simple, we
can also achieve better performance for a very common user
activity: browsing through the directory hierarchy.
(c) Since Gopher originated in a University setting, one of the
goals was for departments to have the option of publishing
information from their inexpensive desktop machines, and since
much of the information can be presented as simple text files
arranged in directories, a protocol modeled after a file system
has immediate utility. Because there can be a direct mapping from
the file system on the user's desktop machine to the directory
structure published via the Gopher protocol, the problem of
writing server software for slow desktop systems is minimized.
(d) A file system metaphor is extensible. By giving a "type"
attribute to items in the pseudo-file system, it is possible to
accommodate documents other than simple text documents. Complex
database services can be handled as a separate type of item. A
file-system metaphor does not rule out search or database-style
queries for access to documents. A search-server type is also
defined in this pseudo-file system. Such servers return "virtual
directories" or list of documents matching user specified
criteria.
2. The internet Gopher Model
A detailed BNF rendering of the internet Gopher syntax is available
in the appendix...but a close reading of the appendix may not be
necessary to understand the internet Gopher protocol.
In essence, the Gopher protocol consists of a client connecting to a
server and sending the server a selector (a line of text, which may
be empty) via a TCP connection. The server responds with a block of
text terminated with a period on a line by itself, and closes the
connection. No state is retained by the server between transactions
with a client. The simple nature of the protocol stems from the need
to implement servers and clients for the slow, smaller desktop
computers (1 MB Macs and DOS machines), quickly, and efficiently.
Below is a simple example of a client/server interaction; more
complex interactions are dealt with later. Assume that a "well-
known" Gopher server (this may be duplicated, details are discussed
RFC 1436 Gopher March 1993
later) listens at a well known port for the campus (much like a
domain-name server). The only configuration information the client
software retains is this server's name and port number (in this
example that machine is rawBits.micro.umn.edu and the port 70). In
the example below the F character denotes the TAB character.
Client: {Opens connection to rawBits.micro.umn.edu at port 70}
Server: {Accepts connection but says nothing}
Client: {Sends an empty line: Meaning "list what you have"}
Server: {Sends a series of lines, each ending with CR LF}
0About internet GopherFStuff:About usFrawBits.micro.umn.eduF70
1Around University of MinnesotaFZ,5692,AUMFunderdog.micro.umn.eduF70
1Microcomputer News & PricesFPrices/Fpserver.bookstore.umn.eduF70
1Courses, Schedules, CalendarsFFevents.ais.umn.eduF9120
1Student-Staff DirectoriesFFuinfo.ais.umn.eduF70
1Departmental PublicationsFStuff:DP:FrawBits.micro.umn.eduF70
{.....etc.....}
. {Period on a line by itself}
{Server closes connection}
The first character on each line tells whether the line describes a
document, directory, or search service (characters '0', '1', '7';
=2= |