Russel Winder's Website


Groovy & Grails eXchange 2011 session

Groovy and Grails eXchange 2011 is as good, if not better, than previous years. The evolution of Groovy towards 2.0.0, and the imminent release of Grails 2.0.0 has resulted in an increased energy in the Groovy and Grails community. I suspect this is founded on the more positive energy in the Java community since Java 7 came out and the timetable for future Java releases published.

GPars is an integral part of the Groovy and Grails, and increasingly Java, communities, as it allows folk to harness the increasing parallelism of computers using Groovy and Java. I ran a session "Just keep passing the messages" yesterday 2011-12-08T16:30. The slides were a minor variant on the ones I used for JAX London, but the use of them was very different and in fact I only used about 25% of them.

Most of the audience were not familiar with actors, dataflows, Communicating Sequential Processes (CSP), and data parallelism. Everyone did appreciate though that the question "Is Java an object oriented language?" was actually a deep and non-trivial one. So I skipped a lot of the ranting and sermonizing and skipped straight to giving a summary view of the various models and showed some GPars code - though I did retain my ranting against shared-memory multi- threading as an application level technique. I even managed to run some it to show how GPars really does lead to parallelism, and how Groovy is slow, but this doesn't matter as long as the computationally intensive tight loop is in Java. Groovy/GPars for coordination of concurrency, Java/GPars for grunt computation. Yes GPars does have a Java API!

The example I used my standard example of using quadrature to approximate the value of π. Even though I have used it for a while people still report that it remains a good example since it is small relatively easy to comprehend and allows examples to be comprehensible. So it works! All the code is available in a Bazaar branch at http://www.russel.org.uk/Bazaar/Pi_Quadrature. Feel free to branch, play, and report data back.

Skills Matter videoed the session, you can find it here.


Copyright © 2017 Russel Winder -