With the growth in computing performance of smartphones, they are no longer just performing simple tasks, but allow us to run computationally intensive applications smoothly as well. And since they have multiple processor cores, we need to deal with the parallelization of our algorithms if we want to use the extra performance well.
Lightbend Akka is a Scala toolkit and runtime that can be used to develop distributed and parallel applications. Although originally running on a standard Java virtual machine, Android’s Dalvik (and on newer versions Android Runtime) is also capable of running applications that use Akka. The toolkit supports multiple models of parallelization, but the preferred way is the actor-based. The Play Framework is a server-side framework for developing web applications that incorporate Akka support.
I introduce and build a distributed parallel client-server application on Play Framework and Android platforms, which can decide during runtime whether to use the client or server to perform computational tasks. Next, we look at several strategies for resource allocation, which are tested for effectiveness by measurements.
As an example, I introduce an implementation of a distributed ray-tracing algorithm, using the Akka toolkit.