Google Go Websocket server and Smoothie Charts client

Recently I enjoyed getting my hands dirty with Google Go a fairly new GPL targeted at systems programming. To get to know the language a little better I came up with the idea to program a websocket server that sends out some data to a browser that visualizes those in a chart. I got the inspiration for this from Joe Walnes blog entry about Smoothie Charts. Smoothie Charts is a little JavaScript library to visualize real-time data in a HTML5 canvas.

The websocket server implementation is pretty simple as Go already has some build-in websocket support. The server sends out the sine function with a value range from -1 to +1 to the client. The result can be seen in the following pictures and all source code be downloaded from github: https://github.com/svenlange/websocket

New value every 500ms. Alternation +0.05

New value every 5ms. Alternation +0.01

The second pictures sine curve looks a bit creepy because my computers CPU utilization was at a maximum and somehow my computer was not able to take a better screenshot. The chart was smoother on my monitor.

This setup/technology could maybe be used to visualize real-time stock exchange trends or the current bandwidth utilization in a data center etc. within a browser. Very nice.

Thanks to Gary Burd for his websocket example. It helped me to get my job done.

FOSDEM 2011

This january I attended the FOSDEM in Brussels for the first time. Before I only visited those expensive enterprise conferences like JAOO, JAX and the like. It really was a great experience. A free conference (in terms of registrations fees) about free and open source software. I hope I can attend it next year again.

I stayed at the Java Dev-Room for most of the time. The speakers there were not the best presenters (cause they are real geeks) but still they gave me inspiration and I could widen my horizon by learning new stuff from them.

One nice thing was that some companies (Oracle, tarent, …) were sponsoring a dinner. The conversations with the participating Java folks were very nice. We talked a little about everything concerning IT stuff. From different hardware architectures to design patterns and political stuff.

One neat tool I have to look into is SystemTap. It enables one to do sophisticated application diagnosis on a Linux OS. For example trace down a Java method call through the JVM down to the native system call. Pretty detailed and interesting tool if one is faced with very tricky performance or functional problems.