Getting Started


This section explains how to set up an experimental Web automata server, i.e., a Web server which supports the creation and execution of Web automata at the server's site. A new kind of Web server is called for because in order to query and process data at the server's site (i.e., the site where the data is stored), the server must provide some means of computation to its clients. Common Web servers are ill-equipped for this purpose, as they support (almost) only the retrieval of data. A Web automata server can be viewed as a Web server which, in addition, enables its clients to locally query and process data by means of Web automata. More precisely, it permits its clients to create, run, and remove Web automata. This includes the case where a client itself is a Web automata, for Web automata can propagate themselves and communicate with each other.

Setting up a Web automata server. The following steps describe how to set up a Web automata server on a machine called host. Note that every machine which is to participate in a Web querying system based on Web automata must run its own Web automata server.
Install WebAuto on host as described on the previous page. The location of WebAuto is not important, as long as the Java interpreter is granted read permission for all files in WebAuto (including all subdirectories), and write permission for subdirectory Messages.
It is assumed that all files on host which are to be queried by means of Web automata are stored in a subtree of the file system of host. Let base denote a path to this subtree. For instance, on a Linux or Unix based Web server one may choose base to be /pub. For testing purposes, WebAuto contains a directory TestBase which will be used as base in what follows.

Note: The current implementation supports the querying of HTML and ASCII documents only. Hence, the subtree rooted at base should contain only such documents.

Choose a port number n greater than 1024 so that host accepts connections to port n. In the following, n is assumed to be 49999.

Note: If host is protected by a firewall, you may have to lower the firewall a bit.

Open a new console or terminal, change to directory WebAuto, and start the Web automaton server with:

java Layer1.Server -b TestBase -p 49999

Note: "java Layer1.Server -h" outputs a short help message.

Starting a Web automaton. Once the Web automata server is running on host, we can apply our first query on the documents in TestBase.
Open a new console or terminal, change to directory WebAuto, and start the sample automaton defined in auto.def with

java Layer1.Query auto.def -p 49999

Note: "java Layer1.Query -h" again outputs a short help message.

After the sample automaton is successfully created (which is indicated by a corresponding output), trigger the automaton by pressing <RETURN>. This should produce an output of the form:

query: received 1. message with components:
1. <host name>(<host IP>)/help-doc.html

where <host name> and <host IP> stand for the name and IP address of host, respectively. Informally speaking, the sample automaton defines the following Web query:

output all documents which contain the word "PODS'02" and are reachable from the document TestBase/index.html by following links.
Now reconsider the second line of the automaton's output. The line indicates that TestBase/help-doc.html is part of the answer to the above query. Indeed, TestBase/help-doc.html contains the word "PODS'02" and is linked to from TestBase/index.html.
Triggering the automaton two more times should produce an output of the form 

query: received 2. message with components:
1. <host name>(<host IP>)/java/net/URL.html

query: received the empty message; terminating

from which we conclude that TestBase/help-doc.html and TestBase/java/net/URL.html are all documents reachable from TestBase/index.html which contain the word "PODS'02".

One can easily extend this exercise to include other, remote machines. For instance, install and run the Web automata server on a second machine and add a link from TestBase/index.html on host to TestBase/index.html on the new machine. (Page TestBase/index.html already contains such a link in the first paragraph; it suffices to activate the link by removing  "!" in the corresponding anchor and replacing "..." with the name of the new machine.) Then start and trigger the sample automaton (on host) again.