Posts

Showing posts from July, 2013

Java 7 vs Groovy 2.1 Performance Comparison

I haven't used Groovy for 2 years, since my last touch with Grails . I get stuck in (hard)core Enterprise Java, with some performance aspects in background. I've almost missed a chance to learn Spock , but fortunately Warsaw Java User Group helped me to snap out of some legacy systems and back to normal self-development. In fact I hope that frameworks such as Spock or Geb will change approach to writing tests, by making them easier and more effective. Both frameworks use Groovy, as well as the new king in build tools - Gradle . Seeing pace how Groovy impacts our daily routines I decided to look closer at its performance, and compare it to Java 7. My test environment is based on Java 1.7.0_25 and Groovy 2.1.6. As always in such comparisons I used Caliper  in version 1.0-beta-1 (almost stable) and prepared a number of (I hope) representative microbenchmarks. First benchmark based on Fork/Join framework should be most similar in both languages, because it uses some nati

Confitura 2013 - first time on the other side

I used to attend Confitura (formerly Javarsovia) or at least watch videos from presentations. I even had a chance to speak on it 4 years ago and share my reflections about continuous integration. This year I also decided to try to organize myself and prepare presentation about profiling Java Virtual Machine. Few days after submitting abstract, my chat window blinks with Tomek Dziurko saying:  - "Hello! Confitura Organisation Commitee would like to invite you to join us. We don't give anything in return except satisfaction, but we take a lot of time. Are you in?" Of course it's great honor but also we've to remember that with great power comes great responsibility :) Finally after exchanging a few words I've decided to accept challenge and put my shoulder to the wheel! Now I can say that it was definitely great decision! Guys - if you're reading this post please know, that working with you is a huge delight! But I'm not going to sum up months of p

Using HA Singleton in JBoss 7

Some time ago I had to change standard clustering behavior of Quartz Scheduler, and let it work without synchronizing over database. There are of course a lot of options to do that, but because I'm big fan of simplicity I've decided to use standard Spring @Scheduled configuration and totally skip thinking about cluster at this level. The idea was to just invoke "check that I'm on master node" method at the beginning of the scheduled method. The only problem was how to write such method :) The choice was to use JBoss HA Singleton functionality. It's available in JBoss 7.x but the big lack of documentation forces some experiments... nice! First thing which we need to do is to provide proper dependency, containing few important classes. Of course remember about right version (here I'm using 7.1.1.Final because it's available in public repositories and all next versions of 7 needs to be build manually). org.jboss.as jboss-as-clustering-singleton