Vestpocket Software








Master and Worker Servers

The Master and Worker Servers are responsible for running the parallel data flow projects on the network of computers defined by the user.

The master server:
  • Places incoming projects to be run into its project queue.
  • Removes a project from the project queue, and determines the run strategy for a project.
  • Runs a very brief simulation of the project, and during the simulation splits the project into parallel phases.
  • Runs a distribution strategy algorithm to determine an optimal distribution of jobs to available workers within a given phase.
  • Collects the input data from the data base for each job and overrides the inputs with outputs from upstream jobs if necessary.
  • Distributes the jobs to be run in each phase to the worker servers along with each jobs inputs.
  • Monitors the progress of the project, and the jobs in the project, balancing work loads among workers.
  • When the jobs in a phase are finished, stores each jobs outputs into the data base.
  • Keeps the user informed as to the progress of the jobs and phases project. Also reports errors and suspends running a project if necessary.
  • When the project is finished, informs the user and repeats the process with the next project in the queue.
  • Also performs miscellaneous services such as suspending, canceling, resuming suspended projects, collecting job statistics etc.
The worker servers:
  • Place incoming jobs to be run and their inputs into job queues.
  • Removes a job and its inputs from the job queues, and prepares the job for execution.
  • Runs and monitors the execution of a job.
  • Informs the Master Server of the jobs completion by sending the Master Server the jobs end of execution status and error message if any.
  • If no error has occurred, sends the jobs outputs to the Master Server.
  • Repeats the process with the next job in the job queue.
  • Also performs miscellaneous services such as canceling jobs, removing scheduled jobs and inputs from job queues, etc.

A Parallel Network of Six Computers


The drawing above depicts a small parallel network of computers.  The Console at the left is on the Internet.  The Master Server is at another location along with four other worker computers.   Each worker computer is running a Worker Server task and a Worker task.  The Console sends a message to the Master Server to run a project or a list of projects.  The  Master Server takes a project from its input queue and assigns parallel phases of the project to run in on the worker computers by sending each Worker Server a list of jobs to run.  The Worker Servers then assign jobs from their input queue to the Worker on their machine and monitors the Workers progress.  The Workers run the jobs in its input queues and notify their Worker Server of their progress.  The Worker Servers each notify the Master Server of their progress.  The Master Server notifies the Console of its progress.  When all the parallel phases of the job are complete the Console can view the results and the Master server repeats the process above with the next project in its input queue.

It is theoretically possible to have more than one worker on each worker computer, but nothing would be gained if you did.  Each worker computer is totally busy when it has jobs in its input queue and totally not busy when it does not have any jobs.  If you had more than one worker on a computer, there would be clashing between the workers over resources and less work would be accomplished.  If all of the workers are totally busy all of the time the system is operating at peak efficiency. 

Master Server Console



The Server console, shown above, displays and logs status messages on the network that are exchanged among the various computers on the network.  The top panel displays messages exchanged between the Master Server and the console or consoles in the case of a master server, or its parent server in the case that it is not a master server.  The panel at the bottom displays messages exchanged between a Master Server and its subordinate Servers, or between a Server and its Worker Servers.   The  Master  Server can also run projects independently without being connected to a console.  At the present  the servers are written in C++.  There is a server being  written  in C# but it is not yet functional.  When the C# servers are finished they will be ported to Java.

Master Server Batch Run Status



The  Server status dialog displays the worker servers and their job queues in the upper panel and the pending project queue in the lower panel.

Worker Server Console



The Worker Server console, shown above, displays and logs status messages on the network that are exchanged between its self and its parent server.  The lower panel  displays job dispatching messages and process monitoring messages.