2. Map Reduce
• Given the stock data, compute the 200
day moving average for all the stocks.
• Map
– Filter stocks not in your portfolio.
• Reduce
– Compute the 200 day average for stocks in
your portfolio.
3. Continuous Map Reduce
• Given the stock data, compute the 200
day moving average for all the stocks
every 1 hour.
• Map
– Filter stocks not in your portfolio.
• Reduce
– Compute the 200 day average for stocks in
your portfolio.
4. At t=0
Window Sub-piece/
Stream
Sub-window
time
7. Enter Phobos
• Eliminate these redundant map
computations.
• On CUDA.
• Design
– Instead of computing map on entire window,
compute map on the new sub-window.
– Compute the reduce on the whole window.
• How? Keep old data around.
• How long? In a circular buffer of size num of sub
windows per window.
8. Implementation
• Updated Mars
– Added notion of windowing.
– Eliminated redundant computations by using
circular buffer.
• Trade off latency for more working
memory.
– Keep the old data on host instead of the
device.