cxdx

Blogroll

Showing posts with label Bitcoin. Show all posts
Showing posts with label Bitcoin. Show all posts

Getting started with blockchain for Java developers

Follow me on twitter for other posts in this space. This post was originally published on Opensource.com under CC BY-SA 4.0. If you prefer, read the same post on Hacker Noon.

Top technology prognosticators have listed blockchain among the top 10 emerging technologies with the potential to revolutionize our world in the next decade, which makes it well worth investing your time now to learn. If you are a developer with a Java background who wants 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 at the technical aspects only.

The theoretical minimum for blockchain

Regardless of the programing language, implementation details, there is a theoretical minimum about blockchain that you should be familiar with. Without this understanding, it is impossible to grasp the foundations, and build on. 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 this space, both currently have the highest market cap, and 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 the university. Understanding how these two blockchain technologies will open your mind for the blockchain universe.
Tech books to start with blockchain
 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 but still 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 and covering the 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 fully new technology, but a new combination of existing technologies with human behavior fueled by network effects.

It is worth stating that the popular technologies such as Java, .Net, relational databases are not common in the blockchain space. This space is primarily dominated by C, Go, Rust on the server side, and JavaScript on the client side. But if you know Java, there are a few projects and components written in Java that can be used as a leveraged entry point to the blockchain space.
Assuming you read the above two books, and want to get your hands dirty, here are a few open source blockchain projects written in Java:
Popular Java-based blockchain projects
  • Corda - this is probably the most natural starting point for a Java developer. Corda is 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 - 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 is an intro and a getting started video by its creators.
  • BitcoinJ - 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, Pantheon are examples of a full blockchain node implemented in Java, Web3J is client library written in Java. It is very well documented and active project that makes talking to Ethereum compatible nodes straight forward. I created a 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 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 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.

Cryptocurrencies with Bus Factor of One

The Bus Factor

As defined by Wikipedia, the bus factor is a measurement of the risk resulting from capabilities not being shared among members of an endeavour "in case they get hit by a bus". When looking at cryptocurrencies and trying to predict which one would grow in value and survive the test of time, one risk factor to keep in mind is the bus factor. Let's see some of the most popular cryptocurrencies and their bus factor.

Bitcoin Bus Factor

Let's imagine that the person on the Bus Factor Wikipedia page is the real Satoshi Nakamoto and he is about to be hit by a bus. If such a terrible event happens, since nobody knows who is Satoshi, and more importantly, since he is not any longer involved actively with the bitcoin project, such an event would not affect Bitcoin slightest.

Bus Factor by Wikipedia

Unless Satoshi has shared his private keys for the 980,000 Bitcoins with his grandchildren, the coins would remain locked forever but Bitcoin still would strive until the end of time. Since we cannot name one person as the face of Bitcoin, its Bus Factor is determined by the core team members and the supporting community as a whole. The risk is distributed and much smaller scale.

Ethereum Bust Factor

Now let's imagine the Etehreum founder Vitalik is declared dead. Actually that happent in the past where Etheresum lost 4$ Billion in market value instantly. That forced Vitalik to use PoL (Prove of Liveness) to calm the markets down.
Vitaliks self prove of liveness
Vitalik being the creator and still very actively involved in defining the project vision  increases Ethereum Bus Factor to a solid 1. Meaning, it takes only one bus accident to significantly impact the project.

That is not to suggest that Bitcoin is infinitely decentralised and Ethereum is centralised. Actually, Cornell Professor Emin Gun Sirer proved that Ethereum is more distributed and decentralised than Bitcoin from node distribution point of view. Ethereum nodes are better distributed and spread compared to Bitcoin nodes where the majority are managed by limited large miners.
But from visionary, leadership and influence point of view,  by hiding his/her real identity, Satoshi potentially removed the most centralized point in his decentralized system. Etehreum is the second most popular currency with huge community already that can supports years ahead, but Vitalik still remains the most centralazed point in the Ethereum system.

Bus Factor in Action

Bus Factor is not dictated only by life and death situations. Similar risk hovered over Ethereum also when Vitalik tweeted his views about child porn. But Factor can express itself in so many different unpredictable situations and ways. A recent example that comes to mind is when the founder of ZClassic (ZCL), Rhett Chreighton decided to fork and abandon the project and start Bitcoin Private project. The price chart below is self explanatory for the result of such an action.
ZClassic drops 97%

An example on the opposite site is the creator of Litecoin, Charlie Lee who took a different route, and publicly announced that he sold all of his Litecoin, to remain impartial to the project. He is basically an evangelist for Litecoin now who tries to make the project to survive without him.

Personality Cult Coins

There are other examples where a coin has the market cap close to the budget of a small country and that is primarily driven by a project founder or advisor. The common pattern to be aware is, when there is 1 to 1 association between a project and a single person, which is an indication of a bus factor of 1.
A recent tweet by Kevin Pham pointed out coins that are driven by a single person. Expanding that list, I came to the following one:
Notice the people listed here have a much bigger influence on their project than a developer would have. Most of the people listed here are typically the visionary, the face, the blood and the flesh of the coins. It is a risk much bigger than a bus factor which is typically measuring the dependency of projects to a software developer or sys admin role.

Surviving Bus Accidents

I've been working with open source over a decade now and there are good lessons to learn from Apache Software Foundation (ASF) and other open source foundations about creating long living project ecosystems. The main criteria at ASF for a project to graduate from incubation to a top level project is when it builds a self sustaining community. That is a diverse community (from multiple organizations) of committers, contributors and users. There is a similar criteria at Cloud Native Computing Foundation (CNCF) where the focus on supporting organizations rather than supporting individuals as in ASF. Ideally, you want senior developers and visionaries from multiple organizations and independent contributors all together.

In the crypto world, one of the primary criteria to measure community is the number of telegram/twitter/reddit followers . While that is an indication of a user interest, it can be easily manipulated, and actually it is a common and mandatory practise nowdays to pump these statistics through bounty programs and airdrops by project themselves. On the other hand growing the develop community and project visionaries is much harder and takes longer and it is a more accurate indicator for long term success. Make your picks wisely

Upvote this article on Steemit.

Find Me Online