From: Stefan Weber <stefan.we...@gmail.com>
Date: Thu, 12 Nov 2009 09:14:46 +0100
Local: Thurs, Nov 12 2009 3:14 am
Subject: Re: Threading Policies
> I didn't implement "concurrent" actors because of two main reasons:
I understand this reasoning and think it makes sense. To be honest, the
> 1) They break the principles of the actors model itself. > 2) They could be misused, leading people to use actors in wrong ways. > That said, I'm not saying to be completely *against* such a use case:
suggestion I made to allow concurrent handlers if the @ThreadSafe annotation is not very clean. > Another way to offload actors for stateless tasks could be to use an
I think this is a good idea and had it in mind as well. I was a bit
> external thread pool and schedule those tasks on it: by doing so, > actors would be used only to represent the messaging abstraction, > while the actual computation would be executed on another thread > (launched by the actor who received the related message). > What do you think? reluctant to do this because it would push some of the concurrency burden that I could get rid of with Actorom back to the application. But given that you also suggest to do it this way I will try this. Actually, I had to ideas how to implement it:
1. The handler class has a concurrent queue as a member and all the handler
2. In the handler method, create a new Runnable and pass it to the
I prefer solution 2 because it is simpler. The only small doubt I have is
Cheers,
Stefan
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||