Because we have 30 stations, and normally 8 stations are used per request, we want to be able to treat more than one request at the same time. Also, we have to determine the load of the machines and run the requests on the least loaded machines. For that, we wrote a deamon (demon_blast). demon_blast waites for requests. When a request arrives, and if enough not very loaded machines are available, the request together with the machines to use are passed to the master. If not enough machines are available, then if the request is a batch job, it will wait in a queue, until it can be serviced, otherwise it will be rejected. The load determination of the machines is very well explained in [Jav Def 94]. There is a deamon (monitor_svc) running on every machine. demon_blast asks the load of each machine through remote procedure calls (RPC) to monitor_svc. demon_blast looks from time to time, if pvmd (the pvm deamon) has stopped running on some hosts, and if so, delegates its child demon_child to restart pvmd where appropriate. To do this, a list of all the hosts must be given to demon_blast in a file. demon_child runs all the time and is assigned to do this job, because it is very time consuming.
The client program replaces the original blast programs. It is named as the original blast program with a .pvm suffix (ex.: blastp.pvm and takes the same command line arguments. They all are links to the executable blast.pvm. The command line argument -batch was added, which indicates that this is a batch job. This argument, if specified, must be the third, i.e. right after the query sequence.
The client has to search the tid (task id in PVM) of demon_blast. The problem is, that we can get only a list of tasks wich were started through PVM, but demon_blast is not necessarily started from PVM. So, the client searches in the list for the child of demon_blast, demon_child, and through the child's parent tid, it gets the tid of demon_blast.
Once the request is sent to demon_blast the client waits till it is notified by the master that results are ready in a file. The client reads this file and displays the results on stdout. The client also sets a timer. If the timer ends before results are returned, an error message is displayed. For the moment the timer is set to 5 minutes, which from experience, is enough to search even large databases.
Figure 3 summarizes the whole program structure of the parallel blast programs.
Figure 3: Program structure of the parallel blast programs.