Blockchain with Hyperledger Fabric
eBook - ePub

Blockchain with Hyperledger Fabric

Build decentralized applications using Hyperledger Fabric 2, 2nd Edition

Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman Baset

  1. 756 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Blockchain with Hyperledger Fabric

Build decentralized applications using Hyperledger Fabric 2, 2nd Edition

Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman Baset

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Learn to develop blockchain-based distributed ledgers and deploy a Hyperledger Fabric network with concrete exercises and examples

Key Features

  • Updated with the latest features and additions that come with Hyperledger Fabric 2
  • Write your own smart contracts and services using Java and JavaScript on a Hyperledger Fabric network
  • Dive into real-world blockchain challenges such as integration and scalability

Book Description

Blockchain with Hyperledger Fabric - Second Edition is a refreshed and extended version of the successful book on practical Hyperledger Fabric blockchain development. This edition includes many new chapters, alongside comprehensive updates and additions to the existing ones. Entirely reworked for Hyperledger Fabric version 2, this edition will bring you right up to date with the latest in blockchain. Using a real-world Trade Finance and Logistics example, with working code available on GitHub, you'll really understand both how and why Hyperledger Fabric can be used to maximum effect. This book is your comprehensive guide and reference to explore and build blockchain networks using Hyperledger Fabric version 2.

This edition of the book begins by outlining the evolution of blockchain, including an overview of relevant blockchain technologies. Starting from first principles, you'll learn how to design and operate a permissioned blockchain network based on Hyperledger Fabric version 2. You will learn how to configure the main architectural components of a permissioned blockchain network including Peers, Orderers, Certificate Authorities, Channels, and Policies. You'll then learn how to design, develop, package, and deploy smart contracts, and how they are subsequently used by applications. This edition also contains chapters on DevOps, blockchain governance, and security, making this your go-to book for Hyperledger Fabric version 2.

What you will learn

  • Discover why blockchain is a technology and business game changer
  • Set up blockchain networks using Hyperledger Fabric version 2
  • Understand how to create decentralized applications
  • Learn how to integrate blockchains with existing systems
  • Write smart contracts and services quickly with Hyperledger Fabric and Visual Studio Code
  • Design transaction models and smart contracts with Java, JavaScript, TypeScript, and Golang
  • Deploy REST gateways to access smart contracts and understand how wallets maintain user identities for access control
  • Maintain, monitor, and govern your blockchain solutions

Who this book is for

This book is designed in such a way that professionals from different areas including business leaders, technology leaders, blockchain application developers, and even beginners can benefit from it.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Blockchain with Hyperledger Fabric è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Blockchain with Hyperledger Fabric di Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman Baset in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Cryptography. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2020
ISBN
9781839216176
Edizione
2
Categoria
Cryptography

9

Network Operation and Distributed Application Building

In previous chapters, we established the foundations of a business network and application spanning multiple organizations and stakeholders:
  • In Chapter 4, Setting the Stage with a Business Scenario, we configured and ran a barebones trade network from a set of specifications
  • In Chapter 5, Designing Smart Contract Transactions and Ledger Data Structure, we built the core of a blockchain application in the form of a set of smart contracts that directly read and manipulate the ledgers that are the systems-of-record for your network
The bulk of the configuration and application logic development is done, but our task is far from finished.
As you can imagine, the contracts, which act on data used by multiple organizations, are sensitive pieces of code that ought to be accessible only via safe channels with built-in protections against misuse. Therefore, it is standard practice among blockchain developers to layer one or more applications above the contracts, exposing the contracts' capabilities in ways that provide adequate security and privacy safeguards. These applications, unlike smart contracts, can be engineered as typical enterprise applications using well-known technology stacks. They can also be integrated with existing enterprise applications used by organizations that participate in blockchain networks.
Unlike a smart contract, which acts on a shared backing store (ledger) whose state is held in consensus by network participants, the higher-layer enterprise applications don't necessarily have to act on behalf of the entire network. In fact, the various organizations and stakeholders within them may have unique and specific business logic requirements, requiring the development of different applications serving selected clientele. Therefore, a single blockchain network may end up exposing different ledger views and contract capabilities to different stakeholders. Further, these applications may run in enterprise security domains maintained independently by the different organizations. Collectively, though, the set of smart contracts and higher-layer applications can be viewed as a distributed application acting on a common data storage layer.
In this chapter:
  • We will learn how to build and operate a distributed Fabric application for the business entities that participate in our trade scenario:
    • We will recap the Hyperledger Fabric ledger setup and transaction pipelines
    • We will show how each step is performed using code and configuration samples
  • At the end of this process, you will understand how to:
    • Bootstrap network ledgers
    • Install contracts
    • Engineer applications as web services that can be exercised by users through commands on a terminal or from a web browser
  • We will learn how to build a production-grade ordering service that generates transaction blocks by consensus of a cluster of nodes running the Raft protocol
We will begin this chapter by discussing the nature of a multi-layered distributed Fabric application: first in generic terms, and subsequently using our trade scenario as an example. Later, we will demonstrate how to develop and bootstrap such an application to enable our trade scenario.

Stages in a Fabric network's life cycle

Before we dive into the details of application-building, it is important to first gain a broader perspective on how a Fabric network is created and bootstrapped in readiness for deploying and running applications, and what streams of developmental activities must be undertaken. Figure 9.1 illustrates these stages and activities from the perspectives of three groups of subjects: operators and maintainers, developers, and users:
  • Network setup and bootstrapping activities are classified into operations, which is the responsibility of network operators designated by their respective organizations or by the consortium. Operators will also typically oversee DevOps.
  • Development, which involves designing, writing, and testing application code, can occur before or concurrently with operations. The developers responsible for this are typically distinct from operators and do not need to know operational details, though they need to know the organizational and channel structure to write proper code.
  • Finally, the exercising of the applications' business logic is classified into runtime activities, and this is done by members and clients of the enterprises that belong to the network consortium.
Figure 9.1: A Fabric network's life cycle categorized into operational, developmental, and runtime stages
The operations stage (steps 1 to 4 in Figure 9.1) begins with the process of starting up individual components of a network (step 1), namely the peers belonging to designated organizations that share channel ledgers, ordering nodes (typically) belonging to their separate organizations, and nodes running Fabric CA servers and acting as CAs for their respective organizations. We demonstrated this process in Chapter 4, Setting the Stage with a Business Scenario.
Next, we set up channels and associate each network peer with one or more channels (step 2). We walked through an example of defining a channel's configuration and creating the artifacts necessary to start up those channels in Chapter 4, Setting the Stage with a Business Scenario. In this chapter, we will see how to create channels and bootstrap their ledgers (or chains). Smart contract development (step 1a) can occur together with the channel definition and setup; since contracts running on different channels may need to communicate at runtime, the contract developers must know channel names and organizational affiliations beforehand.
Having completed Chapter 5, Designing Smart Contract Transactions and Ledger Data Structure, you should already know how to implement a contract. Once the channels are set up, each contract must be installed and initialized on a given channel (step 3), which we will see how to do later in this chapter. Finally, the higher-layer applications can be started (step 4); these can be developed (step 3a) at any point in time using knowledge of the API offered by each contract, but must be started for users to complete this exercise.
At the end of the operations stage, a distributed applica...

Indice dei contenuti