--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Hey,I have a question regarding the suitability of Akka for a certain application: Workflows.Assume you have a number of "tasks" that need to be performed, where the input of some tasks is the output of other tasks, and that these tasks can be "piped" together to form a "workflow graph" of tasks. Ultimately, the execution of this workflow graph results in a workflow being performed.For example, a number of filtering tasks may be chained together to filter a stream of incoming data.I'm working with such a library at the moment, but it's single threaded. Basically, at the moment tasks expose iterators that get chained together and then executed.An attempt to parallelize this library was made in the past, but it assigned each task to a thread, which resulted in poor performance when the workflow jobs were short. I guess, due to the cost of creating the threads.What I'd like to do is assign tasks to Akka actors and have them connect via message passing, rather than via iterators (shared state).My questions are:
- Can Akka efficiently stream a reasonably large number of messages between actors? (as fast/efficient as connecting tasks via iterators)
- How much faster is it to create Akka actors vs creating Java Threads?
- How much flexibility/control does Akka provide with respect to mapping actors to threads? For example, would it give me the ability to say: "actors A & B may be executed in different threads (unit of concurrency), but actors C & D must be executed within the same thread (unit of concurrency)"?
- Do you think this problem is well suited to Akka?
If you'd like to know anything else about my use case please ask.Thanks in advance for all help!Regards,Alex
--
Something that comes to mind and would be worth a look is the new task engine in the development version of sbt. Some details can be found here:
http://code.google.com/p/simple-build-tool/wiki/090p2tour
- Peter
Thanks for the comments so far.Peter,Thanks for the suggestions.Regarding Prometheus, it seems like it's not under active development, and would be difficult to get support for. Also, I'm not sure how stable I can expect it to be. Am I right in these assumptions?
Regarding SBT, this is Scala only right? I'd prefer to work with Java, as the current code base is in Java. I know Scala/Java interop is good, but it complicates the code base and would require that the project maintainers (not me) are capable Scala developers.
To be a bit more clear...
- I am not the project owner.
- I would be able to spend 6 months on this project, but not more. Additionally, some of those 6 months will be used to evaluate the resulting code. For this reason I don't want to hand craft/tune/debug something, if a "good enough" solution already exists.
- This would be a proof of concept to see how much performance gain (if any) can be achieved, over the sequential version.
- The current code base is in Java, so I would like to stick to Java: For simplicity on my part, for maintainability on the part of the project owner, and because I'm still very new to Scala. Akka is appealing because if has both Java and Scala APIs.
- The eventual goal is for this library to not only be parallel, but also distributed (not completely unlike Microsoft Dryad). So messages/streams (vs shared state) will eventually be a necessity. For that reason, I'd like to go in that direction from the beginning.
Given these points, is there a reason I shouldn't use Akka?
https://github.com/jboner/akka/blob/master/akka-actor/src/main/scala/dataflow/DataFlowVariable.scala
https://github.com/jboner/akka/blob/master/akka-actor/src/test/scala/dataflow/DataFlowSpec.scala
> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to
> akka-user+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/akka-user?hl=en.
>
--
Jonas Bonér
Jonas Bonér
Specialist at Large
work: http://scalablesolutions.se
code: http://akka.io
blog: http://jonasboner.com
twtr: @jboner
We have not written any yet. Bad. Will do for 1.0.
Take a look at GPars docs. Their dataflow stuff is taken from Akka:
http://www.gpars.org/guide/guide/7.%20Dataflow%20Concurrency.html
> Here are my basic questions:
>
> Is there a Java API to Akka Dataflow?
Yes.
> Can dataflow actors be connected remotely?
Not yet. But that can be done easily since it is based on Actors, so
just basing it on Remote Actors would be not too hard. Do you need
that?
Take a look at GPars docs. Their dataflow stuff is taken from Akka:
Not yet. But that can be done easily since it is based on Actors, sojust basing it on Remote Actors would be not too hard. Do you needthat?
https://www.assembla.com/spaces/akka/tickets/520-docs-for-dataflow-concurrency
https://www.assembla.com/spaces/akka/tickets/521-remote-dataflow-variables
> My first iteration of this project is to only utilize multi cores on 1
> machine.
> My second iteration will be to connect a distributed workflow graph (a bit
> like Microsoft
> Dryad http://research.microsoft.com/en-us/projects/dryad/eurosys07.pdf) so I
> would then need the remote feature.
Cool. Will you build it as Open Source?
Cool. Will you build it as Open Source?