On Mon, Oct 15, 2012 at 7:24 PM, Sachin
<shirv...@gmail.com> wrote:
Hi all,
I am new to Scala and its Akka library and I have some doubts. If someone can clarify, it will be highly appreciated.
1. Is it possible to have some actors which have some priority (high, medium and low)?
For example of this scenario, if two actors are eligible to run (messages are queued in their respective mailboxes) then they should run in priority order.
Priority on the Actors or the priority of the messages?
If it is possible, then how can it be achieved? Will I need to make changes in Akka/scala source code or extend the existing scheduler/dispatcher in application itself as suggested in akka documentation?
For priorization of Actors:
You'll have to create your own ExecutorServiceConfigurator which creates an ExecutorService that uses a PriorityBlockingQueue as its task queue. I wouldn't recommend doing it however, since now you've introduced starvation into your system... Also, performance and scalability will suffer due to the need of prioritizing all tasks.
2. Also please clarify what part of akka or scala executes actors and what part processes mailbox? I am going through the documentation but its a bit of learning curve there and my understanding is still hazy.
MessageDispatchers are the "engines" that make sure things get processed, and there are multiple flavors. The details is not a part of the user documentation since it is indeed implementation details, for full understanding the sourcecode should be inspected.
Cheers,
√
Thanks
Sachin
--
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.