Does Composer needs an already built Fabric networ

2020-08-04 04:09发布

I recently started up with composer tutorials and now I am confused if it is boot starting block chain application development or block chain network development. Do we need to create a block chain network using fabric and than integrate it with composer to create rest end points and angular application for our fabric network? can we achieve decentralizing and immutable transactions by just using composer?

2条回答
该账号已被封号
2楼-- · 2020-08-04 04:46

The answer is it is "bootstrapping" application development (Composer helps get you started, by installing a 'development" Fabric setup - although you could use just Composer playground too without a runtime Fabric (ie in the browser with local storage) to get started). But - you will furthermore deploy the smart contract you develop (the model, access controls, transaction logic and functions, queries etc) to the blockchain network, eg as agreed to by the organisations/parties/members that want to participate in that blockchain network. A Composer runtime is installed to configured peers in all of those organisations) and its Composer that interacts with the Fabric blockchain - eg. the smart contract dictating what gets written to the ledger (or read data from) the same ledger you read about / configure, per the Fabric documentation.Composer can also expose the set of REST APIs generated for that particular business network so applications in the organisation can interact with the business network deployed to the blockchain. The deployed business network / smart contract (say "Trade settlement") is a window into the ledger of asset, participant, identity and transaction registries and the whole history of changes (another system registry - including what changed in each transaction). That's registry in a ledger sense.

So, Hyperledger Composer is a development framework and toolset but also a runtime abstraction layer for executing smart contracts, in which a business network (eg. say 'trade settlement' blockchain as a use case or network ; or 'supply chain finance' etc etc) is deployed as a runtime smart contract, on the blockchain, between the parties involved, and upon which all have agreed the terms (what the model is, the data elements, the security, the access control, how identities are issued, , the contract terms blah blah).

Sure, Composer makes it easier to develop blockchain applications and smart contracts - that's one of its aims, as well as adding in all of the consistency, validation or gruntwork you would otherwise have to do as an application developer (you can get an insight into that here -> https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development where Fabric and Composer are compared. So there's the development perspective but also the runtime perspective as I've alluded to above. Hyperledger Composer currently uses Hyperledger Fabric as the underlying 'blockchain infrastructure' or underlying blockchain technology, put simply. This can be configured in many ways in a secure Cloud environent etc etc. Composer is ultimately aimed at production deployment/scalability - you'll be deploying business networks and smart contract transaction logic (written in a mainstream app dev language so app developers don't need specialist language skills) that will execute on the blockchain network (wherever that is deployed, however configured, privacy etc) that you (as an organisation etc) will configure (ie between the parties involved).

In Composer 'next' (v0.17.x) we will deliver native Node.js support and runs with (at the time of writing) Fabric v1.1 (alpha version) and that version of Fabric will be available as a GA production ready release in the near future (obviously, Fabric v1.0 is already out there that works with Composer v0.16.x).

So Composer is both the development framework,the toolset, the modeler and the runtime execution on the blockchain ; as well as all managing all the other important aspects of working with that business network, such as managing identity,access control, participation, queries, API support and connectivity from remote apps etc, so essential to working with/transacting on a blockchain network that is otherwise infrastructure-oriented. Hope this helps.

查看更多
够拽才男人
3楼-- · 2020-08-04 04:52

From what I understand, we already achieve immutable transactions with the composer. If you go to the transactions sections and create one, it will have its unique hash and timestamp. Additionally, Composer playground is simply a GUI of sorts that gives a better physical representation of the network. The Playground gives options to add peers to a certain network, so I would assume that it is possible to create a network simply with playground. However, If you prefer coding(like me), you can always create models in your .cto file, and update your permissions file to define who can do what in the network.

I would advise you to go through the developer tutorials too as they are quite instructive and give a better understanding of how fabric operates. Hope this helps!

查看更多
登录 后发表回答