Introduction to Blockchain application development

Source: Internet
Author: User
Tags hyperledger fabric

Blockchain technology is now very hot, not only for financiers and venture capital to flock to, and now has been sown in many fields everywhere. As an entrepreneur with sharp tentacles, do you want to integrate blockchain into your existing applications, and as an IT technical engineer, are you eager to practice a hand based on blockchain to avoid being eliminated by new technology in the future? However, blockchain involves a variety of technologies, such as cryptography and peer-to-peer technology, the blockchain technology is numerous, fresh concepts emerge, on the other hand, the development of blockchain technology in the world is still in the early stage, a variety of technical solutions and applications need to further explore and improve, resulting in many people want to use the blockchain, Can not find a breakthrough, should learn what knowledge and technology, should use what kind of blockchain.

As far as blockchain technology is concerned, Elwin is only a new driver, but I still try to share with the blockchain interested engineers the experience of getting started with blockchain application development from the perspective of a development engineer.

For most of us, the goal of using and developing blockchain is not to really recreate a blockchain ourselves, but to develop our own applications based on existing blockchain underlying or technical frameworks. Therefore, we only need a basic understanding of similar encryption algorithm, peer-to-peer technology, consensus algorithm, and so on, we do not need to go into the study. The primary goal of our introductory blockchain application development is to find a relatively mature blockchain base to do our application development, and secondly, this blockchain needs to support a strong and easy to use development interface or development framework, in addition, this blockchain bottom if you want to consider the real commercial, There are also some blockchain specifications that need to be met, such as extensibility, fuel costs, transaction frequency, and so on.

In this two-point goal, Elwin traveled to the ends of the Earth, the final selection of several blockchain to meet the requirements of the bottom platform for your reference:

First, Bitcoin

The earliest blockchain development was based on the Bitcoin blockchain network, which is the world's most widely used and truly central hub, and Bitcoin is the most powerful anchor in the world for blockchain applications, with the greatest authority. As a result, there are a lot of blockchain technologies around Bitcoin that are not described here, only for introductory level development.

The development of blockchain network based on Bitcoin is presented in two ways, a relatively simple, Blockchain.info based API. Blockchain.info is Bitcoin's most popular Bitcoin wallet and chunk search site, while also providing bitcoin and its chunk-related APIs. Blockchain.info provides a wide range of API libraries for mainstream languages, including bitcoin wallets, payments, chunks, transaction data, market data, and more.

The installation and use of Blockchain.info API is simple, first your machine needs to have node environment, in the Blockchain.info application Interface Authorization code, install Blockchain Wallet API Service program, You can start configuring and testing the Blockchain Wallet API service, and for further development, you can choose the Client Support library that installs the API based on your development language.

For further exploration, a Docker container can be used to quickly install and configure a private node's bitcoin test Network (bitcoin-testnet) as a development test environment, which allows for a deeper understanding, debugging, and use of the Bitcoin blockchain network. In bitcoin wiki page, provide many languages can call Bitcoin RPC, we choose the appropriate language specific to test, of course, Elwin still recommend you use Nodejs.

The process is to download the Docker image of the Bitcoin test network, run the Docker image and start the Bitcoin test network, initialize and test the blockchain data, and, of course, dig up the reserves for testing. Then, after installing the RPC Support library for the relevant development language, you can debug your blockchain program.

Second, Ether Square

It can be said that in addition to Bitcoin, Ethereum is currently the most eye-catching in the blockchain platform. Ethereum is a full-fledged blockchain one-stop development platform that implements protocols in a variety of programming languages, using the Go language client as the default client (i.e., the method of interacting with the Ethereum network, which supports clients in many other languages).

The application based on the Ethereum platform is the smart contract, which is the core of Ethereum. Each smart contract has a unique ethereum address, which is activated when the user sends a transaction to the address of the contract (this time consumes fuel, that is, the fee), and then, based on the additional information in the transaction, the contract runs its own code and finally returns a result. The Ethereum community called the application based on smart contracts a decentralized app, with a friendly interface and some extra stuff, in contrast to the cold, smart contract code, with a full-fledged language, Allows users to build a variety of DAPP applications based on contracts, in fact, in the Ethereum app Pavilion, there are already large and small 280 dapp applications in the display (although only a part of the application is actually running).

There are several languages available to write the smart contract for Ethereum, there are JavaScript-like Solidity,python close to the serpent, there are classes of Lisp lll, the current mainstream is solidity, recommend everyone to use. Once the solidity contract is compiled and sent to the network, you can test and use the smart contract through Ethereum's mist client, or you can use the Ethereum web3.js JavaScript API to invoke it and build a Web application that interacts with it.

Thanks to Ethereum's popularity, many communities have created more convenient DAPP development frameworks and tools, including Truffle, Embark, Meteor, and blockapps.net APIs so you can quickly develop your dapp. My other article, "Microsoft's Blockchain cloud services," mentions that the embark and blockapps.net two blockchain tools have been integrated into the Microsoft Azure Baas service. In these frameworks and tools, Elwin is more recommended embark, which is very simple to use.

Through Ethereum, you can either build on your own private chain, or you can build alliances with partners, or directly deploy the application in the Ethereum public network, Elwin to spit, the use of Ethereum gas cost is getting higher, for the Internet application, is to build their own Ethernet blockchain, Or the use of an Ethernet public network is a real dilemma (Ethereum claims that the price of ethereum fuel should fall proportionally when the ether price rises, but it doesn't seem to be the case).

A few main introductory steps to give you a brief introduction, first you can install Ethereum Wallet client Ethereum Wallet, experience the Ethereum wallet and smart contract, you can choose a public network or test network (if you do not or do not want to spend the ether currency). If you are already familiar with this, well, go straight to the point, get ready for Geth and node, install the Ethereum mist Client (This is for testing your smart contract and DAPP), configure and launch Geth (Geth and ETH related parameters article, please refer to the official website documentation), Usually I will first use Geth to build their own private chain to test, Geth start, you can first in the mist client familiar with the smart contract and solidity language (remember to dig in the Geth console, otherwise there is no etheric currency to test), Then try your first dapp based on a few examples from the official website. After you get started, you can try using Web3.js to invoke, or install truffle or embark directly to develop your own real dapp application.

Third, IBM HyperLedger

IBM HyperLedger is also called fabric, his goal is to create a whole society to co-maintain a super ledger, fabric from IBM, the original intention in order to serve industrial production, IBM will open 44,000 lines of code, is a great contribution to So we can have the opportunity to explore the principle of blockchain that is different from Bitcoin. As far as Elwin is aware, the fabric has not yet entered the real commercial phase, more experimentation and exploration, but compared to many other blockchain, from the technical bottom pendant He is more credible and reliable.

There are two ways to make blockchain development based on Hyperledger, which is based on the hyper-energy cloud (an ultra-cloud platform developed by the IBM China Research Institute, which provides a variety of cloud services), and he gives blockchain enthusiasts, developers a blockchain development test environment, through the hyper-cloud platform, users can free, Super-Fast create multi-node blockchain based on Hyperledger fabric and debug smart contracts on your own chain. The Hyperledger fabric contract is based on the go language and is easy to get started with.

According to Elwin, it seems that the hyper-cloud blockchain is only suitable for research testing, to be truly operational, or to build a fabric blockchain network. There are several ways to install and run Hyperledge fabric, and it is recommended to download the Docker image of the fabric blockchain network, run the Docker image, and start the fabric blockchain network, but with respect to Bitcoin and Ethereum, The architecture and installation of the fabric network is relatively complex, and in addition to the Blockchain service, additional installations are required to run the validating peer and Certificate Authority (CA) services. When you're done, you'll need to register and register your authorization before you can debug and use it through the CLI or rest API. The smart contracts are written in the same way as the hyper-cloud blockchain cloud service. In addition, in addition to the CLI or rest API,IBM also provides the GRPC API and SDK for the way the application is developed.

Iv. Lisk

Lisk is a new generation of blockchain platforms that allow the development of JavaScript (again JavaScript technology, engineers attention) and distributed-based decentralized applications to use an easy-to-use, fully functional ecosystem of blockchain systems.

Elwin feels that the lisk is not only the first application solution to be centralized in JavaScript, but also that he adds each application to the individual side chain of the lisk, as opposed to the bottom of several blockchain. With Bitcoin and ethereum friends know that because Bitcoin and Ethereum have only one main chain, all the functions and data added to this main chain caused the rapid expansion of chunks, large chunk volume, ultra-long synchronization time, this is a very painful experience. The side-chain mode of Lisk provides a method for solving the problem of network congestion under high transaction volume, and the user only needs to download the corresponding side chain when the relevant application is used, which greatly reduces the invalid synchronization data, and maintains the efficient operation of the whole Lisk network, and The speed of the Lisk network will continue to accelerate over time, and the more it shows his particular advantage.

Second, the Lisk blockchain is not built to create smart contracts, but instead uses the Lisk App SDK framework to develop different applications and features, rather than blockchain and hyperledge fabric, which are based on smart contract-centric chunks.

The main development language of the Lisk app is that the Nodejs,web developer can develop both the backend of the application and the front end. By using the Lisk App SDK package, Web developers can easily create blockchain applications. The development of the Lisk app is also relatively simple, similar to the development of other NODEJS applications you have previously. However, as with Bitcoin and Ethereum, the use of Lisk is also to consume fuel costs, fortunately, as with other blockchain bottom network, Lisk also has testnet mode.

If you want to learn more about ethereum dapp development, you will have access to the most popular online interactive tutorials offered by the Wisdom Network: Ethereum Dapp for beginners in blockchain blockchain +ipfs+node.js+mongodb+ Express to Central Ethereum e-Commerce application development Practical

Additional content can also be accessed from this Ethereum blog.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.