This file (readme.txt) contains general information on the DOGMA Screen Saver
and is an overview of its architecture.

1) The DOGMA Screen Saver
by David.McLaughlin@byu.edu http://ccc.cs.byu.edu


The DOGMA Screen Saver (which may be renamed) is one component in an
distriputed or/and parallel application framework which facilitates
otherwise idle time utilization.

The DOGMA Screen Saver was originally designed to run under Windows NT
and to work with the DOGMA (see http://ccc.cs.byu.edu:/DOGMA) system.
But it is very loosly coupled and can operate as a general idle cycle utilizer.


2) The DOGMA Screen Saver Architecture
The realy only documentation is the code itself :)
The current version ( private static final String version = "30 July 1999" ; )
was attempted to be done as much in Java as possible.
Two major obstacles needed to be overcome which impacted the architecture:
	i) an actual NT screen saver cannot perform cleanup because NT may axe it
	ruthlessly especially if the user terminates it via Cnt-Alt-Del.
	ii) Java has no notion of knowing about process other than ones it created.

But I sill wanted to do it mostly in Java.
So here it is:
	We have an actual screen saver part written in C++ (dogma.cpp) which
	is a screen saver in the windows sense
	of the term which does not a lot more than paint pictures
	on the screen and poke its identifier in the registry.
	We have a Java side (Terminator.java) which tries to do everything else
	with a DLL written in C++ (Terminator.cpp) for things Java cannot handle.

	The screen saver starts the terminator
	(if one is not running we use windows nice
	named semaphores to determine this).
	The terminator first starts an arbitrary application.
	This is the link to DOGMA.
	As the install script sets up the registry, the application the screen
	saver will start is a DOGMA client via the appletviewer that
	comes with the Java development kit (the Java jdk available from java.sun.com).
	The terminator then waits for the screen saver to die, when it dies it
	finds a window with the title 'Applet Viewer'
	which is a descendant of the terminator.
	It tries to send it, if found, a message to die nicely.
	In any case after this if any descendants are still alive
	they are kill off ruthlessly.
	The terminator then exits.
	Thus there are no running processes when the screen saver goes away.

	The is an exception to what was just explained.
	If you are running durning a certain time,
	say between midnight and 8 in morning,
	you may not want to ever kill off any processes even if the
	screen saver goes away--like in the case a janitor
	bumping the table that jiggles the mouse.
	So, there is a feature to block of a section of the day for guaranteeded use
	(it could be the whole of the day)
	This is set in the registry and can thus be locally controlled.


To actually build:
	I used Microsoft Visual Studio 6.0 with Service Pack 3 for the C++ compiler.
	IBM's jikes version 0.47 (10 Mar 99) for the Java compiler
	(javac should work fine; I find jikes is much faster)
	IBM's Java Installer Tookkit (JIT) to build an install program

To run I used:
	Microsoft's Windows NT 4.0 with Service Pack 4
	Sun Microsystems's Java Development Kit jdk1.2.2 for the Java Virtual Machine
	(please use jdk 1.2.2 or better because
	of what appear to be security bugs in jdk1.2)


The file `SreenSaver.html' is a rough paper on this screensaver.
