Discover Azul's high-performance Java platform providing faster speed, startup, & efficiency without code changes
Support
Blog chevron_right Performance

More Java Power For Your Pi

Recently, the Raspberry Pi Foundation announced the most potent Raspberry Pi board yet produced while keeping the price down to an incredible $35. The Pi 3 model B+ continues the use of the Broadcom BCM2837 SoC chip but, with new packaging and improved board layout gives a much more even dissipation of heat when under load. This enables the CPU to be safely clocked at 1.4GHz, up from the 1.2GHz of the previous Pi 3 model B. The board still does not require any form of heat sink or fan, which is one of the things that makes the Pi so appealing to the Maker community and those looking to use it for embedded applications. Although the memory remains unchanged at 1Gb, there is much faster networking: Ethernet, wireless and Bluetooth all get a significant bump in performance.

It’s hard to believe that the Raspberry Pi has been around for six years. I remember when it was launched; the initial production run was only 10,000 boards. The Raspberry Pi, having sold in excess of fifteen million boards, is now the world’s third best selling computer (only the Windows PC and Mac have sold more). There’s even an incredulously cheap Pi Zero using a slightly older ARM processor, with 512Mb of RAM on a smaller PCB. Although it has less connectivity (fewer USB ports and no Ethernet), it’s only $5. How is that even possible?

To trace the history of the Raspberry Pi, you have to go all the way back to the early 1980s. At this time the UK television broadcaster, the BBC, decided to run a series to teach people how to program. Since this was before the IBM PC had even been launched, they were posed with an immediate problem: which computer to base their lessons on? Taking a bold step, they decided to create their own. The BBC partnered with Acorn Computers in Cambridge (UK, not Massachusetts), which went on to become Arm, whose processor designs now power the majority of mobile devices in the world today. Together they developed the BBC Micro, which eventually came in three variants: the Model A, Model B and Model B+ (the Raspberry Pi, you will notice, uses the same nomenclature). These were fantastic machines. My second personal computer, which I got when I was sixteen and which I learned assembler on was a Model B. It had an 8-bit 6502 processor running at 2MHz with 32Kb of RAM (this varied from 16-128Kb, depending on model). It could also do colour graphics; look up Elite on YouTube and then think about the fact that the machine running that game has only 32 Kilobytes of RAM (that’s Kilobytes, not Megabytes or Gigabytes).

This was the inspiration for the Raspberry Pi. Around 2006 when the project started, many people in the IT industry were concerned about how IT was taught in UK schools. Many people felt it wasn’t what was necessary to keep the UK as one of the leading countries for innovation. ICT, as it is called, consisted mostly of how to use applications like Word, Excel and PowerPoint, not fundamentals of computing or programming. The goal of creating the Raspberry Pi was to change this. The device needed to be low cost so that it could be made widely available in schools and not be of too much concern if it was treated a bit roughly. It needed to support a graphical environment and have enough computing power to run the sort of tools necessary to learn how to program; applications like Scratch, Greenfoot, BlueJ and, of course, Java.

The Pi has been a massive success with schools and children, but that success has spread far wider than anyone ever imagined. If you can think a computer-based project, someone will have used a Raspberry Pi to implement it. Personally, I’ve had great fun using Raspberry Pis to connect to my car and display all sorts of extra information as well as using a cluster of Pis to run machine learning software that learns to play Minecraft. I’ve also built a weather station and even used one to monitor my brain activity with the goal of controlling a LEGO motor with my mind (results of that project have been somewhat variable).

Many factors make the Raspberry Pi so appealing across such a wide range of applications. Clearly, the cost makes it very easy to include into any project. Then there’s the fact that it runs Linux, giving you access to an almost unlimited set of developer tools, libraries and interfaces. The vast majority of these are open-source; if you want something to work slightly differently, you can recompile the code with your changes. Interfacing for the Raspberry Pi is another really attractive feature. The 40 pins on the board have become something of a defacto standard for other SoC board developers, as there are so many Hardware Attached on Top (HATs) available for the Pi. Not only is it straightforward to connect your own sensors and actuators using interfaces like GPIO, I2C, SPI and UART, but you also have easy access to things like GPS, industrial CAN buses and even heart rate monitoring.

At Azul, we’ve focused on helping to make sure that developers can use Java for their projects. Oracle decided that from JDK 9 onwards they would no longer provide binaries of the JDK for Arm processors so no more Oracle JDK on the Pi. Azul’s Zulu build of the OpenJDK, fully tested using the relevant TCK, is freely available from our website. Currently, we support JDK 8 for our Arm-based builds. With the new, faster release cadence of the JDK our plan is to skip JDK 9 and 10; JDK 11 will be our next binary release.

Why not give Zulu a try on the new Raspberry Pi 3 Model B+?  You can download it here