Book Image

Practical Artificial Intelligence and Blockchain

By : Ganesh Prasad Kumble
Book Image

Practical Artificial Intelligence and Blockchain

By: Ganesh Prasad Kumble

Overview of this book

AI and blockchain are two emerging technologies catalyzing the pace of enterprise innovation. With this book, you’ll understand both technologies and converge them to solve real-world challenges. This AI blockchain book is divided into three sections. The first section covers the fundamentals of blockchain, AI, and affiliated technologies, where you’ll learn to differentiate between the various implementations of blockchains and AI with the help of examples. The second section takes you through domain-specific applications of AI and blockchain. You’ll understand the basics of decentralized databases and file systems and connect the dots between AI and blockchain before exploring products and solutions that use them together. You’ll then discover applications of AI techniques in crypto trading. In the third section, you’ll be introduced to the DIApp design pattern and compare it with the DApp design pattern. The book also highlights unique aspects of SDLC (software development lifecycle) when building a DIApp, shows you how to implement a sample contact tracing application, and delves into the future of AI with blockchain. By the end of this book, you’ll have developed the skills you need to converge AI and blockchain technologies to build smart solutions using the DIApp design pattern.
Table of Contents (15 chapters)
Section 1: Overview of Blockchain Technology
Section 2: Blockchain and Artificial Intelligence
Section 3: Developing Blockchain Products

Building DApps with blockchain tools

One of the main causes of the mainstream adoption of blockchain is the developer-led wave of evangelism for the technology. This has been observed in the form of frameworks and tools at developer's disposal. In the following section, we will go through the various tools and platforms that are available for public consumption to build blockchain-based software solutions.

Blockchain toolchains and frameworks

The following list introduces several blockchain toolchains and frameworks that are popular with both developers and the associated solution community:

  • Truffle: The Truffle framework was developed by ConsenSys as an open source project, offering a pipeline for the development, testing, and deployment of smart contracts targeted on the EVM.
  • Embark: The Embark framework was developed by Status as an open source project, offering a debugging and integration environment for Ethereum smart contract developers. Notably, Embark offers tighter integration with IPFS for the decentralized storage of contract data.
  • Hyperledger Composer: This is an open source effort from the Linux Foundation, which offers tools to assist developers with converting requirements into proof of concept for the DevOps process, for spinning a new network as required.
  • MetaMask: This is a middleware that bridges an application running in the browser with the Ethereum blockchain. It is an open source initiative supported and consumed widely by all Ethereum developers. Users can perform transactions in a web application through MetaMask.
  • Ethers.js: This is a JavaScript-based library with full implementation of the Ethereum wallet as per the specification. Developers use this open source library to create user wallets, perform transactions, and much more. This library is also well known for its recent support for Ethereum Name Service (ENS).
  • Nethereum: This is an open source library used to build Ethereum-based blockchain solutions in .NET environments. Nethereum offers .NET developers an SDK called NuGet, which is integrated into the Visual Studio Integrated Development Environment (IDE) for using web3 functionalities across web and mobile applications.

Next, let us look into developing smart with IDEs and plugins.

Developing smart contracts using IDEs and plugins

Traditional software developers are more familiar and comfortable with working in IDEs, and the vibrant developer communities of blockchain have considered this. In the following section, we will observe a few famous web-based IDEs and plugins available for standalone IDEs.

The Remix IDE

Remix has been the de facto IDE for smart contract development and deployment. This open source IDE is used by developers who are interested in developing, debugging, and deploying solidity smart contracts for Ethereum network. Notably, this IDE works well with private networks and offers regular updates.

The EthFiddle IDE

EthFiddle is an open source initiative by Loom Network to facilitate code experimentation online and provides the ability to share experimental code snippets of solidity smart contracts among developers for easier collaboration.

The YAKINDU plugin for Eclipse

Several enterprise developers have yearned for plugins for current IDEs, and this plugin offers just that. YAKINDU offers basic syntax highlighting and other common language package features for solidity smart contract development in the Eclipse IDE.

The Solidity plugin for Visual Studio Code

This plugin can be installed on Visual Studio Code, one of the most used IDEs. It boasts to be one of the leading plugins used for solidity smart contract development.

The Etheratom plugin for Visual Studio Code

Etheratom is a plugin available for GitHub's Atom editor, offering IDE features such as syntax highlighting, including a deployment interface to a local Ethereum node. It uses web3.js to interact with a local Ethereum node.