Anyone who’s passionate about music has a discussion from time to time where they try to convince someone else that their own favourite album is the greatest album ever. Not just in opinion, but fact. They’ll argue the production is superior to anything else, or they’ll emphasise the songwriting or the performance. It ends up a bit like playing a game of Top Trumps where the players aren’t comparing the same item on the card: it’s an argument that can never be won, because if you say nothing beats the production on Tubular Bells, someone else will veto it on the basis that it doesn’t say anything, and surely the lyrics on Dark Side of the Moon earn it the accolade of greatest album ever.
When I was reading Eric Merritt’s overview of concurrency, I found myself wondering how you can judge the best parallel programming paradigm. In his story, he talks about the advantages and disadvantages of shared memory communication. Software Transaction Memory (STM) is optimistic, so there is no waiting for resources. It comes at the cost of performance because the transaction subsystem creates an overhead, and in some cases there might be an impact on memory too. Futures and promises can help to mitigate the problems of shared memory and are conceptually simple, but as with STM, they involve shared memory, Merritt notes. He says message passing is the best solution “where best is defined as the most conceptually simple and scalable”.
That raises some interesting questions. At this stage of the multicore industry’s development (and perhaps, forever), the choice of technology is going to require a compromise. So where do you place the emphasis? Here are some ideas of how you could judge or differentiate different programming languages, tools and paradigms:
- Robustness: in some ways this is a given, because I can’t imagine somebody using a solution that isn’t robust. But it’s on the list because it will be a key factor in eliminating candidate tools before others are differentiated using the other ideas in this list.
- Productivity: how quickly can you code?
- Performance: how quickly will the software run?
- Memory: what impact will it have on your available memory?
- Scalability: how easily can software scale in line with the number of cores?
- User base: how big is the community of support for the tool or technology? Might be a good indicator of how likely it is to survive.
- Similarity: how similar is the tool or technology to another one that you already know how to use?
- Trust: how confident are you in the tool or technology and its ability to solve the problem? This covers the unquantifiable ‘gut instinct’ that underpins many decisions which are only truly rationalised later.
- Cost: what is the total cost of the software and consequential costs such as training or hardware upgrades?
- Simplicity: how easy is it to understand the technology, and to communicate it to others?
- Elegance: how beautiful is the solution? This one is hard to explain, but it’s the idea that the solution should be clean, logical and inspired. You know elegant code or technology when you see them.
There might be other factors too (please leave a comment if any occur to you). Sometimes tools or technologies will tick different boxes, so how do you compare them? Which of these factors will be most influential in the long run?
In the short term, I think elegance and trust will rank highly. Parallel programming will be restricted to advanced programmers over that period, and they tend to want to work with tools that offer conceptually great solutions and that they have confidence are worth their time investment. They might be pressured to emphasise similarity and consider productivity a high priority, but in an ideal world, I think they will recommend tools that they believe offer the best technical solution.
In the longer term, as parallel programming becomes much more commercial and much less experimental, I think we’ll see cost, productivity, similarity and simplicity become more important. A business manager will have different priorities to a programmer, and could be reflected in the tools they require the business to use.
What do you think will become the most influential factors? As technologies evolve, only the strongest will survive. But it all depends on how you define strength.
Oh, by the way. The greatest album ever is Wish You Were Here. Fact