Mastering Hyperledger fabric
Master the art of Hyperledger Fabric on Kubernetes
Author
Narendranath Reddy Thota
Blockchain Software Engineer
Consensys, Dubai
Who this Book is For
This Book benefits Software Engineers who are ready to shift their focus to distributed technologies and Blockchain. This book provides a comprehensive view of Solution Architecture, so it will be easy for architects to architect their solution. CTOs around the world want to add hyperledger fabric to their technology stack. Managers to cope up with the latest trend. Faculty Professors in order to get industry insights. Even Engineering Students who want to be ready with the latest technologies.
Book Description
Mastering Hyperledger Fabric is a craving topic for all Hyperledger Fabric Developers around the world. Hyperledger Fabric is an open-source project that helps organizations create and maintain permissioned distributed Blockchain consortiums. This book is for readers who are looking for Hyperledger offerings to build end-to-end projects with growing complexity and functionalities. This book will be a one-stop solution for all developers who want to build blockchain consortiums using Hyperledger Fabric. Topics includes TLS, Unix sockets, caliper(Benchmark tool), raft consensus, advanced chaincode development, key collision and MVCC, chaincode access controls, chaincode encryption, node.js SDK, golang SDK, docker daemon API, private data concepts, onboarding organizations using node.js SDK, deploy hyperledger fabric using Kubernetes, deploy hyperledger fabric using docker swarm, monitoring hyperledger fabric, monitoring Kubernetes, monitoring docker swarm, logging hyperledger fabric. After reading this book the reader will be able to set up Production grade hyperledger fabric consortium using raft consensus mechanisms with monitoring using Prometheus and grafana, even logging. This book explains so many key concepts of hyperledger fabric including 2.0 and written with three years of hyperledger fabric production experience.
Preface
The Main goal of this book is to provide a one stop solution for all implementations related to Hyperledger fabric projects. This book covered a variety of technologies such as docker, docker swarm, kubernetes, elk stack, prometheus, grafana, TLS, sockets, Raft, NodeJS, etc and a variety of implementations such as caliper, logging, monitoring, and three diverse use cases. The content in this book helps developers to complete their solutions around Hyperledger Fabric. After reading this book readers will be able to develop production grade projects around Hyperledger fabric with different container orchestrator tools.
It is recommended that readers have a basic understanding of programming experience, docker, Node.js and introduction to Hyperledger fabric, kubernetes in order to benefit fully from this book.
What this book covers
Chapter1: Introduction to the Hyperledger Landscape
Chapter2: The Disruptive Potential of TLS
Chapter3: All about docker sockets
Chapter4: Installation Guide Of Prerequisites
Chapter5: All about fabric CLI
Chapter6: All about SDK's (go lang and Node.js)
Chapter7: Advanced Chaincode Development
Chapter8: End to End with Solo consensus using docker with one use case
Chapter9: End to End with Kafka consensus using docker swarm with one use case
Chapter10: End to End with Raft consensus using Kubernetes with one use case
Chapter11: Private Data Concepts, Consortium level ACL(Access Control Lists) and raft consensus mechanism
Chapter12: Setup and Benchmark Blockchain Consortium Using Caliper
Chapter13: Monitoring Consortium with Prometheus and grafana
Chapter14: Logging Consortium with ELK Stack
Chapter15: Glimpse of Hyperledger fabric 2.0
Chapter16: Some Interesting tools
Table of Content s
Chapter1: Introduction to the Hyperledger Landscape
Hyperledger is undoubtedly a unique platform that allows enterprises to build permissioned ways of distributed ledger frameworks. Using hyperledger, developing blockchain frameworks in a disruptive way is never a nightmare for enterprises. Enterprise use cases require capabilities such as scalability, high throughput, built-in or inter-operable identity modules and different levels of access controls for the parties involved in the consortium. Design Access controls in such a way that it must allow regulators to access ledger data as read-only to ensure compliance. According to the business requirement, one can onboard any organization at any time, at the same time one can deboard at any time. Likewise, blockchain networks should also behave accordingly. We will definitely boost our knowledge by looking into industry level ways of setting up the consortium and some innovative use cases in the coming chapters.
In this chapter, we will cover the following topics:
Welcome to the distributed world
The Hyperledger greenhouse
Fabric Terminology - A Quick Review
Glimpse of Container Orchestration
Welcome to the distributed world
Over the past decades, ever-widening technological expansion is a nightmare because of many reasons. But we are in a high-tech era where we can observe lots of changes and many innovations happening in the computer science space. The world is amazing, ever amazing so-called distributed systems are becoming very popular. It is a fact that distributed systems are always a huge pitfalls and landmines zone in the computer science subject. Wait, before thinking about distributed systems, take a long breath and look back to those days of computer science technologies and architectures.
We all know that when operating systems were invented, it was only supporting single- process computing resources. It's like a life cycle starting from booting up machines, loading a program ( which is written on cards ) and executing a program, after stipulated time it goes to shut down state. Engineers were super smart and have been contributing to the innovation ecosystem which leads to the multitasking operating systems. Soon the world has completely adopted the multitasking paradigm for so many decades. This disruption is usually referred to as host-based Computers, later used to call as mini computers. Discussion on Computer science History never completes without having a discussion on mainframes, Users run their programs from gigantic terminals inside terminal rooms which display generated output from the keyboard.
Source: wikipedia.org
Enough time spent in the spaceship let us come back to the present world and compare with present computer science technologies and architectures, we can easily identify a huge variation between the centralized systems so-called centralization and subsequently distributed systems. We have distributed - (computing, protocols, power, infrastructure, file systems, data stores, processing, messaging, applications, ledger, storage) and even code also yes, you heard correct we have distributed video coding, distributed source coding etc, the best example of distributed processing is LAN our local area network. We started with centralized systems and now we are in a distributed & decentralized era.
The world is amazing to us at every stage, every moment with amazing innovations. With the advance of personal computing resources and private peer to peer networking, typical computational capabilities were now equipped both at the client side meaning that user interface side, as well as the server side. By this it gave rise to the traditional 'client-server' architecture, soon this architecture has been promoting the development of relational & non-relational database systems to store the data permanently on a disk. In the client-server architecture, if we want to persist data for a long time then we have to take the help of any databases such as MongoDB, CouchDB etc. these databases present on one node, whenever you want to create/query data in it, you access to that node directly.