Featured in
Architecture & Design

Microservices Are (Conceptually) Too Big

Philip Willis believes that thinking about independent services and single responsibility applications rather than microservices can help to clarify the architectural trade-offs between the complexities of growing one application and those of communicating between many.

Featured in
Operations & Infrastructure

Mini-talks: The Machine Intelligence Landscape: A Venture Capital Perspective by David Beyer. The future of global, trustless transactions on the largest graph: blockchain by Olaf Carlson-Wee. Algorithms for Anti-Money Laundering by Richard Minerich.

Featured in
Enterprise Architecture

Mini-talks: The Machine Intelligence Landscape: A Venture Capital Perspective by David Beyer. The future of global, trustless transactions on the largest graph: blockchain by Olaf Carlson-Wee. Algorithms for Anti-Money Laundering by Richard Minerich.

Oracle Launches Project Valhalla for Java

Oracle have announced Project Valhalla for Java. This is an experimental OpenJDK project to develop major new features for Java that require both changes to the language syntax and VM-level support. Valhalla project lead Brian Goetz stressed that this is an early-stage experimentation project, and that the community should not necessarily expect any Valhalla technology to be available as part of JDK 9 (scheduled for 2016). The project is similar in intent to some existing OpenJDK projects such as Project Lambda and the DaVinci Machine project (which led to the invokedynamic functionality released in Java 7).

One of the initial features being discussed for Valhalla is a major overhaul of Java's generics. Current versions of Java only allow generic types to contain reference types, and the Java compiler removes the detail of the contained type during compilation. This approach to generic typing (known as type erasure) has been one of the most heavily criticised features of Java's type system.

Project Valhalla will explore a new apporoach to generic typing, and hopes to produce a new form of generic typing that allows developers to use generic collections of primitive types. The aim will be for types such as List<int> to be valid Java in some future release of the JDK. This feature, known as generic specialization, is already present in some other JVM languages and Java developers have been asking for it since generics first shipped with JDK 5.

The other big feature currently proposed for Valhalla is value types. These are intended to combine some of the properties of Java's object and primitive types, but to do so in such a way that developers can treat them as though they were just a new kind of user-defined primitive type. John Rose, Brian Goetz and Guy Steele have published an initial proposal for value types here.

The prototype phase of Valhalla features will be starting soon. Interested developers should join the valhalla-dev mailing list hosted on the OpenJDK site. Brian Goetz's initial announcement is here.

I really hope they find a way to get value types into JDK 9. This will benefit not only Java, but other JVM languages as well. It would be beneficial to have small, immutable struct-like object that can be allocated to the stack.

Well, in the area of Value Types at least, there's some second mover advantage. The JVM ecosystem can definitely learn from the implementation flaws of the .NET approach, and I think that's explicitly called out in one of the design docs.