Scala seems to be fun
The second day of Jfokus was an ordinary conference day, with separate tracks and many talks to choose between.
JavaFX
The key note talk at the beginning described JavaFX, SUNs new “SilverLight and Flash” killer. The demo showing how to flip through a book with very realistic behaviour, was impressive. On the other hand I’m not convinced SUN is gonna make it. MS is pushing out SilverLight in each Windows Update and SUN simply have not that capability to “pre-load” desktop browsers with the appropriate plugin. Remember the applet war ten years ago. Don’t get me wrong - I like JavaFX, however I’m pessimistic. Anybody still remembering JINI?
Capuchin
The second talk I attended was Ericsson’s new JavaME+Flash/light environment. I’m even more pessimistic about this new tool. It might be a bright piece of technology - I cannot really judge without getting my hands on it. However, will it ever be supported by other vendors? Will it be open source? How many of Ericssons own phone models will have it? There are way too many questions, before one starts to invest time and money on a new (isolated) platform.
Groovy
After lunch it started to be fun. First there was a talk about Groovy support in JetBrains’ IntellijIDEA. I have been using IDEA since the beginning of 2002 and usually uses the latest version all the time. For me personally there wasn’t anything new, becuase I have done some Groovy and Grails hacks using IDEA already. But the presentation was fun and entertaining and hopefully it inspired some in the audience to embark the Groovy way.
JPA 2.0
I realized that EJB3 / JPA still is not my cup of tea. Either I prefer something more high-level, like Grails or something more low-level, like Spring’s JDBC-Template.
Puke
A fun role playing of the importance of thinking and not following, when it comes to productive software development. A standpoint I fully support.
JRockit
Some interesting optimization techniques for the JRockit JVM. However, why did they start to compete with SUN in the first place?
Java++
Ola Bini is always fun to see on stage. He outlined the future of Java as a system implementation language and new dynamic languages on top of the JVM, such as Groovy, Scala, JRuby and others. I fully agree. Java has over the years become a dinosaur and it’s time to move on. Sort of, the same evolution as for 15-20 years ago when C faded away for C++.
Scala
My best experience of the day was Jonas BonĂ©r talking about Scala. I have been curious about Scala a while now, but haven’t really reached above the threshold of actually reading and playing around with it. This has now changed. I’m a Groovy advocate, but will over this year make room for Scala as well. I doubt Scala is ready for prime time yet - not because any technical limitations, rather because of commercial aspects. But the day will come and I will be ready that day.
Scala seems to be a multi-paradigm language; static typing but allowing dynamic type constructs, object oriented programming, functional language programming and actors based concurrent programming. I really like the latter. As far as I understand, the support for message passing is inspired by the Erlang programming language. Back in the beginning of the 90’s, as did some hacks in Erlang, like a simulator for a small phone exchange with support for connecting it to a real PBX exchange (MD110). This was part of my teaching course in real-time systems programming, for Royal Inst of Technology in Stockholm. Besides of Erlang, I used Concurrent C++ as well in the course. Those were the days.
I have never liked the path taken by the current support of concurrency in Java. Doug Lea’s library, which now is the java.util.concurrent package, is simply the wrong way to go. Not because the library is bad - it is not. But, the users are . . . I mean, it is inherently difficult to design concurrent programs right. As soon it starts to be a little more complex, than a bunch of threads doing some asynchronous work. Message passing is the right way to realize concurrent programs. It is a pity, my implementation of thread method invocation from 2002 never got any attention. Well, that’s life. If you are interested, you can find the article here.
Summary
The first presentation about WebSockets and the last presentation about Scala, was my personal highlights of the 2009 JFokus conference.
WebSockets is the way forward of pure web applications
Today I attended the first day of the two-day JFokus conference in central Stockholm. In just three years it has become one of the major Java events in the Scandinavian region. The first day was composed of two half-day sessions. I decided to go for websockets before lunch and performance tuning after lunch.
The first session regarding the part of the upcoming HTML 5 specification, called WebSockets and Server Side Events, was really, really interesting. Everybody, that have tried various ways of pushing data from the server to the web clients, know how difficult it is.
For some period of time, people used fat clients (like JavaSwing@WebStart) to connect to the server and then keeping a full-duplex bi-directional socket stream open. However, as more and more internet threats have emerged security guys tend to block all incoming ports except 80 and 443 for applications to use - reasoning like HTTP is decent protocol and well-understood and the web servers (like Apache) are very robust as well. That have put a burden on us developers to invent protocol tranformers, typically performed by some servlet, used to act as gateways between some back-end system and the front-end browser. Everybody, that have tried this knows how intricate it quickly gets. Why, cannot the browser subscribe directly to a JMS topic and react on incoming messages?
This is exact the kind of question, people behind the WebSockets upcoming standard have been asking and decided to provide an answer for.
A web socket creates a bi-directional HTTP tunnel and within, it can transport application level protocols such as XMPP, STOMP, IMAP/SMTP and many more. From an internet technology point of view, this is the best thing happened since the the invention of sliced-bread.
The second session, after lunch, on the other hand was a little bit disappointing. It was presented by Kirk Pepperdine of JavaPerformanceTuning. However, he had many problems with the both the presentation device (not his fault) and the demoes (his fault). My impression was that he wasn’t really well-prepared. Having a background myself, in both training (10+ years) and performance tuning (2+ years), I must say this was below par. Never ever run a live demo without tripple-checking everything and keep some screen-shots up the sleeves, if running into disasters (shit happens indeed).
The first session was presented by Jonas Jacobi of Kaazing, which seems to have been heavily involved in the realization of the new standard. The point is, there are no browsers yet supporting HTML 5 or WebSockets. Kaazing provides an open-source emulation layer that fully implements the standard that can be used in the meantime. I’m really looking forward to get some time playing around with this new exiting technology.
