Archives for: November 2010


Permalink 07:50:56 pm, by admin, 314 words, 1792 views   English (US)
Categories: General

Devoxx 2010 - Day 3

Final day of Devoxx. It went by too fast.

The keynote was panel discussion, hosted by Joe Nuxoll and Dick Wall, featuring Joshua Bloch, Mark Reinhold, Stephen Colebourne, Antonio Goncalves, Juergen Hoeller and Bill Venners. Tin foil hats were present to prevent having to answer those questions that they could not answer for business reasons and Dick Wall acted as the enforcer, good fun. Various questions, more or less controversial ones (first few questions being handled: whether Java should remain backwards compatible, and whether the Java community was affected by the acquisition of Sun by Oracle). Overall enjoyable, though some answers were very polite or correct. The hats remained off most of the time though, which is a good thing.

‘Creating Lightweight Applications With Nothing But Vanilla Java EE 6′ by Adam Bien was a live coding demo, walking through the creation of a web application. The guy presents with a lot of very dry humour. The format of the talk presented the various features of JEE6 really well: one to lookup on Parleys!

ElasticSearch is a search engine that you can interact with via REST, pushing a document with data (for instance a JSON structure of a book and its author etc) and can then be queried. In queries, the original keys in the documents can be used. Lucene is used internally, and all Lucene power is exposed. ElasticSearch provides quite a few features, and also distribution of indices.

That was the end of three information-packed days. Devoxx remains a great conference, especially if you’re not able to make JavaOne (and from what I read JavaOne ain’t what it used to be, so this may be the best option at the moment). What is lacking is some more crowd-control: at JavaOne everyone MUST leave the room after a session, and there are no clashes of people trying to exit while others try to enter.


Permalink 11:29:52 pm, by admin, 1079 words, 1548 views   English (US)
Categories: Java

Devoxx 2010 - Day 2

The next day at Devoxx, my notes for the day.

The keynote looked at the Java EE platform, the way it will work with the cloud (deploying, monitoring, etc). The keynote also reserved a block of time for JPA2.1, which went over the same material as the BOF last night: what features are being looked at for possible inclusion in the next release of the specification. For JAX-RS 2.0 the approach is taken to take the innovations made by various frameworks since JAX-RS 1.1 and standardize those (in contrast to creating a standard first, which was called the root of all evil). Features being considered are a client API, a model-view-controller structure, improved ease of use (DRY, convention over configuration), improved @Inject integration (replacing @context) and some features for a more distant future.

Matt Raible about ‘Comparing JVM Web Frameworks’ started with getting a feeling for the type of audience: quite a mix of frameworks is being used by us developers. To go about choosing a framework, you need to eliminate options, as there are too many. ‘And don’t use Struts’ (laughter from the audience). To go about it: choose a small list, prototype, document and create a matrix, create a presentation or summary and decide. Important factors in 2007 were: type of framework (request, component or RIA), ease of development (determined after a week) community, future roadmap, maintainance. The decision on the type of framework is based on the type of application and whether it is statefull or stateless. Nowadays there are many more factors considered to be important. A matrix of the features and a number of frameworks is available at . For a subset of frameworks, the pros and cons were discussed. The session was interesting enough to revisit the presentation slides, but a bit light on the technical comparisons (comparing by the number of jobs or emails sent in the community is not too interesting IMO).

Viktor Klang talked about Akka, a framework using actors and software transactional memory to make concurrency, scalability and fault-tolerance easier. Akka works for both Java as well as Scala. This talk focuses on actors, and does a good job of describing the code to create and use actors. Since it is impossible to have each actor run its own thread, there are dispatchers running the code in the actors. A performance comparison indicates that the framework scales well compared to the Scala actors implementation, and highlights the difference in scalability between fire-and-forget messaging vs awaiting a reply too. To help with fault-tolerance, actors are linked to each other. In case of an exception, the linked supervisor can take appropriate actions, such as restarting a collection of actors. The remoteing feature looks like a good alternative when creating fine-grained-services. Akka also provides a STM implementation, I’m not entirely sure whether it is available in the Java version, since the examples are all in Scala. The remainder of the presentation is more of a list of features: STM combined with actors, integration with Spring and Camel, hotswapping actors, and support for persistence.

The quicky on OSGi was cancelled, unfortunately.

The Java Persistence Criteria API by Linda DeMichiel talked about the Java Persistence Query Language and its positives and negatives. A big downside is the lack of type-safety. The Criteria API allows one to create queries similar to JPQL, but do so object-based and strongly typed. While I’m a proponent of having the compiler do as much work for me as possible to prevent runtime surprises, the amount of code to build the queries in the examples is fairly large, much larger than the JPQL it was replacing. The JPQL version looks easier to maintain (and to fix). On the other hand, the examples used more than a few temporary variables (with all of the generic type definitions), thus the readability in real situations might be better (usually it’s the other way round, with demos being clearer).

The presentation ‘Hadoop, HBase, and Hive in Production’ was presented by a Facebook engineer. At Facebook there is a big data warehouse, that started as an Oracle solution, but due to the large amount of data from thousands of nodes, they moved to Hadoop. The talk provided an introduction to Hadoop and how it is used at Facebook (non computer science degree holding users can also interact with the Hadoop cluster). Interesting note on the namenode: with their amount of data switching of the namenode takes 2 hours. They are working on ‘avatarnodes’ that reduces the time after a namenode failure to 10 seconds. In practice they have never seen a name node fail (putting ’single point of failure’ in perspective). HBase is another system in use at FaceBook, but less information was provided on how it works, and more on where it is used, which is quite a few places.

The session ‘Emergent design’ by Neal Ford is a methodology session. The session itself exhibited some emergent design, as most of the subjects that were touched on only started to find their place after they were discussed. It started with the claim that up-front designed projects fail because of the unknown unknowns. Neal thinks the reason that we’re so quick to apply a waterfall process (and even the original paper on the waterfall process claims that it is not a good model for software development) is that it seems logical. Every piece of software has its own idiomatic patters: the way things are done in your project. Difference between architecture and design is in the question ‘is it hard to change later’ (a ‘yes’ makes it qualify to be called architecture). Other subjects were essential vs accidental complexity, technical dept (nicely illustrated with a graph of cyclometric complexity per line of code over a period of time) and rampant genericness (too many layers for extension that make the project complex). Enablers for emergent design: test driven design and refactoring (to determine where to start, use the afferent coupling metric).

Java Puzzlers by Josh Bloch and Bill Pugh, or the Type-It brothers Click and Hack, had some new puzzles, not shown at JavaOne (remember that that Google wasn’t there?). Much fun as every of there performances, and tough as ever: you might have the right answer, but did you have it for the right reasons?

As usual there was a movie for the Devoxx crowd. This year’s movie was ‘the social network’ about facebook. Really appropriate and a beter movie then expected (the ‘hacking’-match made me ROFL).

Permalink 09:58:31 am, by admin, 1513 words, 1169 views   English (US)
Categories: Java

Devoxx 2010 - Day 1

The first day of Devoxx (or for some the third day). My new employer,, kindly allowed me to go to Belgium to attend another Devoxx conference.

As usual the keynotes were kicked off by Stephan with a big list of statistics. And as he mentioned, the wireless is indeed quite a bit better this year (not perfect, during breaks everybody tries to logon, causing delays, just as at the doors to the hallway). The new version of Parleys has again more capabilities, and there are versions for iPad and the Samsung Galaxy Tab too, and they’re looking sweet!

Mark Reinhold talked about the ‘road ahead’. Last year in this same theater, he announced closures to be in the next Java version, but plans changed again. The focus under the new management is about productivity, performance, universality, modularity, integration and serviceability. Productivity is covered via the diamond-operator, automatic resource management and other features from Project Coin. The fork-join/parallelarray framework is still the proposed way to harness the power available from many-core systems. A new feature is to have default implementations on interfaces (whhaat???) as a way to be backwards compatible while evolving interfaces. Type reification is on the roadmap: finally! It can remove some unexpected problems resulting from the erasure, but would also allow primitive types to be used. Value classes and properties make for more readable code, but their availability is a long-term goal. Quite some time was spent on project Jigsaw, but not much has changed. To enhance serviceability, JRockit and Hotspot will converge (based on the Hotspot engine, due to there being more engineers at Oracle now that have worked on Hotspot), but the servicibility of jRockit. After explaining the Java 7 & 8 roadmap, the question ‘why is Oracle funding this’ was dropped by Mark. The answer: keep Java #1 as there are thousands of Java engineers at Oracle, Indirect revenue (from weblogic etc), Direct revenue (from support), Decreasing development cost (at Oracle). Last night the JSRs for Coin, Lambda, JDK 7 and JDK 8 were submitted. OpenJDK and the licence stay the same. IBM joined openJDK, as well as Apple. Interesting remark by Mark that the engineers at Oracle seem to really know planning software projects.

Ben Galbraith and Dion Almaer’s ’state of the web’ flowed nicely, going over old web designs, compared to current designs, and the exploding market for apps. Their vision is a mix of the appstores of mobile platforms, with application interfaces built using HTML5 deployed from on the whole range of mobile devices to desktops.

The first true session was ‘reflection madness’ by Heinz Kabutz, which he started after taping his Apple to the speaker stand to prevent it from dropping. Reflection is compared to opium: it alleviates pain, but it’s not a good idea to use on a regular basis. Using examples taken from his newsletter, he showed the evil things that can be done using reflection (modifying the constant strings, as well as the cache of small boxed integers), determining the size of objects, and using the Sun reflection package to find out who called a method (which can also be achieved using the security manager or using a generated stacktrace). Some other nasty but in some obscure cases useful and always fascinating tricks were adding enum values to an enum at runtime only (for unit testing situations that a future version of an enum contains extra values), and creating objects without calling a constructor.

The quickies during lunch were not timed too well: the previous sessions started late, and after finding my way through the passageways and grabbing lunch, the quickies were about to finish. Too bad, I’d have liked to learn more about the live version of JRebel.

Why design matters by Bair and Potts started with a video from Don Norman about how good design makes people happy, and that it needn’t be perfect. For the presentation they’ve tranformed the Jira issue tracker to a RIA. The bulk of the presentation was spent on going over the abilities of CSS, specificely CSS as defined in JavaFX, plus where it matches or differs from CSS as used in HTML pages. There’s really a lot that can be done with the CSS, and the audience was provided with some helpful suggestions on defining the CSS to be more performant.

After a scrum in the hallway to get into the room (with others still trying to get out, can we get some coordinators here?!?) Brian Goetz provided an update on project Lambda. From the angle of ParallelArray and the huge amount of code needed to create anonymous innerclasses, the Lambda expressions were introduced. Behind the syntax that most discussions seem to focus on, there’s a world of other issues to embed this in Java. What’s the type of the expression? Well it’s SAM type (single abstract method, thus interface with a single method). A consequence is that the expressions can only be used where SAM types are used, but it seems that those are the only places where one would want to use them. Quite some attention is given to having readable concise code, by having the compiler infer types and introducing function pointers. Note that the implementation is not sugar for innerclasses, but are implemented using MethodHandles, thus having less of an impact on performance. The talk also went into the aforementioned default methods on interfaces: extension methods. This is a solution along the spectrum from single inheritance to multiple inheritance, where Java chose a point in the middle (and not as far as traits or mixins), to allow interfaces to evolve. In the end, these features allow the language and libraries to evolve in a IMHO great way. Great talk, Goetz was as usual quick and witty, and there were good questions following the talk.

The talk by Joshua Bloch titled ‘performance axiety’ was packed, not too surprising. The session started with a few interesting points: logical AND ( & ) is now often faster than conditional AND ( && ), but one has to measure and not use logical AND as a default. Field accesses are likewise hard to predict the performance of: “is the field volative? If so, what architecture are you using?” Etc. Even (micro)benchmarking does not give deterministic outcomes: a (failed) demo is to highlight that tests on a simple sorting example can vary in speed by as much as 20%, and while it used to be blamed on memory cache interactions, the current opinion is that it might well depend on the nondeterministic behavior of the JIT compiler. So the conclusion is to test a lot (more than a few runs, over multiple versions of the VM, and multiple platforms), and expect unexpected outcomes.

The introduction to Voldemort by Alex Feinberg discussed the reasons for Linked-in to build their own NoSQL system (all the regular reasons, much data etc). Voldemort provides a key/value model, and supports no joins. It is based on Amazon’s Dynamo, of which some features were highlighted (data is stored on a hash-ring, replicated to several nodes, uses versions, quorums and vector clocks, some features: no master, read-your-writes consistency is possible). Differences between Voldemort and Dynamo: Voldemort has strict quorums, failure detection is done on the client, etc. The talk then went over the various layers, such as storage. The presentation remained largly theoretical; little was shown on how one (outside of Linked-in) would use it.

After some fries, a little look at the end of the talk by Romain and Chet, it was off to the BOFs. Difficult choice between JavaSE and JavaFX: given the amount of people at JavaSE, it became JavaFX, which turned out to be an interesting format: we joined the developers in the US for a discussion on how to take the object literal concept from JavaFX script and how to implement it in Java. The builder pattern looked like a good candidate. The argument pattern (new Rectangle(arg(Rectangle.X, 20), arg(Rectangle.y, 10),…)) was found to have a few downsides. A logical evolution of that pattern is (new Rectangle(Rectangle.X(10), Rectangle.Y(10), …)) which looks nicer. Passing a map is an option, but since Java has no syntax for maps it’s tough and there is little checking at compile time. A evolution of the map version is the loose key/value version (key, value, key, value, …) but that doesn’t work nice for all cases (multiple values have to be converted to arrays). In the end there was no decision by the group: both builder and the second version of the argument pattern are okay but not really convincing.

The Java Persistence Futures BOF (in a room that was still steamy from the JavaSE BOF) went over the possible candidate features for JPA 2.1. It doesn’t really have my interrest.

The final session of tonight, on visage with android was a workshop. Due to the large number of people, limited number of machines, and slow pace (I’ve both worked with Android and JavaFX script (Visage is the fork of now unsupported JavaFX script)) I retire before it’s 22:00, after a tiring interesting day.


Personal blog on my interests.

November 2010
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        




XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 1

powered by b2evolution free blog software