Java ecosystem meets blockchain in the Aion Virtual Machine
Java meets the blockchain with the Aion Virtual Machine, from the Aion Foundation. Take advantage of the vast Java ecosystem and build smart contracts directly in Java, with all the maturity of the JVM. The Aion Virtual Machine supports Maven and IntelliJ plugins and can run all transactions concurrently.
Recent news for Java and the blockchain involved the public unveiling of the Aion Virtual Machine (AVM).
The Aion Foundation welcomes Java developers to the AVM, which allows developers to build smart contracts “directly in Java”. The Aion network is “a multi-tier blockchain network designed to support a future where many blockchains exist to solve unique industry problems and to power the services of the modern world”.
Their open source virtual machine is under the MIT license. Let’s take a look at the developer-friendly VM.
JVM & blockchain
There’s no denying the popularity and broad usage of Java; AVM uses that familiarity AVM as one of its key points. The Java-based VM uses the familiar Java tooling ecosystem and runs on native-JVM code.
SEE ALSO: Tune your Garbage Collector
According to an article by David Gerard, author of news site Attack of the 50 Foot Blockchain, Aion is not necessarily the “first” blockchain for Java. Gerard writes that the smart contract engine “has been rewritten from C++ to Java”. The head of Aion’s marketing Calvin Sribniak-Jones wrote in response to Gerard: “Although there are other platforms that enable Java code to interact with the Blockchain this is the first time that native-JVM code can run directly on a public Blockchain safely and reliably.”
For information about why the JVM and blockchain fit so well together, refer to the post by the lead of the Aion VM team Jeff Disher “Aion Virtual Machine (AVM): Why Java and the JVM?“. He explains how the maturity of the Java ecosystem opens up a host of potential for blockchain applications.
Features & overview
From the GitHub README text:
AVM is not a modification or rewrite of the underlying JVM, but a bytecode transformer and runtime library, which provides control over how developers are allowed to interact with the AVM. It isolates DApps from each other while restricting access to class libraries.
Some of the notable features of AVM include:
- Java object-oriented programming model
- Hybrid storage model. Object graph-based storage system
- Engine runs all transactions concurrently
- JIT compiler
- Incorporate Maven and Aion4J
- Debug smart contracts with IntelliJ plugin
- Primitive data types
- Supports community tool list
From the announcement blog from the lead of the VM team Jeff Disher, the future includes some possible plans. Look forward to updates potentially including:
- Other JVM language support
- Smaller user libraries
- Ease of API expansion
Prerequisites for building and testing include JDK 10 or higher and Apache Ant v1.10 or higher.
Instructions on how to build the Hello World available here.