34

I am java developer and new to hyperledger. I am interested in learning it and need to know where to start . fabric vs composer?

Robert Ravikumar
  • 771
  • 1
  • 9
  • 25
  • go with composer first.. But now it's deprecated. If there is available old Hyperledger version you can check that. – Vijay Sep 05 '19 at 09:16

8 Answers8

58

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.

Dave Enyeart
  • 2,038
  • 10
  • 22
  • Does Composer generate the go language smart contracts depending on the business network and deploy them in the docker ? Or is it using a generic Smart contract for all the business networks ? I saw a video in Youtube, which mentioned generic chaincode, and was confused. – Ashishkel Aug 09 '17 at 09:47
  • 1
    Composer itself runs as a smart contract on Fabric. – neuromouse Aug 10 '17 at 14:28
  • 3
    Composer does not directly generate chaincode or 'Go'. It uses a generic chaincode that maps composer models to chaincode tables and runs transaction processor functions in the javascript interpreter in a javascript engine. So it runs in its own runtime environment and chaincode container. Each composer business network (ie with the smart contract logic, written in javascript and created as part of the business network) is deployed to it's own Chaincode container. – Paul O'Mahony Nov 02 '17 at 15:11
  • As per my understanding to develop production ready applications , composer setup is fine . Am i right? – Robert Ravikumar Nov 28 '17 at 04:36
  • I found these tutorials for how to deploy a Composer blockchain business network to a 'regular' Hyperledger Fabric. I think the individual Fabric and Composer tutorials are useful but what really would put the pieces together would be a nice architecture diagram that uses both techs but shows the 'guts' between them. As someone who is trying to architect an overall solution, that is really the piece that is not explained as well, IMO. https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org – anyeone Mar 17 '18 at 16:49
  • Java SDK will be available in Fabric 1.3 – Bilbo Baggins May 25 '18 at 13:21
  • composer is out dated and does not support all the native features of fabric – Moriarty Sep 25 '19 at 16:37
13

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

Paul O'Mahony
  • 6,680
  • 1
  • 7
  • 15
  • Hi Paul, can you please elaborate on your comment: " It uses a generic chaincode that maps composer models to chaincode tables and runs transaction processor functions in the javascript interpreter in a javascript engine." – user1274878 Mar 30 '18 at 09:52
  • Hi Paul, Two points here. 1. How can i see the chaincode which is created when i create a Business network in Composer? 2. I understood from your statement that now its no longer a generic chaincode, the business logic which is written in the composer ui is created as the chaincode and is deployed into the Fabric. So I am assuming that its creating a JS chaincode. Please confirm. – Ashishkel Jul 11 '18 at 00:20
  • 1. `docker exec -it peer0.org1.example.com /bin/bash` ; `cd /var/hyperledger/production/chaincodes ; ls` 2. the Composer business network is deployed as NodeJS chaincode. – Paul O'Mahony Jul 11 '18 at 16:44
4

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

2

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.

ShakibaZar
  • 617
  • 2
  • 8
  • 23
2

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.
  • -
A.Srivastava
  • 51
  • 1
  • 4
2

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.

Prayag k
  • 441
  • 5
  • 17
1

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

0

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

Sergio A.
  • 74
  • 3
  • 4
    Using the web browser profile in the Composer Playground, e.g. with the hosted playground http://composer-playground.mybluemix.net/, does indeed write everything to local storage which is great for checking out what Composer can offer. However, once you install the Playground locally and connect it with Hyperledger Fabric, everything is done on the blockchain. Plus there are VSCode and Atom plugins, along with an extensive, familiar and open toolset for when you move beyond the Playground. Composer is a great tool to build mockups, PoCs, etc, as well as full scale blockchain solutions. – James Taylor Feb 07 '18 at 09:38