Solve the following problem using Scala with Classic Akka Actors. For each problem, also implement client actors for sending the messages required for beginning the required computation. Use these client actors for testing your application actors. Read the submission instructions carefully. Sorting. It is possible to sort a number of values using a pipeline of filter actors, each responsible for one value: the first actor picks the smallest value, the second the second smallest and so on. Particularly, the first actor receives all the values, one by one. If there are more than one values received by an actor, it creates another actor; it keeps the smallest value received so far for itself, and sends all other values forward to the actor it created. Each filter actor does the same thing. Assume that each filter actor has local storage for only two of the values to be sorted: the next incoming value and the minimum value seen thus far. A sentinel is used to indicate the end of the values to be sorted. The sentinel is then sent down the pipeline to inform all actors of the end of the input. On receiving the sentinel, each filter actor replies to the sender of the sentinel with its smallest value. All actors simply forward back the values they receive from actors down the pipeline from them, so that the first actor receives all the values in a sorted order, and sends them forward to the original requester, one value at a time.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Solve the following problem using Scala with Classic Akka Actors. For each problem, also implement client actors for sending the messages required for beginning the required computation. Use these client actors for testing your application actors. Read the submission instructions carefully. Sorting. It is possible to sort a number of values using a pipeline of filter actors, each responsible for one value: the first actor picks the smallest value, the second the second smallest and so on. Particularly, the first actor receives all the values, one by one. If there are more than one values received by an actor, it creates another actor; it keeps the smallest value received so far for itself, and sends all other values forward to the actor it created. Each filter actor does the same thing. Assume that each filter actor has local storage for only two of the values to be sorted: the next incoming value and the minimum value seen thus far. A sentinel is used to indicate the end of the values to be sorted. The sentinel is then sent down the pipeline to inform all actors of the end of the input. On receiving the sentinel, each filter actor replies to the sender of the sentinel with its smallest value. All actors simply forward back the values they receive from actors down the pipeline from them, so that the first actor receives all the values in a sorted order, and sends them forward to the original requester, one value at a time.

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education