The provided code includes fully operational demos for both the client and
the engine server as executable JAR files in the provided.demo
package. See the
Javadocs for that package for complete directions
on how to run the demos and their capabilities.
It is an Honor Code violation to attempt to decompile the provided JAR files.
The demos are fully compliant with the required inter-computer API as defined
by the provided.compute
package. Likewise, the provided
sample tasks are API compliant. The demo
client, the demo engine and/or the provided sample tasks can thus all be used to
test student solutions. This will enable each piece of
the project to be tested separately. This is NOT,
however, a substitute for the required testing with other students!
Note: The demo client is only capable of loading ITask
implementations that have a public static FACTORY
field of type
ITaskFactory
. The sample ITasks
are
pre-loaded into the demo client for convenience only (loaded by its controller
-- not hardwired into the view or model!).
Use the demos as part of your development process:
One great advantage of having these fully operational demos at your disposal is that you can now completely separate the development of your client from your engine server from your custom tasks. One of the goals of the project is to demonstrate how all these parts are completely decoupled, so that is exactly how you should structure your development process!
Note that the JAR files do NOT contain any code for any tasks. All tasks are dynamically loaded, where
the demos assume that the desired ITask implementation classes all have a public static field
called FACTORY
that is am ITaskFactory instance that will instantiate that ITask implementation.
Some tasks in the provided code are pre-loaded for your convenience. The demos are capable of loading and executing student-written tasks as well if the task class contains a public static FACTORY field as described above.
The demos should be capable of inter-operating with any student-written client or engine solutions and this can used for testing student solutions.
Student ITask implementations can be written separately from the student client or engine solutions and tested with the demo client and engine (Note that the demo client requires that an ITask be instantiatable by an ITaskFactory and that the ITaskFactory's make() method needs no more than a single String parameter.)
Note: The module-info.java
file should look something like this:
module projectName { requires java.desktop; requires java.rmi; exports provided.compute; }
Start a client and an engine on the same or different computers. Note that either client or engine could be a student solution.
Connecting the client to an engine:
Testing connectivity:
Adding new tasks:
Running a task:
Combine tasks:
Both the client and the engine have "Quit" buttons that will gracefully shut down their systems.