Home → Magazine Archive → May 2015 (Vol. 58, No. 5) → Parallel Processing with Promises → Abstract

Parallel Processing with Promises

By Spencer Rathbun

Communications of the ACM, Vol. 58 No. 5, Pages 42-47

[article image]

back to top 

In today's world, there are many reasons to write concurrent software. The desire to improve performance and increase throughput has led to many different asynchronous techniques. The techniques involved, however, are generally complex and the source of many subtle bugs, especially if they require shared mutable state. If shared state is not required, then these problems can be solved with a better abstraction called promises (https://en.wikipedia.org/wiki/Promise_(programming)). These allow programmers to hook asynchronous function calls together, waiting for each to return success or failure before running the next appropriate function in the chain.

Using the design pattern described in this article, programmers can build collaborative systems of threads or processes that are simple and easy to reason about because of the abstraction provided by promises. As promises are available in many languages, this design pattern can be implemented in whichever language is most appropriate or even multiple languages for each process.


No entries found