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

Partager le livre
  1. 756 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et 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

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Blockchain with Hyperledger Fabric est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Blockchain with Hyperledger Fabric par Nitin Gaur, Anthony O'Dowd, Petr Novotny, Luc Desrosiers, Venkatraman Ramakrishna, Salman Baset en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Cryptography. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2020
ISBN
9781839216176
Édition
2
Sous-sujet
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...

Table des matiĂšres