What are the functional differences between Fabric Javascript SDK and Hyperledger Composer? - node.js

Other than the fact that Composer makes deployment and testing of prototype business networks easier and the fact that we don't have to know golang to develop chaincode, what is the difference in the functionalities that these interfaces provide that may lead one to choose one over the other?

This article can probably provide you with the answers you need:
https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/
Hyperledger Composer is both an application development framework and set of powerful tools which simplifies and expedites the creation of blockchain applications and smart contracts that are ultimately executed on the Hyperledger Fabric blockchain. Composer has its own runtime, that is generic chaincode and hosts and interprets the business network deployed - so your smart contract need only use Javascript, not chaincode in Go a (which is Fabric's domain) s you mentioned. It also has a modeling facility to create your business network model and to define such controls as Access Control lists and queries to be executed.
This architecture link should help you with further understanding -> https://www.slideshare.net/SimonStone8/hyperledger-composer-architecture
Furthermore see the Hyperledger Composer docs, see here:
https://hyperledger.github.io/composer/
TO see the Hyperledger Fabric docs - see here:
https://hyperledger-fabric.readthedocs.io/en/latest/

Related

Difference between hyperledger Fabric & hyperledger Besu

hi hope you are doing well. by the way I have a research on the frameworks used by blockchain. I found a problem while fixing the differences between Hyper-Ledger Fabric and hyper ledger Besu. can you help me
You can find the differences from the description given in official documentation:
Hyperledger Besu is an open source Ethereum client developed under the Apache 2.0 license and written in Java. It can be run on the Ethereum public network or on private permissioned networks, as well as test networks such as Rinkeby, Ropsten, and Görli. Hyperledger Besu includes several consensus algorithms including PoW, PoA, and IBFT, and has comprehensive permissioning schemes designed specifically for uses in a consortium environment.
Hyperledger Fabric is an open source enterprise-grade permissioned distributed ledger technology (DLT) platform, designed for use in enterprise contexts, that delivers some key differentiating capabilities over other popular distributed ledger or blockchain platforms. Fabric has a highly modular and configurable architecture, enabling innovation, versatility and optimization for a broad range of industry use cases including banking, finance, insurance, healthcare, human resources, supply chain and even digital music delivery.
For further details you can refer following links:
https://besu.hyperledger.org/en/stable/
https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html

Hyperledger-Composer. Modify the ledger via remote access

So far I have followed the hyperledger developer tutorial, but I have a couple of questions basically the same I pressume. Let us assume that I have running my application as stated in the developer tutorial in machine A.
The first question is: How can I modify the ledger in machine A from B when they are in the same network?.
The second is: How can I modify the ledger in machine A from B when they are in different networks?.
The Composer Developer tutorial (and in fact all of the Compose tutorials) focus on the Composer aspects of developing and deploying a Business Network. They do not focus much on the Fabric issues of multi-org and multi machine. The Developer tutorial uses a very simple development Fabric of 1 Peer in 1 Organisation, and some automated scripts set this up for the developer to concentrate on the Model and the code.
For background on Hyperledger Fabric and experimentation with multi peer, multi org Fabrics I would suggest looking at the Fabric tutorials.
To get more of a view of Multi-Org from a Composer perspective I would suggest looking at the Composer Multi-Org Tutorial.
Be aware that the above 2 references simulate multi-org Fabrics, but actually run on a single machine for simplicity. There are other tutorials and blogs available in various places for running on multi-machine configurations e.g. https://www.skcript.com/svr/setting-up-a-blockchain-business-network-with-hyperledger-fabric-and-composer-running-in-multiple-physical-machine/

Hyperledger Composer vs Hyperledger Nodejs Api

I am new to hyperledger and bit confused about hyperledger composer & nodejs api.
I saw using composer we can create assets, transactions, participants and chaincode and in last we have to archive it this all into .bna file and finally we deploy this chaincode into network using admin card
But at other end using NodeJs API we can also write chaincode by overiding init & invoke methods.
How can we relate these all.
The best way to think about this is the following:
1) Hyperledger Fabric v1.1 supports writing chaincode in two languages: Golang and JavaScript via Node.js
If you want to do all of the heavy lifting yourself, you can write straight chaincode.
2) Hyperledger Composer provides a higher-level model-driven language for developing smart contracts. It currently only allows deployment of these artifacts to Hyperledger Fabric. It also happens to support writing functions in JavaScript as well.
So if you want to start from a higher-level model-driven approach, Hyperledger Composer is the way to go. If you want to write all of the plumbing yourself or use very low-level chaincode features, then using chaincode itself is the way to go.
Moving forward, we are looking at a better way to move between the two and not force a decision / direction up front.
There is another option, we develop a framework called Convector to be in the middle of Composer (high abstraction, low control) and raw code (low abstraction, high control, therefore high risk). We open sourced it a few days ago. At WorldSibu we don't like loosing so much control over our code like with Composer but as Gari Singh was saying, doing all the heavy lifting for each project is crazy. It is like a Mongoose for Hyperledger Fabric. It may help to check it out.
It is also worth noting that, according to IBM, Composer is no longer recommended as a production solution, but only for prototyping. In HLF 1.3, chaincode can now be written in Go, Javascript and Java.

How to get chaincode to read from api's outside of the Hyperledger fabric blockchain

I'm wondering how you can get a hyperledger fabric smart contract to read from external API's ?
A service called oraclize (http://www.oraclize.it/) is used to do this operation in Ethereum blockchains - Is there anything similar for hyperledger fabric smart contracts or any workarounds?
In Hyperledger Fabric - smart contracts (the chaincode), could be implemented at the moment with either golang or Java, both of which are Turing complete and provides you with reach set of libraries and frameworks. Among which you can you any network library to get connected with external services, while you need to be extra cautious doing this to make sure your chaincode is deterministic (e.g. two independent executions of the same chaincode calling same external API will get same result back).
Riccardo from Oraclize here.
We are actually working on a Oraclize integration with Hyperledger.

What does Hyperledger composer do .Does that create chaincode for fabric or something else?

I have been working on hyperledger fabric for some time. But I don’t understand where hyperledger composer comes in place . I do understand that it helps in visualizing the logic and transaction. But what I don’t get is how do you integrate it with fabric network? what does it create? Is it chaincode if not then what?
The Compose runtime is chain code that executes the business network archive artefacts created by the end-user.
Perhaps this will help?
https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/
The tech answer is that Hyperledger Composer is an abstraction layer over Hyperledger Fabric.
The practical answer is that it is awesome. Think how Angular and hundreds of other frameworks make web programming easier.
It is a framework where you can write your blockchain in Javascript and specify your data objects in an easy to understand text file. Throw in some querying, ACL stuff and pathways to use some nice opensource tools that let you do things like generate a Web API automatically and play around in a web environment without installing anything.
We are using it for the Integra Ledger Legal blockchain. (www.integraledger.com). I just spent the day working in it.

Resources