Skip to content

Adding Akka support#1

Open
scullxbones wants to merge 1 commit intojtdeane:masterfrom
scullxbones:master
Open

Adding Akka support#1
scullxbones wants to merge 1 commit intojtdeane:masterfrom
scullxbones:master

Conversation

@scullxbones
Copy link

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:

ModelTime,s
ST5.19
MT0.72
Scala Actors2.83
Akka Actors0.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

* Wait for all order processing to finish before ending process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant