05.08.2014 Views

here - Stefan-Marr.de

here - Stefan-Marr.de

here - Stefan-Marr.de

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.4. Common Approaches to Concurrent and Parallel Programming<br />

proposed by Dean and Ghemawat [2004] inclu<strong>de</strong>s mechanisms to provi<strong>de</strong><br />

fault tolerance and scalability to utilize large clusters. It also extends the basic<br />

map/reduce i<strong>de</strong>a with notions of combiner functions and they <strong>de</strong>scribe how<br />

to support si<strong>de</strong>-effects for map and reduce operators. The si<strong>de</strong>-effects are<br />

however restricted to being i<strong>de</strong>mpotent and atomic to ensure <strong>de</strong>terministic<br />

results in the case of failure and recomputation. Si<strong>de</strong>-effects on the input data<br />

themselves are however not supported. Instead, the input data are consi<strong>de</strong>red<br />

to be immutable for the overall process.<br />

Compared to fork/join, MapReduce exposes the <strong>de</strong>veloper much less to<br />

the aspect of control flow. Instead, it requires only input data and a set of operators<br />

that are applied in a pre<strong>de</strong>fined or<strong>de</strong>r, without making any promises<br />

about the or<strong>de</strong>r in which the input data are processed.<br />

Data-flow Programming languages attempt to move entirely to data-<strong>de</strong>pen<strong>de</strong>ncy<br />

based program representation. Languages such as Lucid [Ashcroft<br />

and Wadge, 1977] do not regard the sequential notation as imperative to<br />

the or<strong>de</strong>r of program execution. Instead, programs are evaluated in a lazy,<br />

<strong>de</strong>mand-driven manner.<br />

Other languages such as StreamIt [Thies et al., 2002] make data <strong>de</strong>pen<strong>de</strong>ncies<br />

even more explicit by reifying the notion of data streams to which a set<br />

of kernel functions is applied. These programming languages enable the explicit<br />

encoding of data <strong>de</strong>pen<strong>de</strong>ncies, which can then be used by optimizing<br />

compilers to generate highly efficient co<strong>de</strong> that exploits the available data<br />

parallelism in the application.<br />

2.4.6. Summary<br />

This section introduced a partial taxonomy to categorize concurrent and parallel<br />

programming concepts, because Flynn’s and Almasi and Gottlieb [1994]’s<br />

taxonomies do not reflect the common approaches to concurrent and parallel<br />

programming in a way that facilitates their discussion in the context of<br />

this dissertation. T<strong>here</strong>fore, this dissertation proposes to categorize concurrent<br />

and parallel programming concepts into communicating threads, communicating<br />

isolates, and data parallelism. For each of these categories, this section<br />

discussed a number of common approaches.<br />

Clojure agents are highlighted and discussed in more <strong>de</strong>tail, because Chapter<br />

5 and Chapter 6 rely on them as a running example.<br />

35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!