Sunday, 29 September 2013

Java 8 and JSR 335

JSR 335 refers to Lambda Expressions in Java and boasts Goldman Sachs, Google and JetBrains on the Expert Group. Brian Goetz is the Spec Lead on this. Brian is with Oracle now, though formerly was an engineer at Sun Microsystems before the takeover.

JBoss becomes WildFly

As of November 2012, JBoss has become WildFly.  This name has been chosen "by the community".

Sunday, 1 September 2013

The Java Control Panel on Windows

This can be used to turn off Java in the browser. It is usually called javacpl.exe on Windows.

Thursday, 25 April 2013

Signing Jar Files with the "JJA" Sequence

Jar files can be signed using the following syntax [henceforth referred to as the "JJA" sequence]:

jarsigner jar-file alias

The alias identifies the private key used to sign the Jar file, and the key's associated certificate. Quite interesting how that alias works....it's a lookup into the Keystore, where each private and public key pair is identified by an alias, and a password is needed to access the private key. The keystore is generated by the Keytool.

Saturday, 16 March 2013

Good Old java.io.RandomAccessFile

An old friend from JDK 1.0 days. The overloaded write operation will write byte arrays, ints etc. to the file from the position of the current file pointer. The length() method returns the length of the file in bytes.

Wednesday, 16 January 2013

Department of Homeland Security Says No to Web Java (Java 7, That is)

The DHS recommends users disable Java in their web browsers. Oracle has issued some security fixes.

Wednesday, 26 December 2012

Hadoop, the MapReduce Paradigm and the Corresponding Mindset Change

The latest rage in the Java universe is Hadoop, a platform for "Big Data" processing. A skew of O'Reilly books have been published on the subject. It implements the MapReduce paradigm popularized by Google.

MapReduce is something inspired by LISP. A Map takes a function and a list of arguments and applies the function to each one of the arguments. A Reduce operation combines data points into one value using a binary operation.

So a "MapReduce" operation consists of 1) applying a function to a list, to generate a new list, 2) combine the elements of the list, using some binary operator (which could be simple addition, or something more complex, like XOR) to produce a single value.  Many algorithms can be expressed using this paradigm.

You can see how this can speedup parallelisable tasks. E.g. A word count on a huge file can be mapped onto different machines and results collated via Reduce.

It is a simple divide and conquer model for processing data in a parallel fashion.

It is the model used by Google to achieve massively parallel processing.

This type of computing, though, requires an altogether different mindset. Whereas previously we were designing programs for single machines, or rather single processor machines, we now need to create algorithms that work in the multiprocessor/multimachine context - parallel algorithms.