We have the basic computational units identified in the beginning for each of the tasks that will be performed on the sentence in order to count the words. We model our actors around the same computational task model and create the following three actors for each task:
- Map actor
- Reduce actor
- Aggregate actor
To create and manage the lifecycle of these actors, we create another actor called Master actor. The communication between actors will happen via immutable messages as follows:
- The Master actor sends the sentence as a string to the Map actor.
- The Map actor maps the words in the sentence and returns the
MapDatamessage to the The Master actor. Master actor sends the
MapDatamessage to the Reduce actor.
- The Reduce actor acts on ...