I am new to Scala and Akka, and I am considering using it to solve the problem. Suppose I have a calculation mechanism (which is looking for a solution). I would like to parallelize this search both through the processor and through the nodes, providing each processor on each node with its own engine instance.
Motor inputs consist of a small number of scalar inputs and a very large hash table. Each engine instance uses its own scalar inputs to make a small local change to the hash table, calculates the kindness, then discards the changes (they should not be committed / noticed by any other engine instance). The value of kindness will be returned to some coordinator who will choose among the results.
I read some about the STM TransactionalMap as a general state vehicle. This seems perfect, but I really don't see any complete examples using it as a shared state.
Questions:
- Is the actor / stm model suitable for this problem?
- Can you show a concrete example of how to distribute the general condition? (is this [TransactionalMap [,]] message as a message?
- Is there anything else in the distribution of the general state in a node, and not on different nodes?
Inquisitional minds want to know
Allan
source share