* master worker pattern * Update App.java * Adding new line to README.md * Adding new line to pom.xml * Adding new line to ArrayEquality.java * Adding new line to Input.java * Adding new line to Result.java * Adding new line to ArrayTransposeMasterWorker.java * Adding new line to ArrayTransposeMaster.java * Adding new line to ArrayTransposeWorker.java * Adding new line to Worker.java * Adding new line to ArrayInputTest.java * Adding new line ArrayTransposeMasterWorkerTest.java * Adding new line to ArrayResult.java * Review changes * Update README.md
This commit is contained in:
committed by
Ilkka Seppälä
parent
55c7579983
commit
7a25c57474
28
master-worker-pattern/README.md
Normal file
28
master-worker-pattern/README.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
layout: pattern
|
||||
title: Master-Worker
|
||||
folder: master-worker-pattern
|
||||
permalink: /patterns/master-worker-pattern/
|
||||
categories: Centralised Parallel Processing
|
||||
tags:
|
||||
- Java
|
||||
- Difficulty-Intermediate
|
||||
---
|
||||
|
||||
## Also known as
|
||||
|
||||
> Master-slave or Map-reduce
|
||||
|
||||
## Intent
|
||||
|
||||
> Used for centralised parallel processing.
|
||||
|
||||
## Applicability
|
||||
This pattern can be used when data can be divided into multiple parts, all of which need to go through the same computation to give a result, which need to be aggregated to get the final result.
|
||||
|
||||
## Explanation
|
||||
In this pattern, parallel processing is performed using a system consisting of a master and some number of workers, where a master divides the work among the workers, gets the result back from them and assimilates all the results to give final result. The only communication is between the master and the worker - none of the workers communicate among one another and the user only communicates with the master to get the required job done. The master has to maintain a record of how the divided data has been distributed, how many workers have finished their work and returned a result, and the results themselves to be able to aggregate the data correctly.
|
||||
|
||||
## Credits
|
||||
* [https://docs.gigaspaces.com/sbp/master-worker-pattern.html]
|
||||
* [http://www.cs.sjsu.edu/~pearce/oom/patterns/behavioral/masterslave.htm]
|
Reference in New Issue
Block a user