Sun Tech Days

This week I visited the Tech Days in Frankfurt, but I couldn’t visit the NetBeans Day😦

I will write some more information as update here and post some images in an extra entry. Additionally I will point to the slides as pdf from this entry here if they become available.

By train it was relative easy to reach the congress center in Frankfurt, but I was late because the train from Bayreuth takes more than 4 hours…

I went directly into a talk of Inyoung Cho about Java SE 6. It was a good overview, but I expected more details or more technical description of some features.

Then I listened to the talk about javafx. JavaFX is cool, but not easy as I guess after trying it for myself. You should download the JavaFX plugin within the new NetBeans 6.0 (tools->plugins). You can try the following tutorial taken from this list.

I attended the ‘real time java’ session – now I know what preemptiv means: several applications can run in parallel but one application could block the entire (operating) system, this is not secure but necessary for real-time systems! I learned a lot of useful information e.g. that the garbage collector introduces nondeterministic behavior, but then at home (because I don’t have a laptop) I wanted to download the RTJS – but it is available as evaluation only!!😦 This is bad… I couldn’t try it for my project nlo, which is open source. Here you can try it for yourself:

Sun provided all the food and they donated every attendee a rucksack! And because I am a SDN member I got the event for free…
But now it’s enough advertising … and you should definitely check out🙂

Heinz Kabutz and Kirk Peooerdine talked about concurrency and gave us some (ten) laws:
# if you catch an InterruptedException rethrow it or be sure you set the interrupt flag again.
# do not use a lots of threads and look at one thread at a time (while debugging)
# additionally threads should increase performance – so use max. 4 theads per core.
Use ExecutorService or ThreadPool’s that control the number
# different threads could see a different value of a variable, because the JVM is
allowed to cache the variables. So use volatile or synchronize the reads and writes
# The JVM is even allowed to reorder statements – so do not be too clever!
# += is not atomic, but use ReadWriteLock instead synchronize which solves the
problem, too. Or use AtomicInteger, because we need to protected the data and not
the whole code.
# don’t use String for locking (because is only one instance per string -> internalString)
# autodeadlock detection on
Another interesting theme is performance tuning; Simon Ritter explained all
the basics (there are two generations: young and old …) of the object allocation
in the jvm and then he said sth. about the hidden switchers ‘-XX’ of the JVM:
# -XX+UseTLAB switches on the thread local allocation, normally the space has
only one pointer which could slow down performance.
# -XX:CMSTriggerRatio tunes the GC interval. (CMS=concurent marking step)
# -XX:CMSIgnoreDutyCycle
# -XX:+UseLargePages, -XX:LargePageSizeInBytes=8M

GC loves small, immutable and short lived objects.
Avoid explicit calls of System.gc() trust the JVM!
Don’t write your own objects pools: this could reintroduce the C++ problems.
Further information: -> TS-3281

Last but not least we all get the ‘solaris developer edition’. But it
does’t run on my machine (to less memory – you will need more than 720MB, or so!)
I tried to use the ‘normal’ Solaris, but it failed too:
Setting up Java. Please wait…
Extracting windowing system. Please wait…

<nothing happens here for minutes …>

One thought on “Sun Tech Days

Comments are closed.