Difference between revisions of "Iced Cakes Pipeline"
Jump to navigation
Jump to search
m (Cosgroved moved page Pipeline to Iced Cakes Pipeline) |
|||
Line 15: | Line 15: | ||
: [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#register-- register] | : [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#register-- register] | ||
: [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#arrive-- arrive] | : [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#arrive-- arrive] | ||
− | : [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#awaitAdvance-int- awaitAdvance] | + | : [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html#awaitAdvance-int- awaitAdvance] use via PhaserUtils.awaitAdvanceForPhase(phaser, phase) |
+ | |||
+ | [http://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/edu/wustl/cse231s/concurrent/PhaserUtils.html PhaserUtils] | ||
+ | : [http://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/edu/wustl/cse231s/concurrent/PhaserUtils.html#awaitAdvanceForPhase-java.util.concurrent.Phaser-int- awaitAdvanceForPhase] | ||
=Questions To Ask Yourself= | =Questions To Ask Yourself= |
Revision as of 15:07, 11 April 2018
Contents
Motivation
Pipelines can increase throughput when processing a stream of data. We will gain additional experience with Phasers by building a software pipeline.
Backgroud
Code To Use
Cakes
Looping
Phasers
class Phaser (Guide to the Java Phaser)
- register
- arrive
- awaitAdvance use via PhaserUtils.awaitAdvanceForPhase(phaser, phase)
Questions To Ask Yourself
- What are my tasks?
- What work does each task need to do?
- What, if anything, does each task depend upon? That is: what does each task have to wait for before it may proceed?
Code To Implement
class: | CakePipeline.java | |
methods: | mixBakeAndIceCakes | |
package: | pipeline.cake.studio | |
source folder: | student/src/main/java |
method: public static IcedCake[] mixBakeAndIceCakes(Mixer mixer, Baker baker, Icer icer, int cakeCount)
(parallel implementation required)
Testing Your Solution
Visualization
class: | CakePipelineVizApp.java | VIZ |
package: | pipeline.cake.viz | |
source folder: | student/src//java |
Correctness
class: | CakePipelineTestSuite.java | |
package: | pipeline.cake.studio | |
source folder: | testing/src/test/java |
When you are passing the tests and your visualization looks good, demo it to an instructor.