11.1. The Compute Server
Before building our application we are first going to rework the simple compute server we developed in Chapter 6. At this point you might want to return to that chapter and quickly review the compute server code.
11.1.1. The Command Interface Revisited
Recall that all tasks computed by the compute server must implement the Command interface, which contains one method, execute. To submit a task to a compute server, we create a task entry that implements the command interface and drop it into the server's bag of tasks. A worker in the compute server eventually removes this task and invokes its execute method. The execute method computes a task and then optionally returns an entry, which the worker will write back into the ...
Get JavaSpaces™ Principles, Patterns, and Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.