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

Blockchain versus distributed ledger technology versus distributed databases

There have been several debates on how to differentiate blockchains from Distributed Ledger Technology (DLT) and distributed databases. Based on some of the user- and application-level features and heuristics, we can observe the following differences:




Distributed Database


The information persisted in blockchains cannot be removed or updated without a new identifier to the target data.

Although most DLTs are pro-immutability, there are a few exceptions where immutability is not a design constraint.

Most distributed databases are not immutable due to design limitations.

Logical execution

Smart contracts can be used to enforce business logic on data from a blockchain.

DLTs offer the execution of logic on the data within them, as well as on user inputs.

User-defined functions and stored procedures are normal approaches that are used here.


Data in a public blockchain is stored in the form of a transaction or account states in a block and is visible and accessible with middleware.

Data is private in a DLT and may, in some cases, be encrypted in the DLT entry. Data can only be accessed by participating stakeholders.

Data is persisted within the distributed data clusters spread across the globe for faster access, using traditional client-server techniques.


All the transactions are verified before a change is made to the state of an account.

Most DLTs do not offer verification algorithms or modules as a design restriction to applications.

The verifiability of data is not offered as the state of accounts is not persisted in a specific structure.


Most blockchains use several economic models to incentivize their stakeholders.

Stakeholders in a DLT group host the nodes and are self-incentivized to run their business more confidently.

The company manages the data for sustainability and so no extra incentivization can be observed.

Let's now compare these technologies with an example use case discussed in the following section.

Comparing the technologies with examples

The following scenario is provided to aid your understanding of the core differences between the preceding three implementations.

Imagine that you plan to create a new digital platform for stock photography. If you want to invite photographers all over the world to use the platform and allow them to upload their work and be incentivized with their royalties automatically paid off by the consumers, you'd want to use blockchain to offer public access and incentivization and to transfer the royalties directly from the consumer to the photographer, thereby eliminating the need for a third party performing the duty payment collection, guaranteeing the return of royalties but with a service fee.

However, if you want your platform to form a private consortium of photographers, with their art exclusively available to a limited audience, and to handle royalties in conjunction with other means, you would use a DLT.

Finally, if you intend to use your platform to exhibit art by an eligible set of photographers that are accessible across the globe, with or without royalties (which is handled offline), you'd form a cluster of nodes that host this data and logic to handle access and payments. So, you would use distributed databases.

Let's now further discuss the types of blockchains available for different use cases.