Sunday, May 27, 2012

GPars - Groovy Parallel Systems

One of the most interesting lectures on this year's GeeCON University Day was Dierk König's presentation on GPars, which is a Groovy library that allows easy handling of concurrent and parallel processing using multiple approaches: from classic actors to Kanban dataflow. Dataflow concurrency provided by GPars eliminates a few problems typical for actor-based design. One is message queue overflow, which takes place when a message producer creates more requests than a consumer can handle - in a long run such situation leads to memory exhaustion and, consequently, system instability or crash. The second one is random deadlocks - GPars, by design, guarantees that if you happen to introduce a deadlock in your dependencies, the deadlock will occur each time you run the code, so it's easy to get spotted by unit tests.

No comments: