I am java developer and new to hyperledger. I am interested in learning it and need to know where to start . fabric vs composer?
Hyperledger Composer simplifies application development on top of the Hyperledger Fabric blockchain infrastructure.
If you are interested in the blockchain infrastructure, start with the Fabric tutorials.
If you are interested in blockchain applications, start with the Composer tutorials.
The Fabric tutorials also include samples of low level chaincode development (in golang). Composer is a higher level application development framework.
I'd suggest trying both to get an overall view of the capabilities.
As a Java developer, you will also want to check out the Fabric Java SDK for building Java client applications that interact with the blockchain. Java chaincode is also available as of Fabric v1.3.
Updated answer (as promised in previous post): Hyperledger Composer v0.19.0 (time of writing - Apr 1st 2018) is the default release for building your blockchain business networks using Composer. So when you pull HL/Composer eg via npm install etc) - this uses the current GA edition of Hyperledger Fabric v1.1, the underlying blockchain network infrastructure. This 0.19.0 release includes a fundamental change in the way that Composer business networks are deployed (vis-a-vis previous releases eg 0.16.x - 0.18.x). Business networks are now deployed within Hyperledger Fabric 'as chaincode' - meaning that the business network (rather than Composer runtime) can be agreed by all parties (to the blockchain network) and signed, using a similar management model to non-Composer chaincode. In a later edition, the plan is to add JS requires so that these can be exploited in NodeJS and include other JS functions you've developed - of course, you can already call native Fabric APIs/chaincode functions already, from Composer transaction processors - introduced prior to 0.19.x release). See more info here in the release notes -> https://github.com/hyperledger/composer/releases/tag/v0.19.0
hyperledger fabric is a hyperledger framework while composer is a hyperledger module.I suggest you start with hyperledger composer since it offers many benefits such as
Faster creation of blockchain apps, eliminating the big
effort required to build blockchain applications from scratch
it is well-tested therefore less risk involved, easier to understand and align with different domains
Greater flexibility as the higher-level abstractions make it far
simpler to iterate.
further hyperledger composer is written in javascript.Composer provides you a bunch of easy-to-use components that you can quickly learn and implement.
hyperledger fabric takes you a layer lower. if you wanna start learning about blockchain architecture and underlying processes go ahead with fabric.
here is a good place to start fabric
https://github.com/IBM-Blockchain/marbles
It helps you to start if you know that hyperledger fabric is a framework and hyperledger composer is a tool for building blockchain business networks.
Composer provides a GUI user interface "Playground" for the creation of applications, and therefore represents an excellent starting point for Proof of Concept work.
Hyperedger Fabric:
Hyperledger Fabric is one of a Hyperledger framework. It is a private permissioned blockchain commonly used in building Enterprise application.
Hyperledger Composer:
It is the one of the tool of Hyperledger Framework. The main purpose of this tool is to develop the Blockchain application in less time as compared to Hyperledger Fabric Framework.
Below are the main differences between these two:
Developing the Blockchain application with the help of Hyperledger composer is much easier and faster.
The chaincode in Hyperledger Composer can be only written in javascript
Hyperledger composer is build on top of the Hyperledger Fabric network by utilizing its main components through connection files.
-
As of the 29th August 2019, the Hyperledger Composer project is in deprecated status. You can still use it, but thinking for the future it is better to start with fabric docs. And now the fabric tutorials are much improved.
Hyperledger composer is just a framework to deploy business networks on hyperledger Fabric Blockchain. You can even deploy applications on Fabric(using chaincodes written in Golang or Node) itself but composer just simplifies the process. In composer you have Participants in your network, Assets and then you define the transactions that you want to perform.
You can look into composer tutorials https://hyperledger.github.io/composer/latest/tutorials/tutorials.html
To develop production ready application Composer is not the best option since it lacks from a full set of features that are available using 'native' go based smart contract. Also be aware that Composer needs to be baked up by running fabric based blockchain network, otherwise it is useless. Composer operations that are managed using Web UI are not written in any blockchain but in memory instead.
Those are the main differences between Composer and Fabric, so definetively Composer is a great tool to build mockups, make PoC, etc
Related
I am writing an application on Angular and I used the following Hyperledger Composer tutorial as a guide:
Hyperledger Composer Developer Tutorial
Everything went great and I got the app running and understood how to interact with the API and make the queries. What I'm facing now is that I need to configure Kafka consensus on my Hyperledger Fabric network. I followed the following tutorial to install my Fabric network and environment:
Hyperledger Composer Development Environment Tutorial
I'm trying to use this for configuring Kafka on my network but directories and files created using the above tutorial are different than the ones described on the following tutorial:
Bringing up a Kafka-based Ordering Service
So my question is, is it possible to configure Kafka-based ordering service on a network built using the Hyperledger Composer tutorials mentioned above? If yes, is there anyone out there who was done it successfully?
I would like to know how to upgrade Hyperledger Fabric binary images. For example, I already configured blockchain business network on Hyperledger Fabric v1.0.3, and want to upgrade to v1.1.0-preview level images while maintaining the existing ledgers and blocks.
Could anyone help me, how to upgrade Hyperledger Fabric platform-specific binaries without any negative impacts on existing business network ?
I am new to Hyperledger, what i did yesterday is installed Oracle virtual box on my windows 10, followed by Ubuntu, followed by Composer prerequisites including Docker Engine, Compose and everything else. Finally followed the composer playground tutorial and deployed the network.
What i am not able to understand in the end is -
1. where the chaincode is and how can i query that and modify directly, if needed?
2. Go lang was a pre requisite to setup Hyperledger Fabric, but for Hyperledger Composer, it was not mandatory, I am still confused if Hyperledger Fabric (the real blockchain) is also setup on my machine or it is just some simulated environment something?
thanks in advance for your answers.
I've been investigating Hyperledger Fabric composer myself too, hope this answers your questions:
Hyperledger composer is built ontop of the Hyperledger Fabric framework.
When developing with composer you are not producing chaincode, in essence, hyperledger composer is some very smart chaincode that can read and comprehend the model + transaction files. Composer is NOT a compiler, it does not take the business network definition files and produce chain code.
Again, as you are not producing chaincode Go is not required for development. Hyperledger fabric is indeed setup on your machine. It is a real Fabric on which composer is built upon.
Hope that helps, I'm happy to clarify anything further if you need.
When you installed the dev environment for Hyperledger Composer, you installed (in VirtualBox) a HyperLedgerFabric V1 network with multiple nodes. So, yes, you do have a 'real' blockchain set up on your system. The transaction code that you write in JavaScript is your chaincode. HyperLedger Composer uses (today) a service called DukTape to enable your javascript-written transactions to run in the Go chaincode environment.
The chaincode in the default installation is in the lib folder inside the network folder. The file, in the default installation is sample.js, which is directly associated with the sample.cto file in your network\models folder. The cto file defines your assets, events and transactions using an Object-Oriented class kind of notation. The class name for a transaction is identical to the function name in the sample.js file.
I'm still a beginner and am working on a project. I have done the getting started from the fabric docs but I don't know how exactly I am supposed to deploy it to a network so that it runs on multiple peers.
After creating the fabric, I want to deploy a hyperledger composer model on it. I've completed the dev guide from the composer docs. So, I wanted to ask whether the process would be any different from deploying to a fabric with a single peer.
If you have followed the Composer Developer Tutorial:
https://hyperledger.github.io/composer/tutorials/developer-guide.html
The you have installed a Fabric (currently at v0.8), created a Composer business network definition and deployed it to a channel on your Fabric development instance.
The process from a development perspective is identical, regardless of how many peers you have.
The Question:
Does anyone know a stable framework which can be used to create a blockchain application, creating a server/node, creating a miner, a wallet, a blockchain inspector, etc?
Such a framework does not have to be in Node.js nor Ruby on Rails, but those are the two technologies I am most familiar with.
Some Background:
I have to craft an internship project based on blockchain technology.
I have been looking at Ethereum which seems nice. Ethereum's GETH command line interface allows me to create a blockchain and also mine that blockchain.
However, I need to be able to use a web-capable development platform such as Ruby on Rails, Node.js, or similar so I can have interns craft a UI to go along with a local blockchain.
I have looked at Toshi(RoR) and BitCoin.js(Node), but will need something that has better documentation.
Thanks for any and all your suggestions!
When I built Etheria, I chose the following:
Development techs:
Ubuntu Linux 14.04
Eclipse Mars 2 (get from web, not repo) (javascript formatting works
well, you can tell eclipse to format .sol files as javascript)
Solidity + chriseth's Solidity compiler at
https://ethereum.github.io/browser-solidity
And for deployment:
Digital Ocean
Ubuntu 14.04
geth (stable, not development)
node + async + express
Notes on choices:
Ubuntu 14.04 for development - As it is the Linux standard, many Ethereum docs assume it which streamlines things. Easy to install geth and keep it upgraded.
Eclipse Mars 2 - Ubuntu's packaged Eclipse is old.
Solidity - Was once (is possibly still) billed as the "official" ethereum language and is easy to learn. chriseth is the man.
Digital Ocean - cheap, easy hosting. My security needs were nil as I didn't need a wallet on the machine. If you plan on keeping wallets on your machine, your risk profile may be different and necessitate other options.
Ubuntu 14.04 for deployment - Easy to install geth and keep it upgraded.
geth - I'm sure pyeth and eth are equally valid. geth is more widely used
node - Seamless interaction with the indispensable and awesome web3.js library which is used to interact with your geth instance (which should be running with local-access-allowed IPC). Async for easy async calls, express for endpoint creation and organization.
My code:
Etheria contract: https://github.com/fivedogit/etheria
Etheria node: https://github.com/fivedogit/etheria_node