Getting Started With Blockchain for Java Developers
It is time Java developers give blockchain a second look.
Join the DZone community and get the full member experience.Join For Free
Top technology prognosticators have listed blockchain among the top 10 emerging technologies with the potential to revolutionize our world in the next decade. This fact makes it well worth investing your time now to learn. If you are a developer with a Java background and want to get up to speed on blockchain technology, this article will give you the basic information you need to get started.
Blockchain is a huge space, and at first, it can be overwhelming to navigate. Blockchain is different from other software technologies as it has a parallel non-technical universe with a focus on speculations, scams, price volatility, trading, ICOs, cryptocurrencies, Bitcoin maximalism, game theory, human greed, etc. Here, we will ignore that side of blockchain completely and look only at the technical aspects.
The Theoretical Minimum for Blockchain
Regardless of the programing language and implementation details, there are some basic fundamentals about blockchain that you should be familiar with. Without this understanding, it is impossible to grasp the foundations or build on them. Based on my experience, the very minimum two technologies that must be understood are Bitcoin and Ethereum. It happens that both projects introduced something new in the space, both currently have the highest market cap, the highest developer community, etc. Most other blockchain projects, whether they are public or private, permissionless or permissioned, are forks of Bitcoin or Ethereum, or build and improve their shortcomings in some ways by making certain trade-offs. Understanding these two projects is like taking networking, database theory, messaging, data structures, and two programing language classes in university, thus understanding how these two blockchain technologies will open your mind up to the blockchain universe.
The two books I recommend for this purpose happen to be from the same author — Andreas M. Antonopoulos:
- Mastering Bitcoin is the most in-depth, technical book out there while also being the most understandable and easy-to-read book I could find about Bitcoin. The tens of other books I checked on this topic were either mostly philosophical and non-technical.
- On the Ethereum side, there are many more technical books, but I liked the level of detail in Mastering Ethereum most.
- Building Ethereum Dapps is another book I found very thorough in covering Ethereum development very well.
Most Popular Java-Based Blockchain Projects
If you are coming from a technical background, it makes sense to build on that knowledge and see what blockchain brings to the table. In the end, blockchain is a new technology, but it contains a combination of existing technologies with human behavior fueled by network effects.
Assuming you've read the above two books, and want to get your hands dirty, here are a few open-source blockchain projects written in Java:
- Corda — This is probably the most natural starting point for a Java developer. Corda is a JVM-based project that builds on top of popular widely used Java projects such as Apache Artemis, Hibernate, Apache Shiro, Jackson, and relational databases. It is inspired by Bitcoin but has elements of business processes, messaging, and other familiar concepts. Check out my first impressions from it as a Java developer here.
- Pantheon — This is a full implementation of an Ethereum node in Java. It is specifically created to attract developers from the Java ecosystem into the blockchain world. Here are an intro and a getting started video by its creators.
- BitcoinJ — This is the most popular Java implementation of the Bitcoin protocol. If you prefer to start with Bitcoin directly, this is the Java project to explore.
- Web3J — While Corda and Pantheon are examples of a full blockchain node implemented in Java, Web3J is a client library written in Java. It is very well documented and an active project that makes talking to Ethereum compatible nodes straightforward. I created an Apache Camel connector for it and wrote about it here.
- Hyperledger Fabric Java SDK — One of the most popular enterprise blockchain projects is Hyperledger Fabric and it has a full-featured Java SDK to play around with.
- FundRequest — I also want to point you to full end-user applications written in Java. While the above projects are examples of clients or nodes, FundRequest is an open-source funding platform implemented on top of Ethereum network and fully written in Java. It gives a good idea of how to implement a complete blockchains project interacting with the Ethereum network.
- Eventum — This is a Java project that can help you monitor the Ethereum network and store Events on Kafka. It addresses a few of the common challenges when integrating with blockchain networks which are decentralized.
If you are still not sure where to start, I suggest you read Mastering Bitcoin, that will give you the solid foundation. If you like touching technology before reading, go to GitHub and play with one of the projects listed above. The rest will follow. The future is open and decentralized.
Published at DZone with permission of Bilgin Ibryam, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.