Message processing differences between fork-join-executor and thread-pool-executor?

1,220 views
Skip to first unread message

Jay Camp

unread,
Apr 10, 2013, 1:45:10 PM4/10/13
to akka...@googlegroups.com
I'm trying to wrap my head around how a dispatcher based on fork-join is different than thread-pool. The way I understand it Fork/Join gives you the ability to recursively split up tasks into smaller and smaller pieces that then get recombined. How does this apply to Akka, where the units of work are defined by how long an onReceive method runs for? 

Maybe another way to ask this is how are messages processed differently under fork-join versus a thread-pool?

Thanks!

Björn Antonsson

unread,
Apr 11, 2013, 8:06:54 AM4/11/13
to Akka User List
Hi Jay,

On Wednesday, 10 April 2013 at 19:45, Jay Camp wrote:

I'm trying to wrap my head around how a dispatcher based on fork-join is different than thread-pool. The way I understand it Fork/Join gives you the ability to recursively split up tasks into smaller and smaller pieces that then get recombined. How does this apply to Akka, where the units of work are defined by how long an onReceive method runs for? 

In Akka, the unit of work is the processing of a message. There is no way to split the processing of a single message into smaller pieces automatically.
 
Maybe another way to ask this is how are messages processed differently under fork-join versus a thread-pool?

The messages themselves are not processed differently. As I said they're not split in any way.

Both the ForkJoinPool and ThreadPoolExecutor are executor services and in the way that Akka uses the ForkJoinPool, the biggest difference from the ThreadPoolExecutor is that the ForkJoinPool has multiple queues with work stealing, which scales much better than the single job queue of the ThreadPoolExecutor.

B/

Thanks!

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
  

-- 
Björn Antonsson
Typesafe – The software stack for applications that scale
twitter: @bantonsson

Reply all
Reply to author
Forward
0 new messages