Doctor Dobbs J0urnal provides an excellent resource for those wishing to research and apply software patterns. In particular Jonathan Erikson’s Pattern Language blog Recently I noticed this post on Patterns for Parallelism about a a research paper on a Functional Parallelism Architectural Pattern for Parallel Programming. The paper is instructive for several reasons. One is that it clearly documents what I’ve described as a macro pattern. It solves a real-world problem which applies to a general computing domain, in this case parallel processing. The paper also references a clear and distinct example, the Single Source Shortest Path searching algorithm also known as Dijkstra’s algorithm. The algorithm is suitable for parallelism because it is “greedy” for resources and it’s also contains sub tasks which can be run concurrently to reduce running time.

The well known routing algorithm OSPF (Open Shortest Path First) is the most common implementation of this algorithm in computer science. The discussed “layer” pattern enabling overlapping operations which are run for effect rather than value. i.e. They’re effect can be calculated in such a way that it is not necessary to wait for the completion of an earlier layer. What I really like about this example is that it achieves the following objectives of any good macro pattern.

It solves a distinct theoretical or abstract problem It describes the solution both graphically and through pseudo-code. It’s not tied to the implementation specifics of any particular programming language. It clearly explains the benefits and drawbacks regarding the application of the pattern. It references supporting algorithmic research and design. It outlines real-world problems that the problem can be applied to.

Share this: Twitter

Facebook

Like this: Like Loading...

Posted in Architecture Patterns