LinQing your processors… In Parallel!
Having manipulated references for quite a while, in an imperative style of programming languages, we searched a lot for solutions for deploying our applications and make them run on several processors. We ve been trieng to extract some logic out of the non-logical machine friendly reference manipulation syntax, to be able to distribute it on deffirent processors. And here comes problems of synchronization of deffirent threads accesing the same reference, which is often a quite complex task.
But, what about going stateless? no synchrnization to do, and instead of telling the runtime how to do, we tell what to do, by passing fuctions that explain that. Well thats what Functional Programming is about!
Recently I crossed two interesting posts, the first is demonstrating an implementation of a paralleledList that uses several proccesors for tasks like filtering, implemented in F#, a quite promissing mixed paradigm language based on .net framework.
http://cs.hubfs.net/blogs/tomasp/archive/2007/03/25/fsharp_parallel_ops.aspx
For those of you not familiar with ML driven syntax, the second article is demonstrating PLinq in C# language which “still” looks like java.
http://community.bartdesmet.net/blogs/bart/archive/2007/04/04/introducing-plinq.aspx
Results are pretty interesting, demonstrating the effect of using more threads against limited-large number of records.
Have fun!

