Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

Which amendment to the US constitution abolished slavery?

Answered: 1 week ago

Question

What was the primary goal of the woman suffrage movement?

Answered: 1 week ago

Question

What event led the United States to enter world war II?

Answered: 1 week ago

Question

The slogan 'no representation no tax' Is the result of which event?

Answered: 1 week ago