edu.harvard.deas.hyperenc.vsat.server
Class VSatNameServer

java.lang.Object
  extended by edu.harvard.deas.hyperenc.vsat.server.VSatNameServer

public class VSatNameServer
extends Object

This is a central nameserver of the PSN network. It accepts incoming requests consisting of a single 32-bit integer, the PSN selection key. This key is used to choose a PSN from a list of PSNs and associated keys; the PSN whose key is numerically closest to the request key is chosen. The server replies to the incoming request by sending the IP address of the chosen PSN as a sequence of 4 bytes (high octet first).

The server is a standalone application. When launched, it reads in a configuration file.

The configuration file must be a Java Properties XML file. The only required key is db_file, which specifies the file containing the PSN list. Optional keys include:

The PSN list must be a text file. Each line contains an integer key, followed by a comma, followed by a hostname or IP address giving the location of a PSN. Incoming requests result in a PSN being chosen from this list as described above.


Field Summary
static int DEFAULT_PORT
          Default server port to listen to.
 
Method Summary
static void main(String[] args)
          Launches the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default server port to listen to.

See Also:
Constant Field Values
Method Detail

main

public static void main(String[] args)
Launches the server. Reads the configuration file, then reads a PSN list from the location specified by the config file. Then begins listening for incoming connections.

Parameters:
args - Requires a single command line argument: the location of the configuration file.
See Also:
Properties