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:
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:
MapDatamessage to the The Master actor. Master actor sends the
MapDatamessage to the Reduce actor.