Showing posts with label Fail. Show all posts
Showing posts with label Fail. Show all posts

Sunday, April 29, 2012

SVWJUG: Actors in AKKA

I went to a talk titled "Composable Futures With Akka 2.0" at the Silicon Valley Web Java Users Group at the famed Googleplex.  It was by Mike Slinn who has this new book with the same title.  Akka is a concurrency library for Scala and Java.

To AVOID the code-equivalent of this
race-condition, use Akka Futures.
One of the more interesting features of futures is that if you take quotes out of context, they can be hilarious:
"[You can] attempt to change the future, you will fail." --Mike Slinn, apparent determinist

It was a highly technical talk revolving around concurrency, everything that can go (easily) wrong and how to make sure that it goes right.  Mike was a great guy and posted his slides as well.

The tl;dr: Futures will let you have deterministic multi-threading.  If you can't tell, this is a big deal in that you can be confidant that your unit tests will mean that the app works correctly in production (no tricky race conditions!)  However, futures don't scale to multiple mother-boards so it isn't a grid-computing solution.  Futures are also composable and immutable (see quote above).

Concurrency is going to be increasingly important as the clock speed of silicon has basically been maxed out and Moore's Law is only continuing due to more cores, so if you want your program to run faster in the future than it does today you'll need to use concurrency.  If you're going to use concurrency, make it as predictable and repeatable as possible (e.g. eliminate race conditions).  Akka Futures let you do this.

Update: Mike Slinn also has a related article on InfoQ.

Wednesday, December 14, 2011

My Technology Fail: Using JMeter for Integration Testing

Engineering Fail from MemeHumor.com
Please don't do what I did: I made my Maven build run JMeter, record all data retrieved (JMeter option) and then verified the data after as my integration test.

Please, just use HtmlUnit since it's designed for this to begin with.

Note that JMeter is great to use what it's made for: load testing.  Thanks to Manfred Reim for writing his blog post about HtmlUnit, it's what made me realize my mistake.