Sunday 11 December 2011

Understanding the JVM, concurrency and GC

A great collection of links and presentations on Java Virtual Machine and why understanding how it works is critical.

First, let's start with HotSpot, the default JVM. This is a mandatory intro into the responsibilities of the VM. Next, learning about the some of the most common optimizations that the JIT compiler has available, HotSpot FAQs, and method inlining

Now we are going to go down one abstraction layer, and jump into the hardware. A great presentation by Jevgeni Kabanov, by far the simplest to undestand: Do you really get Memory? I find this presentation a must see before jumping into the more hardcore versions that follow. In this talk, Jevgeni presents a simplified Java CPU model, showing the CPU, Memory, and more fundamentally, Caches.

Armed with this knowledge, we are then ready to take on the mammoth paper "What every programmer should know about memory by Ulrich Drepper. This is very low level at times, so worth watching Cliff Click's presentation: A Crash Course on Modern Hardware, which summarises it nicely.

Interesting article also on Memory Barriers and obviously, it wouldn't be complete without Doug Lea's concurrency in Java presentation. Always a good read, although really extensive, the Java Language Specification, Third Edition

Finally, I have reserved it for the last, Gil Tene's excellent Understanding Java Garbage Collection. Brings in lots of points that i didn't know about in my previous post The Art of GC Tuning. In particular, I really enjoyed the discussion around Application Memory Wall, and how our applications seem to range between 1-4 GBs, but rarely take advantage of increasing hardware power, and what are the main problems behind it. He shows how the Azul Zing VM can easily cope with 1/2 TB VMs without pausing.

That's quite a lot for now!

Saturday 3 December 2011

Rename a GIT project in GitHub

It is now supported to rename projects in GitHub.

Go to project admin, and rename.

Then, in your local .git project, simple edit your '.git/config' file


[remote "origin"]
        url = g...@github.com:fractal/old-name.git
        fetch = +refs/heads/*:refs/remotes/origin/*
...

Now just change old-name to new name, save and push

First Scala Step - Simple SBT template

I've created a simple project to clone when you need to get up and running really quickly using the latest Scala tools.

It provides:

  •  Scala 2.9.1
  •  SBT 0.11.2
  •  Specs2 1.6
  •  Mockito 1.8.5
  •  Eclipse
  •  IntelliJ IDEA
Clone first-scala-step and start using it! 

Alternatively, just today, coolscala has also pushed a similar project to kickstart using Akka 1.3-RC1+ ScalaTests : start-akka