Currently I have a process that is set up as follows: 

   1.  Pulse every minute and see if a domain object should be changed, 
      1. If not then do nothing. 
      2. If there is an object that needs to be processed, find all child 
      objects remaining to process. 
         1. If this is empty, the domain object goes to the next state. 
         2. If there are child objects to process determine if any of them 
         are already in a Distributed Memcached map we will call "TaskMap". For 
each 
         obect not in TaskMap figure out what needs to be done, generate a task 
         message and put them in TaskMap keyed by the id of the domain object 
to 
         process.This could result in 1million entries getting added to 
TaskMap. Its 
         a heavyweight process but happens infrequently. It is also not 
avoidable. 
      2. Pulse every minute on another task. 
      1. If there are any objects in the task map that are distributed to 
      this node then process them one at a time until the map is empty of all 
      local entries. 
   
I would like to convert this to Akka Actor based processing for a number of 
reasons. The problem that I cant figure out how to handle is to know that 
the tasks are already in the inbox. So if in step 1.2.2 I decide there are 
200,000 objects that need to be processed, i dont want to resubmit them to 
be processed if they are already queued up in the actor inbox. Although the 
task protects itself against double execution, it would just hammer the 
system with unnecessary load. Furthermore, its possible that a task might 
get lost due to node failure or some other unforseen reason so if 5k of 
those 200k tasks are missing, I want to add them to the map. Right now all 
I have to do is check the key set of the map and remove the ids already in 
the map. With an inbox I have no idea how this could be accomplished. The 
closest thought I had was to still put them in the map and have the actor 
pull them out of the map. However, if I could introspect the inbox then I 
wouldnt have to duplicate the data. 

Any ideas? 

Thanks. 

-- Robert

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to