Thursday Apr 04, 2013

Golo – A Lightweight Dynamic Language for the JVM

Julien Ponge, who, in addition to being a Java developer and a professor, also writes technical articles for both otn/java and Java Magazine, has created Golo, a simple, dynamic, weakly-typed open source language that favors the explicit over the implicit. Developers can pick it up in a manner of hours, not days. Responses to its recent release at Devoxx have been favorable.

Built from day 1 with invokedynamic, and currently in beta, Golo takes advantage of the latest advances of the JVM. It is also a showcase on how to build a language runtime with invokedynamic.

The Golo Programming Guide is located here.

Julien is an Associate Professor (Maître de Conférences) in Computer Science and Engineering at INSA-Lyon in France, plus an R&D Computer Scientist at the CITI / INRIA laboratory. Learn more about him here.

Wednesday Jul 13, 2011

Understanding the Java 7 Fork/Join Framework

An incisive and timely article by Julien Ponge, an Associate Professor in computer science at INSA de Lyon, titled “Fork and Join: Java Can Excel at Painless Parallel Programming, Too!” offers a detailed exploration of the new Java 7 fork/join framework. It begins with an explanation of low-level mechanisms involved in Java concurrent programming, then explores the rich primitives of the java.util.concurrent packages, and presents fork/join tasks plus example usage of the new APIs.

From the article itself:

“To illustrate the usage of the new fork/join framework, let us take a simple example in which we will count the occurrences of a word in a set of documents. First and foremost, fork/join tasks should operate as “pure” in-memory algorithms in which no I/O operations come into play. Also, communication between tasks through shared state should be avoided as much as possible, because that implies that locking might have to be performed. Ideally, tasks communicate only when one task forks another or when one task joins another.”

Read the complete article.

Thursday Jun 02, 2011

Managing Resources with Java 7

A very clear and detailed article by Julien Ponge, titled “Better Resource Management with Java SE 7: Beyond Syntactic Sugar,” presents the Java 7 answer to the automatic resource management problem in the form of a new language construct, proposed as part of Project Coin, called the try-with-resources statement.

Java applications frequently manipulate different types of resources such as files, streams, sockets, and database connections that require system resources for their operations. They must be managed with great care or risk having database connections and file descriptors remain open after an exception occurs elsewhere in the code. As a result, application servers may need frequent restarts due to resource exhaustion.

The article provides an overview of resource and exception management before explaining the essentials of try-with-resources statements. It then shows how a class can be made ready to support such statements, and concludes with a demystification of the syntactic sugar behind the language extension.

Ponge concludes that the try-with-resources construct “generates correct code on behalf of the developer, eliminating the need to write boilerplate code that is easy to get wrong. More importantly, this change has been accompanied with evolutions to attach one exception to another, thus providing an elegant solution to the well-known problem of exceptions masking each other.”

Read the rest of the article here.


Insider News from the Java Team at Oracle!



« March 2015