I have 1000 rows of data in mysql that i need to update based on some logic which for some reason cannot be done in mysql using batch update and must be done in java.I need to split the jobs into 20 manageable units of 50 tasks each,so for each group i shall have 50 actors doing the jobs.
I have made this diagram to show what i mean

What actor model in java can allow me group actors this way?.
As pointed out by @Bob, you can easily do this with Akka. Your actor supervision hierarchy would be like this: 1
SuperMasterActor, starts 20MasterActors, which each will be responsible for one chunk of work. They askSMfor the work, and create 50Slaveactors, delegating the work to them. You can setup a Supervision Strategy that will determine if a Slave dies, you need to restart that one piece of work, or if you should drop the entire "group" and tell the SuperMaster that this group of work failed etc. If all aSlavefinishes his work, it tells so to theMaster. If all work is done (theMgot 50 "work done" messages), it can tell it'sSuperMasterthat all the work has been completed, and we're done processing the job.You can model failure and recovery (as in – "keep trying until it succeeds" or "abort all execution if a group fails" etc) very nicely using Akka's supervision hierarchies. As for spreading the work – yes that is also easy and partially already described in how I laid out the supervision interactions.
Hope this helps, happy hakking!