6.1. The Replicated-Worker Pattern

We are going to start with one of the most common application patterns, the replicated-worker pattern—a simple, yet powerful, application framework that is sometimes referred to as the “master-worker pattern.” Recall from our quick peek at the pattern in Chapter 3 that it's well suited to solving a computational problem that can be decomposed into a number of smaller, independent tasks, all of which turn out to be nearly identical. The replicated-worker pattern is often used for parallel computing, in which multiple machines take on the tasks to solve the problem faster.

Typically the replicated-worker pattern involves one master process along with any number of workers. The master takes a problem, divides it ...

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.