Introduction

Welcome to our Distributed Fish Tank. We think that you will enjoy running our Java-based Fish Tank on your computer. With it, you can see fish swimming around not only your personal tank, but from tank to tank along the Internet! By creating your own fish, people thousands of miles away can read your messages when your fish shows up in their tank. Also, you can us help solve large problems, just by watching fish!

For ease of use, this manual is divided into a few parts:

  1. Installing
  2. Configuring and Running
  3. Viewing Fish
  4. Making Fish
  5. Computing
  6. Quitting

1 Installing

Because of the cutting-edge nature of this application, it is necessary for you to run a version of Java numbered 1.1 or higher. As of this writing, 1.1.1 is the latest version, but 1.1.2 is due out within two weeks. If you only have version 1.0.2 or lower, you must upgrade to a more recent version. Check out http://java.sun.com to download what you need. What this means, however, is that you must use either Windows 95/NT or Solaris as your operating system. If you have a Macintosh, or another operating system, you will need to wait until the newer versions of Java are ported to your system. Macintosh users are in luck, for it seems highly probably that Metrowerks http://www.metrowerks.com and other companies will release their updates at Apple's World Wide Developer's Conference, which begins on May 13.

Now that you are running the correct version of Java, you can begin to download and install our Networked Fish Tank software. Go to http://www.cs.columbia.edu/~amt11/ to find a pointer to the latest version of the Networked Fish Tank for your platform. If you are running Solaris, read the direction below. If you are running Windows 95/NT, skip to the next paragraph.

Solaris

The files are compressed to reduce the time needed to download them. In order to use them, you must first expand them to their original size. To do this, you must type three commands: (The "$" is the command prompt.)

	$ gunzip fishtank.tgz
	$ tar -xf fishtank.tar
	$ rm -f fishtank.tar

This will first uncompress the files into one large file, then unpackage them into individual files, and finally, clean up the mess.

Windows 95/NT

The files are compressed to reduce the time needed to download them. In order to use them, you must first expand them to their original size. To do this, run pkunzip or a similar program.

2 Configuring and Running

There is just a simple, two step process to start our Networked Fish Tank. First, you need to run a program called RMI Registry. Don't worry, you already have it, because it is part of the new versions of Java. (You did pay attention above when we told you about needing Java 1.1 or higher, didn't you? Well, now you know why.) RMI stands for Remote Method Invocation and it lets us send fish from tank to tank, while still allowing you to feel safe knowing that all of Java's security protection is still in place. Anyway, the RMI Registry is a small program that makes it possible for the fish tanks to communicate with each other. To run it, type:

Solaris

	$ rmiregistry &

The & makes the program run in the background, so you can start running the cool fish tank. If you didn't type the &, just hit

	$ control-z

followed by

	$ bg

and this will solve all of your problems.

Windows 95/NT

	start rmiregistry

Now, to run the Networked Fish Tank, you need to tell the program one thing, the address of your tank. If you don't know it, and can't find anyone to tell it to you, follow the instructions below according to your platform.

Solaris

Type:

	$ hostname | nslookup

This will return about 6 lines, that look sort of like this:

	$ hostname | nslookup
	
	Default Server: ns.fish.com
	Address:  128.59.19.15
	
	> Server: ns.fish.com
	Address:  128.59.19.15
	Name:    tuna.fish.com
	Address:  128.59.19.9

The last pair of Name:/Address: lines is what you want. Your computer's name is what follows the last "Name:". In this case, the name would be: "tuna.fish.com".

Windows 95/NT

Check the Network control panel for this information.

Now, to run the Networked Fish Tank, just type:

	$ java fishtank name

where name is the name of your computer, as figured out above. So, in the above case the correct command would be:

	$ java fishtank tuna.fish.com

Power Tip

Sometimes you may want to connect to a different server than the preconfigured default. To do so, just place the name of the server after the name of your computer. So, if your server was"gold.fish.com," you would type:

	$ java fishtank tuna.fish.com gold.fish.com

3 Viewing Fish

Face screen; open eyes; watch fish. You'll notice that there are a few types of fish swimming around in the tank. Every once in a while, a fish or two will either enter or leave the tank. This is pretty cool, but you don't get to do much. Still, it is pretty to look at.

A Fish Tank With 2 Fish Swimming Around
A fish tank with two fish swimming in it. (Figure 2)

As you know, each fish has a its own message attached to it. Now, this doesn't mean that the fish are carrying around the message on a big banner like an airplane above a sporting event. So, you're going to need to do something besides looking up into the sky. If you want to view the message, just use your mouse to click on the fish. That's it.

After you click, the message belonging to that fish will appear at the bottom of the tank. If you have a very slow computer, you might have to "guess" where the fish is going in order to see the message. We're very sorry about this, but Java is not the fastest of languages. The best way to avoid this is to upgrade to a faster machine.

4 Making Fish

Now, looking and clicking is pretty fun, but those aren't the only two features of our program. You can actually creating your own fish and put them into the tank for everyone to see. It's extremely simple. First select the "Add Fish" option from the "Fish" menu item. (That's the right most bar in the picture.)

Adding A Fish
Selecting Add From from the menubar. (Figure 2)

From that choice, a box will pop-up giving you all of your options.

Select and Configure a New Fish
Select and configure a new fish. (Figure 3)

On the left side, you can choose which type of fish you want: Goldfish, Mahi Mahi, Salmon, Shark, or Trout. Each fish has its own unique characteristics: picture, swimming speed and directions, tank to tank movement. It is up to you to choose which kind of fish you want. On the right side is a space for you to enter your message. After you have selected the breed of fish and typed in your message, just hit the "OK" button and the fish will be added to your tank! Soon it will be swimming all over the world to your friends computers and to machines belong to complete strangers.

5 Computing In addition to all of these wonderful pretty fish, our Distributed Fish Tank also does one other thing. It solves problems. Each fish attempts to solve a small portion of a very large problem. While usually this giant problem would take either days or a very fast computer to solve, but letting many fish solve it bit-by-bit, it can be answered very quickly.

Currently, the Distributed Fish Tank will factor large numbers into smaller ones, in an attempt to prove if they are prime. But, this could be switched to another type of problem sometime in the future.

6 Quitting

Sometimes, you might actually need to get some work done. So, to quit the Networked Fish Tank, either select "Quit" from the "File" menu item, or close the window, by clicking the square in the upper left hand corner. After the program quits, you might want to stop the RMI Registry program, because this can sometimes cause the machine to hang. (As we discovered after crashing three Sun IPXes. We're glad to say the new Sun Ultra 1s don't have the same problem, yet.) It shouldn't cause any problems, normally, but we provide this information as a public service.

Solaris

Type:

	$ ps

This will return something like this:

	$ ps

   PID TTY      TIME CMD
 29147 pts/1    0:01 ksh
 29157 pts/1    0:03 java

Find the number next to the line with "java" on it; here it is "29157." Then enter:

	$ kill number

So, here it would be:

	$ kill 29157

That's it. We hope you enjoy using our Networked Fish Tank as much as we enjoyed creating it. Be sure to check out our website at: for the latest version with many new and exciting features.

adam, dan, mark, and natalya