home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / gopher / Gopher_Conference_94 / Papers / Go4zgate.Z / Go4zgate
Encoding:
Text File  |  1994-04-28  |  19.0 KB  |  444 lines

  1.  
  2.                     Accessing Library Catalogs Using Go4zgate
  3.  
  4.                                Neophytos Iacovou
  5.  
  6.           While Gopher has had a gateway to WAIS (an extension of the 
  7.           1988 revision of Z39.50) for several years, Z39.50 has not
  8.           been standing still. The new 1992 revision of Z39.50 requires
  9.           a new gopher gateway and this allows for access to online
  10.           catalogs. This paper describes Go4zgate - a gopher to 1992
  11.           Z39.50 gateway.
  12.  
  13.                                 April 13, 1994
  14.  
  15.  
  16.  
  17. 1.0 Introduction
  18.     At the moment a student can access the University of Minnesota's library 
  19. system by either: walking up to any one of the public access terminals found in
  20. every library on campus; or they can open a telnet/TN3270 session to the 
  21. libraries's mainframes. In either case the result is the same, the student is 
  22. greeted with a what can only be described as "clunky" user-interface. 
  23.  
  24.     The University of Minnesota library system has embraced Z39.50 and is 
  25. beginning to move away from its current mainframe/terminal architecture to a 
  26. client/server architecture. As this transition occurs the opportunity to give
  27. the students a better user-interface exists.
  28.  
  29.     Z39.50 is a NISO standard; its official name is "Information Retrieval 
  30. Application Service Definition and Protocol Specification for Open Systems 
  31. Interconnection". Z39.50 is currently at version 2, the planned release date of
  32. version 3 is currently set for the fall of 1994. 
  33.  
  34.     A Gopher to Z39.50 version 2 gateway (Go4zgate) was developed in order to 
  35. allow students to access the various Z39.50 databases currently available. At 
  36. the present time these databases are generally on-line library catalogs, but as
  37. more and more people become familiar with Z39.50 the expected number of 
  38. available Z39.50 servers will increase.
  39.  
  40.     The rest of this paper describes Go4zgate and how it can be used to access
  41. on-line library catalogs.
  42.  
  43.  
  44. 2.0 Why Use Go4zgate?
  45.     The benefits of accessing Z39.50 library catalogs via Go4zgate are: 
  46.  
  47.     ╖   Users don't have to learn a new IR system, they are already familiar
  48.         with Gopher.
  49.  
  50.     ╖   The interface is kept simple and does not assume the user to be a 
  51.         "library catalog power user".
  52.  
  53.     ╖   As the user moves from catalog to catalog (potentially from site to 
  54.         site) she is not forced to learn a new command set, the Go4zgate 
  55.         interface remains the same.
  56.  
  57.  
  58. 3.0 An Example Session
  59.  
  60.     The following is a walk through of what a typical Z39.50 session might 
  61. look like:
  62.  
  63.     Selecting the desired library catalog to search the user is greeted with a
  64. screen asking her to create a query by providing the appropriate data for each
  65. of the 3 search fields. At least one of the search fields must be filled in. 
  66. To keep the user-interface simple all 3 search fields are tied together by a 
  67. boolean "AND" operation. Go4zgate can also handle an "OR" operation across all
  68. fields as well.
  69.  
  70.     The interface to this Z39.50 database creates queries based on the Title, 
  71. Author, and Subject fields. Had the user not been searching a library catalog 
  72. but rather a database on cars, the fields from which the query was to be 
  73. created could just as easily have been Make, Model, and Year. The MaxRecs field
  74. prompts the user for the maximum number of records to return from the search.
  75.  
  76. Being a William S. Burroughs fan this user does a search on _Interzone_.
  77.  
  78.  
  79.  
  80.                    Internet Gopher Information Client v2.0.12
  81.  
  82.                                ASK block examples
  83.  
  84.       1.  CC <??>
  85. +-----------------------------------Melvyl------------------------------------+
  86. |                                                                             |
  87. |                     University of California Book Catalog                   |
  88. |                                                                             |
  89. | Title    interzone                                                          |
  90. | Author                                                                      |
  91. | Subject                                                                     |
  92. | MaxRecs  10                                                                 |
  93. |                                                                             |
  94. |                   (enter 1 or more of the search fields)                    |
  95. |                                                                             |
  96. | [Help: ^_]  [Cancel: ^G]                                                    |
  97. +-----------------------------------------------------------------------------+
  98.       15. Sybase Demo/
  99.       16. T-shirt <??>
  100.       17. TextBook.ask <??>
  101.       18. TextBook_Help
  102.  
  103.  
  104.                           FIGURE 1.   Creating a Query
  105.  
  106.  
  107.  
  108.     The query returned 5 records. The records are displayed in their "short"
  109. form.  Selecting any one of the records will display the record in its "long"
  110. form.
  111.  
  112.  
  113.  
  114.                    Internet Gopher Information Client v2.0.12
  115.  
  116.                                     Melvyl
  117.  
  118.       1.  View All Of The Retreived Records: 5 total hits, 5 returned
  119.  -->  2.  Interzone / William S. Burroughs ; edited by James Grauerholz.
  120.       3.  Interzone / William S. Burroughs ; edited by James Grauerholz.
  121.       4.  Interzone : the 1st anthology : new science fiction and fantasy
  122.       5.  Interzone : the first anthology / edited by John Clute, Colin
  123.       6.  Interzone / William S. Burroughs ; edited by James Grauerholz.
  124.  
  125.  
  126.  
  127.  
  128. Press ? for Help, q to Quit, u to go up a menu                      Page: 1/1
  129.  
  130.  
  131.                        FIGURE 2.   Results of the Query
  132.  
  133.  
  134.  
  135.     Selecting any one of the returned records will display the record in its 
  136. "long" format. One thing to notice about this format is that information 
  137. concerning the book's availability and location within the library are not 
  138. shown. The reason for this is that holdings information is currently not a part
  139. of the Z39.50 standard. This information will be included in version 3 of the 
  140. standard.
  141.  
  142.     Another thing to note is the "Other authors" field. Z39.50 queries 
  143. involving the Author are also checked with the "Other authors" field. This may
  144. confuse people are first, records will be returned even though the specified
  145. author is not the principle author. However, this feature also accounts for 
  146. anthologies in which the work of the specified author may appear.
  147.  
  148.  
  149.  
  150. Interzone / William S. Burroughs ; edited by James Grauerholz. (0k)        100%
  151. --------------------------------------------------------------------------------
  152. Author:        Burroughs, William S., 1914.
  153. Title:         Interzone / William S. Burroughs ; edited by James
  154.                   Grauerholz.
  155. Publisher:     New York, N.Y. : Viking, 1989.
  156. Pages:         xxiii, 194 p. : ill. ; 24 cm.
  157. Notes:         Illustrations on lining papers.
  158. Other authors: Grauerholz, James.
  159.  
  160.  
  161. --------------------------------------------------------------------------------
  162. [Help: ?]  [Exit: u]  
  163.  
  164.  
  165.                        FIGURE 3.   A Record's Long Format
  166.  
  167.  
  168.  
  169.     The first record returned is actually a pseudo record and is created by 
  170. Go4zgate. By selecting this record the user is allowed to view the long format
  171. of all the records returned. This comes in handy particularly when the result
  172. of a query produces more than a handful of records. Without this feature the
  173. user would be forced to manually open each and every record in order to gain
  174. the same information. Users will also want to save/download this record.
  175.  
  176.  
  177.  
  178. View All Of The Retreived Records: 5 total hits, 5 returned (2k)           30% 
  179. --------------------------------------------------------------------------------
  180. Author:        Burroughs, William S., 1914.
  181. Title:         Interzone / William S. Burroughs ; edited by James
  182.                   Grauerholz.
  183. Publisher:     New York, N.Y. : Viking, 1989.
  184. Pages:         xxiii, 194 p. : ill. ; 24 cm.
  185. Notes:         Illustrations on lining papers.
  186. Other authors: Grauerholz, James.
  187.  
  188. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  189. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  190.  
  191. Author:        Burroughs, William S., 1914.
  192. Title:         Interzone / William S. Burroughs ; edited by James
  193.                   Grauerholz.
  194. Publisher:     New York, N.Y. : Viking, 1989.
  195. Pages:         xxiii, 194 p. : ill. ; 24 cm.
  196. Notes:         Illustrations on lining papers.
  197. Other authors: Grauerholz, James.
  198.  
  199. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  200. --------------------------------------------------------------------------------
  201. [Help: ?]  [Exit: u]  [PageDown: Space]  
  202.  
  203.  
  204.                         FIGURE 4.   All Records Returned
  205.  
  206.  
  207.  
  208.     This record also supplies the user with some information regarding her 
  209. request.  In this example case the user is told that her query produced 5 
  210. records, of which 5 were returned. This feature is useful because often a query
  211. may produce more records than were requested by MaxRecs. In such a case the 
  212. user can then decide if she wants to rerun the query with a higher value for
  213. the maximum number of records to be returned.
  214.  
  215.  
  216. 4.0 Exactly What Information Is Returned?
  217.     Currently the following fields are displayed to the user: Author, Title, 
  218. Publisher, Pages, Series, Notes, Subjects, Other authors, and Call Numbers. 
  219. The Call Numbers field can be a bit misleading. Most libraries stopped 
  220. populating the Call Number field ever since they started to store information
  221. about a book in its Holdings Record. Because of this the information in the 
  222. Call Number field may not always be valid. In the best case there is no 
  223. information available in the field, or any information present is accurate. In
  224. the worst case the information shown in the field is old and out-dated.
  225.  
  226.     In the future, besides returning ASCII text Z39.50 queries may display 
  227. images or play sounds. These additions are scheduled to find their way into
  228. version 3 of the standard.
  229.  
  230.  
  231. 5.0 Future plans
  232.  
  233.     At the moment the only boolean operation applied is an "AND" or an "OR",
  234. and this is applied across all of the search fields. Future plans involve 
  235. allowing for boolean operations to be applied within a search field. As an 
  236. example, the user who previously searched for Interzone would have to issue 
  237. another query in order to find information about Queer. It would be nice if she
  238. could specify something in the order of: "Interzone" AND "Queer".
  239.  
  240.     We also plan on following the development of Z39.50 and implement changes
  241. in the standard in order to keep the gateway as useful as can be.
  242.  
  243.  
  244. 6.0 Technical Details
  245.  
  246. 6.1 Internet Gopher and the Gopher Protocol
  247.     Internet Gopher is an information system used to publish and organize 
  248. information on servers distributed across the Internet. Initially developed at
  249. the University of Minnesota in early 1991, it has spread to over 4800 sites
  250. worldwide as of December 1993.
  251.  
  252.     The Gopher system is a client-server system that can be used to build a
  253. Campus Wide Information System (CWIS). Clients, which browse and search
  254. information are available for most major platforms (Macintosh, DOS, Windows,
  255. Unix, VMS, MVS, VM/CMS, OS/2). Servers, which translate and publish
  256. information, are also available for all of the platforms mentioned above.
  257.  
  258.     This client-server architecture uses the Internet Gopher Protocol. The
  259. Gopher protocol has been described as "brutally simple." It is based on a
  260. web/tree metaphor of files and directories. Its basic primitives are a list
  261. directory transaction, a retrieve file transaction and a search for directory
  262. entries transaction.
  263.  
  264.  
  265. 6.2 The Z39.50 Architecture
  266.     The last page of this paper contains a diagram illustrating a typical
  267. Z39.50 architecture. 
  268.  
  269.     The Z39.50 server may have one or more on-line catalogs available. The 
  270. name of the catalog to be searched must be provided along with the query sent
  271. to the server. 
  272.  
  273.     Because Z39.50 is a client/server protocol the user's client must make a
  274. connection to the Z39.50 server, make a request, and await for the output. 
  275. Go4zgate was developed because Gopher clients aren't force to speak Z39.50ish;
  276. therefore, they require a translator who understands both Gopher+ and Z39.50
  277. version 2. Go4zgate resides between the Gopher+ client and the Z39.50 server.
  278.  
  279.     The interface between the user and Go4zgate is a Gopher+ ASK form. This
  280. makes creating new interfaces fast and simple.
  281.  
  282.     The Gopher client, Go4zgate, and the Z39.50 server are all connected 
  283. together via the Information Super Highway.
  284.  
  285.  
  286. 6.3 What Does the Ask Form Look Like?
  287.  
  288.  
  289. Note:            Search University of California's Melvyl Library System  
  290. Note: 
  291. Ask: Title
  292. Ask: Author
  293. Ask: Subject
  294. Ask: MaxRecs    10
  295. Note: 
  296. Note:                   (enter 1 or more of the search fields)                  
  297.  
  298.  
  299.  
  300.     As you can see a rather simple form is used. Note that because MaxRecs must
  301. be supplied a value a default number of 10 is supplied for the user. This of
  302. course can be changed. If no value is provided by the user the query will not
  303. be attempted and the user will be informed that invalid input has been 
  304. provided.
  305.  
  306.     This interface can be easily expanded as well. If you recall we had i
  307. previously mentioned that all three of the search fields are tied together by a
  308. boolean "AND" operation, and that an "OR" operation was also valid. Because
  309. some users may want to decide between the two choices it is possible to add
  310. the following line to the above script in order to provide this service:
  311.  
  312.         Choose: Operation:   AND OR
  313.  
  314.     In the ASK form shown above this is not an option because it adds another
  315. variable which may confuse users. This is not to say that it is never going to
  316. be presented to users as an option to control. Below is an example of what a
  317. form with more user-specified options might look like:
  318.  
  319.  
  320.                    Internet Gopher Information Client v2.0.12
  321.  
  322.                                ASK block examples
  323. +-----------------------------------Other-------------------------------------+ 
  324. |                                                                             |
  325. |                        Search An On-Line Library System                     |
  326. |                                                                             |
  327. | Title               interzone                                               |
  328. | Author                                                                      |
  329. | Subject                                                                     |
  330. | MaxRecs             10                                                      |
  331. | Boolean Operator    AND                                                     |
  332. |                                                                             |
  333. | Hostname of Server  melvyl.ucop.edu                                         |
  334. | Catalog to Search   CATALOG                                                 |
  335. | Port to Connect     210                                                     |
  336. |                                                                             |
  337. |                   (enter 1 or more of the search fields)                    |
  338. |                                                                             |
  339. | [Help: ^_]  [Cancel: ^G]                                                    |
  340. +-----------------------------------------------------------------------------+
  341.       18. TextBook_Help
  342.  
  343. Press ? for Help, q to Quit, u to go up a menu                      Page: 1/2
  344.  
  345.  
  346.  
  347.  
  348.  
  349. 6.4 What Goes on After the User Has Completed the Form?
  350.  
  351.  
  352. #!/usr/local/bin/perl
  353.  
  354. $Title = <>; chop ($Title);
  355. $Author = <>; chop ($Author);
  356. $Subject = <>; chop ($Subject);
  357. $Mrecs = <>; chop ($Mrecs);
  358.  
  359. $Title =~ s/[^A-Za-z0-9 ]//g;
  360. $Author =~ s/[^A-Za-z0-9 ]//g;
  361. $Subject =~ s/[^A-Za-z0-9 ]//g;
  362. $Mrecs =~ s/[^0-9 ]//g;
  363.  
  364. $Host = "melvyl.ucop.edu";
  365. $Catalog = "CATALOG";
  366. $Port = "210";
  367.  
  368. $Operator = "AND";
  369. $Gopher_host = "mudhoney.micro.umn.edu";
  370. $Gopher_port = "70";
  371. $MyPID = $$;
  372. $longdir = 0;
  373. $Binary_Path1 = "/export/mudhoney/gopher-data/gplustest/ask/di/go4zgate";
  374. $Binary_Path2 = "/gplustest/ask/di/go4zgate_shell";
  375. $longdir = 1 if ($ENV{"CONTENT_TYPE"} eq "application/gopher+-menu");
  376.  
  377. system "$Binary_Path1 -I $longdir -h $Host -c $Catalog -p $Port -o $Operator -m
  378. \"$Mrecs\" -T \"$Title\" -A \"$Author\" -S \"$Subject\" -M $MyPID -B $Binary_Pat
  379. h2 -H $Gopher_host -P $Gopher_port";
  380.  
  381.  
  382.  
  383.     The above code is a perl script which processes the information entered
  384. into the form. As you can see Operator is preset to an AND operation. Included
  385. in this script are preset values for Host (which is set to melvyl.ucop.edu for
  386. this particular form), the Catalog, and the Z39.50 port (Port). On thing to
  387. note, most servers will be listening to Z39.50 requests on port 210, but this
  388. may not always be so. 
  389.  
  390.     The only other variable which is interesting to look at is "longdir". This
  391. variable tells Go4zgate if it should return information using the long dir.
  392. format or not. As an example, the cursors version of the Gopher client will
  393. request for long dir. listings, TurboGopher (the Macintosh Gopher client) will
  394. not. 
  395.  
  396.     One final word, as you make changes to the ASK form (i.e., by adding
  397. options such as allowing the user to select by which boolean operator the
  398. search fields are bound) you will also have to make changes to this script. 
  399.  
  400.  
  401. 6.5 A Few Words on Go4zgate itself
  402.     You may have noticed that the above script does not apply any error checks
  403. on the input provided by the user. All of that is done within the gateway
  404. software itself. Rest assured that invalid options are checked for and an error
  405. message is returned to the user. Invalid input includes: a value of 0, or less,
  406. or NULL for MaxRecs; and NULL data for each of the search fields.
  407.  
  408.     The smaller the catalog the server is searching through and the easier the
  409. query the user requested is, the faster the gateway is. The bottleneck in terms
  410. of time is, and this shouldn't come as a big surprise, the time required for
  411. the server to execute the query. In order to make life easier for the user,
  412. Go4zgate caches the records returned by the server. This means that once the
  413. request has been fulfilled the user will be able to select and view any of the
  414. returned records relatively fast. If the user tries to retrieve one of the
  415. records returned and, for any reason, the cache has been removed the gateway
  416. will go back to the server and request that the original query be fulfilled -
  417. the original cache will be recreated.
  418.  
  419.  
  420. 7.0 The Gateway Software
  421.     Parts of the gateway software were written by: Ray Larson at the School of
  422. Library and Information Studies, UC Berkeley, who wrote most of the Z39.50
  423. query engine; Clearinghouse for Networked Information Discovery and Retrieval
  424. (CNIDR), who took the query engine and made a WWW gateway from it; and the
  425. University of Minnesota who took the software from CNIDR and made a Gopher+
  426. gateway, in addition to adding more functions provided for by the query engine
  427. into the gateway.
  428.  
  429.     The Go4zgate gateway allows the Gopher Client to:
  430.  
  431.     ╖   Request Z39.50 based queries from a Z39.50 server.
  432.  
  433.     ╖   Retrieve and display the records which were returned by the server.
  434.  
  435. The gateway is available via anonymous ftp from boombox.micro.umn.edu
  436. via anonymous ftp from the directory
  437.  
  438.         /pub/gopher/Unix/gopher-gateways/go4zgate
  439.  
  440. Included in this distribution are some sample ASK blocks that define the form
  441. users are presented with. Also included is this document.
  442.  
  443.  
  444.