9.1 -- Introduction: Unix remains the dominant environment for Hermes implementations as most development and experimentation occurred on Sun Sparc workstations.
9.1.1 -- The Web-Hermes interface, a dynamic menu CGI script generator for Hermes search engine(s), renders integrated data world-wide through common web-browsers; In this respect we obtain global access from any Web-aware platform. Additionally, the Web-Hermes interface supports calls to numerous existing web search engines (such as Lycos, and InfoSeek) thus providing a link to directly apply Hermes query results to further information gathering through the world-wide-web.
Following successful login (see Image 9-1), Web-Hermes presents the user with a push-button listing of available mediators and domains (see Image 9-3); To the left of all selections sits a numeric pushbutton -- Clicking a button prompts selection. Mediator selection causes Hermes to render the corresponding predicate selection page; Image 9-4 displays a few of the predicates available from the Inauguration mediator which addresses information pertaining to President Clinton's first inauguration celebration. Here we see that query five finds pictures of people of the same rank while query seven finds spouses of people listed in a given picture. A composition of these two queries, in-turn, finds the spouses of individuals pictured together who have attained the same rank. To build this conjunctive query, first select predicate five (click on the predicate button) and then select predicate seven. Image 9-5 displays this conjunctive query with the rank instantiated to "President"; Image 9-6 shows the corresponding first answer which located a picture of president Bill Clinton (with ex president George Bush) and identified his spouse as Hillary Clinton. NOTE: Web-Hermes mediator files differ slightly from that of standard mediator files in that predicate declarations include a few markup characters similar to standard web hypertext (HTML). This allows the mediator author to differentiate predicate arguments which must be instantiated (rendered in green) with those which are optional (rendered in red) and to further denote return value terms with blue text. In this respect, the mediator author can ensure argument instantiation, where necessary, prior to query execution.
Selecting specific answer arguments allows the user to invoke actions pertaining to the corresponding argument. Selecting (clicking on) the image file argument from Image 9-6, for example, prompts Web-Hermes to display the file (see Image-9-7). Selecting a returned string, such as the spouse field in Image 9-6, prompts Web-Hermes to render a web-search page using the returned string value as input. Image 9-8 displays the search engine page rendered by selecting the spouse field; Image 9-9, in-turn, shows the initial Lycos search results.
9.1.2 -- The X-Hermes interface renders a graphical X-Windows front-end for the Hermes search engine(s) consisting primarily of a menu bar and three scrollable text boxes. The top text box presents currently available user selections such as mediator files or specific predicates. The middle text box accepts user input for query and argument instantiation. The bottom text box commonly presents resulting answer text or system feedback to user input.
Image 9-15 shows the initial X-Hermes interface; The top (scrollable) text box presents the currently available mediator files, the middle text input field remains clear, and the bottom text box displays the opening acknowledgments. Selecting the Help menu item (clicking on it with left-mouse button) at any point prompts Hermes to render a help-text window. Selecting Exit prompts Hermes to shutdown. Selecting a mediator file prompts the system to load the desired mediator and display available predicates in the top text box with predicate descriptions in the bottom box (see Image 9-16).
Selecting predicate entries (top text-box) with a single click causes X-Hermes to display the predicate syntax in the bottom box as in Image 9-17. Selecting the same predicate a second time (a second click) prompts X-Hermes to write the predicate mask in the input (middle) text-box. Selecting yet another predicate to the input box causes X-Hermes to link the two predicates with the '&' character, thus forming a conjunctive query (see Image 9-18). The input box is fully editable; to instantiate a predicate argument, place the cursor on the appropriate argument (click on text in the input box) and enter the necessary changes. Clicking on the menu Search entry invokes query processing; The resulting answer text will soon appear in the bottom text box with potentially viewable files (selectable for appropriate action processing) appearing in the top text box (see Image 9-19). Should the user then select one of the resulting action files, X-Hermes processes the file through a mediator selected "action module". As for the inauguration mediator, it defaults image file display to the Unix standard XV image viewer; Thus Image 9-20 shows X-Hermes running in the background with the image file inaug21.gif displayed in the foreground via XV.
9.1.3 -- The original Hermes interface (hermes) renders a command-line text menu based front-end for Hermes search engines.
9.1.4 -- The remote Hermes server ("rhermes2") processes mediator queries from network distributed client front-ends (such as the WebHermes interface). Remote Hermes client developers may implement interfaces in any language so long as they adhere to the defined command protocols outlined below. The remote Hermes textual server command syntax is documented here solely for those developers who wish to develop such alternate platform, or language, client front-ends.
Source code provided in the "source/rmediator" directory implements the necessary C functions which allow C based Hermes clients to communicate with the remote Hermes server -- NOTE: The current rmediator functions (openRemoteMediator, searchRemoteMediator, replyRemoteMediator, and closeRemoteMediator) implement mediator open, query execution, and session termination calls ONLY. The rmediator source code will get extended to include the new remote Hermes server commands once those extensions are finalized (TJR -- 02 April 1998).
The "RHSock" Java class (under development, available soon) implements the ENTIRE remote Hermes communications protocol in a simple, object oriented package. Rendered as Java applets, or applications, remote Hermes client modules will run on any (Java enabled) hardware platform.
Remote Hermes server command introduction. During initialization, the remote Hermes client application prompts the remote Hermes server to establish a TCP/IP socket connection. Data exchange between client and server then occurs textually via standard socket input/output streams -- NOTE: The client application must implement whatever functions necessary to translate between command/data text, and the actual user interface.
By design, remote Hermes command literals, such as "open" or "search", must start with a lower case letter. Additionally, all command and/or answer strings must end with the "StopStop" termination sequence (double pound signs with end-of-line character "##\n").
The remote Hermes server answer, generalized, should appear in one of four formats:
Failure: "no##\n"
Failure with information: "no\nINFO_TEXT_HERE\n##"
Success: "yes##\n"
Success with Data return: "yes\nANSWER_TEXT_HERE\n##"
The original command syntax (the actual command text passed via socket
streams between the Hermes client and server applications) allows
clients to prompt the remote
Hermes server to open a specified mediator file, execute queries
defined for that mediator, and terminate the socket connection. Such command
constraints limit Hermes client application development; Programmers
must either hard-code Hermes client front-ends to specific mediator
files and queries, or they must include parsing code within the client
application which reads data files similar to those used by, or perhaps even
shared with, the remote Hermes server
(i.e. hermes.cat, hermes.dom, and the actual mediator files).
The syntax for these remote Hermes server commands follows:
Open Mediator:
"open '/fs/tarski3/demo/Hermes/Data/travel/travel.med' ##\n"
This command prompts the remote Hermes server to open the mediator file located via system path '/fs/tarski3/demo/Hermes/Data/travel/travel.med'.Enclose Hermes file paths in single quotes, and terminate the command string with the double pound sign and end-of-line string ("##\n"). On success, the remote Hermes server should respond with "yes##\n".
Execute query, return one answer:
"search one city_feature(City, Feature, Picture ):1.0 ##\n"
This travel mediator query prompts the remote Hermes server to return one city_feature tuple where feature is a city feature and picture is an image file path of tuple city feature. The answer stream text should appear as follows:
"yes\ncity_feature("Amsterdam", "Church", 'travel01.tiff'):1.\n##\n";
Execute query, return all answers:
"search all city_feature(City, Feature, Picture ):1.0 ##\n"
This travel mediator query prompts the remote Hermes server to return all city_feature tuples where feature is a city feature and picture is an image file path of tuple city feature. The answer stream text would appear in the following format for the N (count) returned query answers:
"yes\nAnswer_1_Text\nAnswer_2_Text\n ... Answer_N_Text\n##\n";
Some example answer strings for this query (perhaps Answer_1_Text thru
Answer_4_Text) might include the following:
city_feature("Amsterdam", "Church", 'travel01.tiff'):1.
city_feature("Durnstein", "Danube", 'travel02.tiff'):1.
city_feature("Durnstein", "Church", 'travel02.tiff'):1.
city_feature("Durnstein", "Subrahmanian", 'travel02.tiff'):1.
Close remote Hermes connection:
"close ##\n"
This command prompts the remote Hermes server to close all data and temporary files, release memory structures, and terminate the TCP/IP socket connection.
The extended command syntax (remote Hermes server enhancements IN-PROGRESS)
allows greater flexibility for client application development. Thru these
commands, client applications may (SOON) obtain mediator and query information
directly from the server, eliminating the need for client accessible
(and redundant) Hermes catalog and mediator files. Additionally,
mediator authors may impose security restrictions on sensitive data.
Furthermore, client applications may support user login/authenticate for
protected assets, mediator file switching, and Hermes domain function
call timing extraction (More to follow as I think of it -- SUGGESTIONS
WELCOME)...
New command syntax follows:
Login (PENDING):
"login userName userPassword ##\n"
This command allows users to authenticate for protected mediator resource
access. The remote Hermes server should respond with "yes##\n", or
"no##\n" appropriately
(OR SHOULD IT -- VS ???).
Get Mediator Information (Implemented 03 April 1998):
"getMedInfo ##\n"
This command prompts the remote Hermes server to return a listing of general (unrestricted) mediator files. The return data stream should appear as follows (N_MedCount == Mediator File count, "MediatorFileInfo_X" represents the mediator data string where X is the string number):
"yes\nN_MedCount\nMediatorFileInfo_1\nMediatorFileInfo_2\n ... MediatorFileInfo_N\n##\n"
The remote Hermes server delimits mediator information within the MediatorFileInfo_X entries via the Control-S (or 0x19) character. Each MediatorFileInfo entry contains the mediator name, description, and file path.
Get Predicate Information (Implemented 07 April 1998):
"getPredInfo ##\n"
This command prompts the remote Hermes server to return a listing of all predicates (with definition and usage syntax) available for the currently open mediator file. The return data stream should appear as follows (N_PredCount == Predicate entry count, "PredicateInfo_X" represents the predicate data string where X is the string number):
"yes\nN_PredCount\nPredicateInfo_1\nPredicateInfo_2\n ... PredicateInfo_N\n##\n"
The remote Hermes server delimits predicate information within the PredicateInfo_X entries via the Control-S (or 0x13) character. Each PredicateInfo entry contains the predicate name, template, and description.
Close Mediator (PENDING):
"closeMed ##\n"
This command prompts the remote Hermes server to close the currently open mediator file. This differs from the original "close" command as the remote Hermes server does NOT close the current socket connection.
Set Domain Function timing log ON (PENDING):
"setDomFuncTimingON ##\n"
Get Domain Function timing (Implemented 30 March 1998):
"getTiming ##\n"
While the domain function timing mode is active, the remote Hermes server queues a string which documents the elapsed time for every domain function call execution. The "getTiming" command, implemented for Fatma Ozcan's research, prompts the remote Hermes server to return all currently queued domain function timing strings to the client application. The return data stream should appear as follows (N represents the domain function timing string).
"yes\nTimingString_1\nTimingString_2\n ... TimingString_N\n##\n"
Set Domain Function timing log OFF (PENDING):
"setDomFuncTimingOFF ##\n"
Log comment on remote server (time stamped).
"logComment "comment text here" ##\n"