Reader small image

You're reading from  Practical Artificial Intelligence and Blockchain

Product typeBook
Published inJul 2020
PublisherPackt
ISBN-139781838822293
Edition1st Edition
Concepts
Right arrow
Author (1)
Ganesh Prasad Kumble
Ganesh Prasad Kumble
author image
Ganesh Prasad Kumble

Ganesh Prasad Kumble is an expert in emerging technologies and business strategy. He has co-founded, bootstrapped, and mentored several start-ups and initiatives across SaaS, e-commerce, IoT, Blockchain, and AI. He is a contributor to several open source projects, including Ethereum and IPFS. He authored TEXA in 2017 - an ethical AI initiative based on the Turing test that is used to safely assess multi-context robots and AI models in a quantifiable manner. He is currently leading platform innovation efforts at Aicumen Technologies, Inc. and KIP Foundation, building a general-purpose business protocol featuring identity management, third-party services, distributed compute, and immutable storage. Ganesh is also a moderator at the Ethereum Research forum.
Read more about Ganesh Prasad Kumble

Right arrow
Development Life Cycle of a DIApp
“Fast. Good. Cheap. Choose any two.
- Unknown; used by many software project managers

In this chapter, we will explore a broad set of new patterns that can be used in the Software Development Life Cycle (SDLC) of blockchain and AI-enabled applications. It will help you to build modern applications addressing the problems faced by various industries discussed in the previous chapters. Before introducing the SDLC aspects, we will also compare traditional blockchain applications with the next wave of intelligent decentralized applications. We will also explore the architectural aspects of the new types of applications that can be built under the revised SDLC.

In this chapter, we will cover the following topics:

  • Applying SDLC practices in blockchains
  • Introduction to DIApps
  • Comparing DIApps and DApps
  • Designing a DIApp
  • Developing a DIApp...

Technical requirements

This chapter requires you to be capable of analyzing the benefits of the application of AI techniques along with the application of blockchain technology in the software development process across several application domains.

Applying SDLC practices in blockchains

With more than 10 years since the advent of blockchain technology, there is a need for newer emerging patterns that can apply blockchain technology and AI techniques to address the growing demands from the ever-expanding internet, and effectively manage the software development practices across various industry verticals.

Let's now explore all the major aspects of SDLC step by step in the following sections.

Ideation to productization

Many ideas for building new applications on top of blockchain exist. However, fewer ideas are converted into designs. Although efforts are made to design decentralized applications, only a few designs are practical enough for the real world. This is due to the mismatch between product expectations and the readiness of technology at the developer’s disposal. In some cases, the technology and features may become available, but they may not be supported well enough due to the recent and unstable growth of these...

Introduction to DIApps

Before understanding what we mean by a DIApp, let's first understand what a decentralized application really is. Decentralized applications or dApps (also written as DApp or Dapp) are user applications that run on a platform hosted by a number of nodes in a distributed manner. DApps emerged as a solution architecture on top of blockchains wherein custom business logic could be programmed in a particular language of support. Once the logic is interpreted into code, we deploy this code on the respective blockchain platforms. Once the logic is deployed on the platform, we further integrate the logical program with frontend applications for user interactions.

In contrast to DApps, a Decentralized Intelligent Application (DIApp) is an enhanced pattern of a DApp that facilitates the application of AI wherever applicable, on top of a blockchain platform, in a much more robust manner that provides value to all stakeholders. Although the concept of slapping AI on top...

Comparing DIApps and DApps

In this section, we will outline the issues faced by enterprises in developing and using DApps. Further, we will outline the solution architecture of both the DApp and DIApp patterns in the enterprise scenario and outline the key differences.

Challenges in the enterprise

Although several blockchain platforms represented new waves of experimental approaches, most of these approaches radically focused on the full disintermediation of all the entities involved in a business process, thereby making the solutions purely peer-to-peer. The reason for the full disintermediation in most of the emerging patterns is due to the maximalist nature of blockchain to decentralize the world. In contrast to this ideology, enterprise solutions fundamentally rely on maintaining accountability among key stakeholders without full disintermediation. Hence, there is a need for an enhanced pattern that is fit for adoption by enterprises.

Solution architecture of a DApp

The solution architecture...

Designing a DIApp

The design aspects of DIApps have been often considered to be somewhat challenging and dictated by the technical complications introduced in the constant waves of change seen in almost all blockchain platforms. It is also a common perception that the solution space lacks a common structure to define key components, resulting in an inconsistent design strategy for applications.

For example, the tools required by the user of an Ethereum-based DIApp are very distinct from that of Hyperledger Fabric, and subsequently, that of EOS. This is due to the distinct design of the respective blockchain’s UI/UX framework, which is deeply dependent on its own design paradigms. Hence, it is important to identify the design constraints of the application before commencing the future steps.

Before carving out a design for the DIApp, we must understand the research efforts explained in the following section.

Research

Before choosing which blockchain technology or platform you will...

Developing a DIApp

The development of a DIApp can be tricky. Since AI and blockchain are yet to see the limelight in development, some practices in the industry are not yet visible to all. In this section, we will highlight the key development aspects of a DIApp.

Before exploring the technical aspects, let's understand a fundamental aspect of development capabilities in an organization. As blockchain and AI are on the bleeding edge of innovation, it is an open truth that many organizations are still in the process of building combined expertise in the respective technologies. Having said that, it is also essential to set up a team of members with complementary skill sets in smart contract development, web or mobile application development, and finally AI or data science modeling. The following section provides an overview of an ideal DIApp team.

Team formation

In a corporate setup, I recommend the following team format for proof of concept development. It is assumed that the team...

Testing a DIApp

Since these applications will most likely manage high-value assets and sensitive information, testing DIApps is a crucial step in the process before and after the deployment of all the modules in the network. Ensuring the correctness and lasting service of the application is critical for businesses and hence, it is a very important aspect of the development life cycle to bring back rigorous testing practices into the process.

Let's now go through the key highlights of the testing and deployment processes for a DIApp.

Authoring the test cases

Before the software can be deployed, we can try to ensure the correctness of the software and also confirm the fitness of the runtime environment by running a few crucial tests. Usually, these tests are implemented within the source code, in the form of unit test files containing dummy input values being passed to the functions, later checked through assertion to ensure the correctness of the software in the relatively new environment...

Deploying a DIApp

In this section, we will discuss the common practices for deploying blockchain-based applications in hybrid environments. Unlike other emerging technologies, blockchain platforms demand a relatively larger stretch of time to set up the network and make the whole ecosystem functional. Accordingly, several blockchain platforms have understood the need for DevOps as an integral part of developing those platforms. Hence, it is also important to note that DevOps knowledge is also essential in using these platforms for developing applications and deploying solutions.

Scaling the application for production

Deployment of the DIApp is the final crucial step in the life cycle. Apart from correctness, it is imperative that the application is designed, architected, and developed in a manner supportive for the deployment of the application in a scalable manner. The scale is not only measured in terms of the number of users, but also depends on the cost, form factors, and other economic...

Monitoring a DIApp

In this section, we will discuss the common practices used by many to monitor transactions of applications in blockchains.

Explorers

Most of the decentralized solutions are deployed on a public blockchain network or digital ledger. In most of the public networks, blockchain explorers are available to look up information concerning a transaction or block. However, if the DIApp solution is implemented in a private or permissioned environment, these public blockchain explorers may not be able to provide information on transactions belonging to a private network or private ledgers. Hence, we must be able to deploy existing blockchain explorers and plug them into the endpoints of a private service. This is the only way to facilitate users' monitoring of their transactions in a private environment. Several open source implementations of blockchain explorers are available, which could be downloaded and connected to private services.

Some examples of public blockchain...

Summary

In this chapter, we explored the basic definition of a DApp and a DIApp. We also contrasted both the solution architectures and design patterns of these two technologies. Based on the advantages of DIApps, we further explored the SDLC aspects of DIApps from ideation to release or deployment. The new economy of blockchain and AI requires a redefined SDLC that is inclusive of the new technologies involved. We have outlined the steps and processes to be considered before developing a DIApp.

In the next chapter, we will focus on applying the development aspects of the SDLC by developing sample applications on various blockchain platforms, along with common AI techniques.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Practical Artificial Intelligence and Blockchain
Published in: Jul 2020Publisher: PacktISBN-13: 9781838822293
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Ganesh Prasad Kumble

Ganesh Prasad Kumble is an expert in emerging technologies and business strategy. He has co-founded, bootstrapped, and mentored several start-ups and initiatives across SaaS, e-commerce, IoT, Blockchain, and AI. He is a contributor to several open source projects, including Ethereum and IPFS. He authored TEXA in 2017 - an ethical AI initiative based on the Turing test that is used to safely assess multi-context robots and AI models in a quantifiable manner. He is currently leading platform innovation efforts at Aicumen Technologies, Inc. and KIP Foundation, building a general-purpose business protocol featuring identity management, third-party services, distributed compute, and immutable storage. Ganesh is also a moderator at the Ethereum Research forum.
Read more about Ganesh Prasad Kumble