jtdeane/demo-spring-orders — pull request #1 by scullxbones (2012-09-25 03:24:22+00:00)
Title: Adding Akka support

Hey Jeremy,

Hopefully your trip back to the frozen north was easy and snag free.

Per our quick discussion @ NFJS ATL, I added support for Akka actors in addition to the single/multi/scala ones. From what I have been reading (e.g. check out http://www.slideshare.net/shinolajla/taxonomy-ofscala), the Akka implementation of actors will replace the Scala version. Both Akka and Scala (and Play etc) are Typesafe - so it's not too far of a stretch.

I also changed the rules a bit in that all of the orders must be processed for a batch to be considered "complete" - sort of a standard fork-join approach. This significantly changes the relative performance of these on my quad-core Ubuntu VM. I still see Multi lead, but the lead over Akka is tiny, and the lead over Scala actors is small. Of course single-threaded is slow. IMO this makes the benchmark better, and less of a question of who initializes faster/better/etc.

For Example, running `cogito.online.processing.BatchServicesTest`:

Model	Time,s

ST	5.19

MT	0.72

Scala Actors	2.83

Akka Actors	0.77

It really didn't sound right to me that there was such a big lead of an executor over an actor library. I know Akka fairly well, there's probably some work that can be done with the Scala actor approach to make it more optimal and representative.

Finally I updated the scala libraries to something more current (2.9.2), in part because that's consistent with the current tools (Scala-IDE on Eclipse). The scala tools repo has moved, and I would expect that to cause issues, maybe because i'm not running maven command line, it's not an issue yet. Anyways that was to get off the ground, I was having trouble getting it working without those changes.

Anyways, take a look - let me know what you think. I'll probably keep hacking on it, but wanted to give you a preview of where I was going. I'd certainly like to DRY it out a bit I'd be happy if you were able to use it as part of future resource-oriented concurrency talks, but even if it ends up being just something else to consider I think it's time well spent.

Thanks,
Brian