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

悄悄告訴你

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

Fabric和Composer:

Hyperledger的Composer和Fabric到底是什么關(guān)系?

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

Hyperledger Composer構(gòu)架

Hyperledger Composer Architecture

主要包含了以下components:

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

Execution Runtimes

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

  • Hyperledger Fabric v1.1. 信息存儲(chǔ)于分布式賬本。
  • 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 的集合,可以通過(guò)這組API,開(kāi)發(fā)者可以開(kāi)發(fā)應(yīng)用,從而實(shí)現(xiàn)管理已經(jīng)部署的網(wǎng)絡(luò),已經(jīng)與以及部署的網(wǎng)絡(luò)進(jìn)行交互。

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)絡(luò)應(yīng)用可以訪問(wèn)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

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

REST Server

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

LoopBack Connector

The Hyperledger Composer LoopBack Connector可以用于Composer REST Server, 也可以配合支持LoopBack技術(shù)的integration tools,單獨(dú)使用??梢詫?shí)現(xiàn)更復(fù)雜而個(gè)性化的REST APIs。

Yeoman Code Generators

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

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

理論就到這里了下周,我們一起動(dòng)手部署。

圖片來(lái)源

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

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

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

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

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