MapReduce with ActorFx
A new preview of ActorFx has been released with support for MapReduce-type algorithms. ActorFx is a “non-prescriptive, language-independent model of dynamic distributed objects. This will in turn provide a framework and infrastructure atop which highly available data structures and other logical entities can be implemented.”
The MapReduce functionality is demonstrated via the Word Count sample. This demo relies on three types of actors: mappers, reducers, and an aggregator. The mappers process files, converting raw text files into dictionaries of data. These dictionaries are fed into reducers that “read in the serialized dictionary and merge its information into a running dictionary that is tracking overall word counts for that reducer. When the reducer has received “done” messages from each feeding mapper, it will serialize its running dictionary to a file, and pass the name of that file to the aggregator” which produces the final report.
A key feature of ActorFx 0.5 is support for Inter-Actor Programmability. This allows actors to create and delete other actors. In the previous version an external client had to assist in managing the actor life cycle.
Like other recent libraries from Microsoft, diagnostics are now being done via the Event Tracing for Windows (ETW) infrastructure.
There are now four types of actor applications available “out-of-the-box”, with the StatelessActorApp being the most recent.
- EmptyActorApp: This actor application allows you to launch “empty” actor services, which are actor services with no built-in intelligence. Intelligence can be provided to these actors by transferring ActorMethod-containing assemblies to them.
- ListActorApp: This actor application allows you to launch list actor services, which are actor services that have built-in intelligence for supporting list operations.
- DictionaryActorApp: This actor application allows you to launch dictionary actor services, which have built-in intelligence for key-value store operations.
- StatelessActorApp: Actually a misnomer; this application’s services can indeed hold state, but the persistence of that state is managed outside of the Actor Runtime. So from the Actor Runtime’s perspective, the services from this app are stateless. This application and its associated services are the first step in providing storage mechanisms for ActorFx outside the Actor Runtime.
More information is available in the Actor Runtime Manager documentation.
Gilad Bracha Aug 27, 2014