Question: Create 3 Akka Actor classes call Producer, Supervisor and Worker. The Producer will generate 1000 random long integer numbers between 10000 and 100000. The Producer

 Create 3 Akka Actor classes call "Producer", "Supervisor" and "Worker". The

Create 3 Akka Actor classes call "Producer", "Supervisor" and "Worker". The "Producer" will generate 1000 random long integer numbers between 10000 and 100000. The "Producer" will send each number as a message to "Supervisor". At start-up, the Supervisor will create 10 "Worker" Actors. When the "Supervisor" receives a number from the "Producer", it will use the API forward() to forward that message to one of the "Worker" actors, in a round-robin fashion. The "Worker" actor will determine if the number in the message is a prime number. If it is a prime number, it will then send a string/text message to the "Producer", saying that "The number XXX is a prime number." And the Producer will print out the message on the standard output. When the 1000 numbers have been produced and checked, the "Producer" actor will terminate the Actor system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!