Table of Contents Internet Access
TCP/IP Tutorial and Technical Overview

6.1 Gopher




Figure: Gopher

In short, the Internet Gopher is a distributed document search and retrieval system. It combines the best features of browsing through collections of information and fully indexed databases. The protocol and software follow a client/server model and permit users on a heterogeneous mix of desktop systems to browse, search, and retrieve documents residing on multiple distributed server machines.

The Gopher protocol was developed at the University of Minnesota and is available under RFC 1436. Its state is informational.

The reason for developing Gopher was the need for a campus-wide information system which enables anybody to be able to publish documents or information even with a small desktop computer. Gopher client software presents users with a hierarchy of items and directories much like a file system. In fact, the Gopher interface is designed to resemble a file system since a file system is a good model for locating documents and services. So if you are connected to a Gopher server you get a list of different items, similar to the display of a root directory from a PC. After selecting a menu item for example you get all the items included, similar to a subdirectory and so forth. If you select a file item for example the file is automatically transmitted and displayed at the client. It is not necessary for the file to reside on the same Gopher server where you got the information. A Gopher menu can include items from different Gopher servers and the user gets automatically connected to the server where the selected item points to and so on. The user does not know or care that the items up for selection may reside on many different machines anywhere on the Internet.

A simple example:

You would like to have a look at the menu of your canteen.

  1. Start your Gopher client and connect to the main Gopher server
  2. Find an item which could include the menu and select it. For example: Facilities
  3. The sub-items of Facilities are displayed
  4. One of the items may be "Today's Menu" which is a file residing on the canteen's Gopher server
  5. If you select it your Gopher client automatically establishes a connection to the server pointed to in the item, retrieves and displays the file
The path to the file could be very complex and Gopher servers around the world could be involved.

To implement the above mentioned hierarchy the Gopher client needs some information of the object type in order to display a file or a directory icon for example. The Gopher type is coded as a single digit at the beginning of each line. Following is a list of known Gopher types included in the RFC:

The following paragraphs describe the basic functionality of the 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. Let's assume a Gopher server listens to port 70. 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: <CR><LF> {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 describes the Gopher type as shown above. The succeeding characters up to the tab build the display string to be shown to the user for making a selection. The characters following the tab, up to the next tab form a selector string that the client software must send to the server to retrieve the document (or directory listing). In practice, the selector string is often a path name or other file selector used by the server to locate the item desired. The next two tab delimited fields denote the domain-name of the host that has this document (or directory), and the port at which to connect. A CR/LF denotes the end of the item. The client may present the above data stream as follows:

About Internet Gopher
Around the University of Minnesota...
Microcomputer News & Prices...
Courses, Schedules, Calendars...
Student-Staff Directories...
Departmental Publications...

In this case, directories are displayed with an ellipsis and files are displayed without any. However, depending on the platform the client is written for and the author's taste, item types could be denoted by other text tags or by icons.

In the example, line 1 describes a document the user will see as "About Internet Gopher". To retrieve this document, the client software must send the retrieval string: "Stuff:About us" to rawBits.micro.umn.edu at port 70. If the client does this, the server will respond with the contents of the document, terminated by a period on a line by itself. As you can see in this example the user does not know or care that the items up for selection may reside on many different machines anywhere on the Internet. The connection between server and client only exists while the information is transferred. After this the client may connect to a different server in order to get the contents of a displayed directory.

For further information about the Gopher protocol please refer to the RFC 1436. For a list of frequently asked questions including the anonymous FTP sites for retrieving the Gopher client and server code please get the following file from anonymous FTP: URL:ftp://rtfm.mit.edu/pub/usenet/news.answers/gopher-faq.

6.1.1 Implementations

A Gopher client is implemented in OS/2 Warp V3.0 and Internet Connection V3.0 for Windows.

6.1.2 Veronica

As interesting as it can be to explore "Gopherspace", one day you might want to retrieve some information or a file from a Gopher server. The problem is how to get the right servers providing the information needed without calling up endless Gopher menus. Fortunately there is a way to make even Gophers easier to use.

This tool is called Veronica (Very Easy Rodent-Oriented Net-wide Index to Computerized Archives) and does for Gopherspace what Archie does for FTP sites.

Veronica is a resource-discovery system providing access to information resources held on most ( 99% + ) of the world's Gopher servers. In addition to native Gopher data, Veronica includes references to many resources provided by other types of information servers, such as WWW servers, usenet archives, and telnet-accessible information services.

Veronica queries are keyword-in-title searches. A simple query can be quite powerful because a large number of information servers are included in the index.

Veronica is accessed through Gopher client software. A Veronica user submits a query (via a Gopher client) which may contain boolean keyword expressions as well as special Veronica directives. The result of a Veronica search is a Gopher menu comprising information items whose titles contain the specified keywords. The results menu may be browsed like any other Gopher menu.

In January 1995, 5057 Gopher servers were indexed. The index also includes items from approximately 5000 other servers, in cases where those servers are referenced on Gopher menus. These other servers include 3905 WWW servers and about 1000 TELNET-type services.

On most Gopher servers you will find Veronica by selecting Other Gopher and Information Services at the main menu and then Searching through Gopherspace using Veronica. If your Gopher server does not provide the above items connect directly to Veronica via gopher://veronica.scs.unr.edu.:70/11/veronica. There you will also find additional information about Veronica.

Table of Contents World Wide Web