Friday, December 09, 2011

An actor framework for Java concurrency

Recently my curiosity towards learning something new , bumped me into a framework called Kilim. Ya that's right , not sure how many of you have heard about it.

Goal of this framework - to introduce Actor based concurrency to java ala. making the model similar to Erlang and Scala

Why do we need this switch from thread based model to Actor based model when it comes to concurrency - thread based model depends on using shared memory when it comes to communicating between threads. Actor based model takes a slightly different approach of using Mailboxes to communicate.

So whats the advantage ? - well when coded against Actor based model we don't need to worry about thread locks or use any kind of synchronization blocks. Actors are guaranteed to run on multi-core processors. Since there is no limitation or a dependency on shared memory actors can be scheduled on any core or a processor. Improves the overall performance and the scalability of system.

How to use Kilim? sample code - here








Also Read
Java development 2.0: Ultra-lightweight Java web services with Gretty
Instrumentation - Querying the memory usage of a Java object
10 things you didn't know about java performance monitoring
5 things you didn't know about java.util.concurrent
The Clean Coder

1 comment:

javin paul said...

I haven't heard about this framework but a quick look looks good to me, waiting for some more articles this.

Thanks
Javin
Top 10 multi-threading interview questions in Java