Hyperledger Fabric實踐(2) 部署Hyperledger Composer理論

悄悄告訴你

這個鏈接臥虎藏龍:
HiBlock區(qū)塊鏈技術布道 GitHub

Fabric和Composer:

Hyperledger的Composer和Fabric到底是什么關系?

這篇文章是在馮宇Ops的“Hyperledger Composer開發(fā)流程”的基礎上,增加了一些修改和補充。從而可以在最新的Fabric版本上順利搭建和部署網(wǎng)絡。
Hyperledger Composer開發(fā)流程 馮宇Ops

Hyperledger Composer構(gòu)架

Hyperledger Composer Architecture

主要包含了以下components:

  • Execution Runtimes
  • JavaScript SDK 要會JS哦
  • Command Line Interface
  • REST Server
  • LoopBack Connector
  • Playground Web User Interface
  • Yeoman code generator
  • VSCode and Atom editor plugins 開發(fā)編輯器,VSCode用起來很順手滴。

Execution Runtimes

從最初開始,Hyperledger Composer的設計原則是支持不同類型的pluggable runtimes(可選的運行時)。
目前已經(jīng)實現(xiàn)的有下面這三個:

  • Hyperledger Fabric v1.1. 信息存儲于分布式賬本。
  • Web, which executes within a web page, and is used by Playground. State is stored in browser local storage.
  • Embedded, which executes within a Node.js process, and is used primarily for unit testing business logic. State is stored in an in-memory key-value store.

Connection Profiles

Connection Profiles are used across Hyperledger Composer to specify how to connect to an execution runtime. There are different configuration options for each type of execution runtime. For example, the connection profile for a Hyperledger Fabric v1.1 runtime will contain the TCP/IP addresses and ports for the Fabric peers, as well as cryptographic certificates etc.

Connection Profiles是包含在 Business Network cards里面的.

JavaScript SDK

Hyperledger Composer JavaScript SDK是一組 Node.js APIs 的集合,可以通過這組API,開發(fā)者可以開發(fā)應用,從而實現(xiàn)管理已經(jīng)部署的網(wǎng)絡,已經(jīng)與以及部署的網(wǎng)絡進行交互。

The APIs are split between two npm modules:

  • composer-client used to submit transactions to a business network or to perform Create, Read, Update, Delete operations on assets and participants

This module would usually be installed as a local dependency of an application. It provides the API that 網(wǎng)絡應用可以訪問assets, participants 以及提交transactions. When in production this is only module that needs to be added as a direct dependency of the application.

  • composer-admin used to manage business networks ( install, start, upgrade )
    This module would usually be installed as a local dependency of administrative applications. This API 可以生成并且發(fā)布 business network definitions.

Command Line Interface

通過The composer command line tool,開發(fā)者和管理者可以部署和管理 business network definitions

REST Server

The Hyperledger Composer REST Server 自動為網(wǎng)絡生成Open API (Swagger) REST API。 The REST Server (based on LoopBack technology) 為網(wǎng)絡把the Composer model轉(zhuǎn)化為Open API。并且在運行的時候,實現(xiàn)了針對assets和participants的Create, Read, Update and Delete服務, 并且可以提交transactions。

LoopBack Connector

The Hyperledger Composer LoopBack Connector可以用于Composer REST Server, 也可以配合支持LoopBack技術的integration tools,單獨使用??梢詫崿F(xiàn)更復雜而個性化的REST APIs。

Yeoman Code Generators

Yeoman Code Generators可以生產(chǎn)以下projects的主要框架:

  • Angular web application
  • Node.js application
  • Skeleton business network

理論就到這里了下周,我們一起動手部署。

圖片來源

圖片來自官方網(wǎng)站

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,840評論 0 10
  • 可能會有一些不完善或錯誤的地方,如果發(fā)現(xiàn)了請指出,謝謝! Blockchain State Storage 交易通...
    簡聞閱讀 1,094評論 5 0
  • 感謝薦薦小編第二次抽中我讀呼延云的推理小說,其實我內(nèi)心是抗拒的,我是真心不喜歡看推理類小說的。一是推理小說比較燒腦...
    古月曰閱讀 653評論 0 1
  • 時光荏苒,轉(zhuǎn)眼就是三年后。 肩負家庭重任的張耀庭不復瀟灑倜儻,他英俊的臉龐染上了歲月的滄桑,接人待物更加成熟穩(wěn)重,...
    grassfl閱讀 517評論 4 1
  • 覺察日記 事件:晚上孩子的成績要出來,孩子忐忑不安,心里慌慌的,要求去泡澡我同意了,在過程中發(fā)生了沖突,就是我要泡...
    張慧哲閱讀 107評論 0 0

友情鏈接更多精彩內(nèi)容