Skip to the content.

Hyperledger Composer, Some personal thoughts.

For many people, Hyperledger Composer was thought of as something to make writing for applications for Hyperledger Fabric easier but actually although this is true, it wasn’t about making any type of fabric application easier to develop. Hyperledger Fabric provides a complete Distributed Ledger Technology (DLT) capability designed to satisfy a range of solutions which require an immutable ledger shared across organisations (be it internal or external). Hyperledger Composer on the other hand was designed to solve a specific domain space around digital assets (or physical assets represented digitally) which is a common use case for DLT systems. Hyperledger Composer itself did not provide a DLT implementation but uses Hyperledger Fabric to provide that capability. In theory it could have used a different DLT implementation or even allow for the choice of DLT implementations, however even though the DLT implementation was pluggable in Hyperledger Composer, the design, capability and operational aspects of hyperledger composer are clearly driven by Hyperledger Fabric capability making it actually difficult, if not impossible, to use a different underlying DLT such as Hyperledger Sawtooth for example.

What is Hyperledger Composer

Hyperledger Composer is a runtime framework, operational tools and development tools to help you create a digital asset application that can be deployed onto a Hyperledger Fabric network. It makes no requirement on the design of this network (see later however for features required to make hyperledger composer production ready) but has to have knowledge of that network, through the hyperledger fabric connection profile, in order to be able to work with that network setup. The following are a summary of the capabilities.

This provided a complete eco-system in the lifecycle of a digital asset application from development to production.

Composer applications and Production readiness

As much as it was thought that when 0.19 was released, that this was production ready, it wasn’t. Some of it was due to missing capability in Composer and some was because Hyperledger Fabric V1.1 (And that is the version of fabric targetted by v0.19) was not ready for certain types of application, for example applications that made use of rich queries. We learned that the limiting factors of composer were performance and scalabity. Composer provided a lot of capability but that also meant it would use more CPU and memory to handle, for example model validation and serialisation can be expensive especially if your model was complex. The more ACL rules and more resource artifacts were processed in the runtime, the more CPU and memory were required. Finally limitations with fabric and node.js chaincodes also play a part. So what is required to make Composer production ready bearing in mind the limitations ?

There are some things that still cannot be addressed and still require a solution from Hyperledger Fabric around Node.JS Chaincode support

Conclusion

At the moment depending on how you use composer, it isn’t recommended for production use. The main issues being around Rich queries and large/infinite datasets that could exist. But you should also consider that Composer adds performance overheads which can never be removed. You use composer to provide a capability you need and with that you have to accept the overhead that comes with using these generic capabilities. It will never be possible to achieve the same performance as Go or pure node.js chaincode which can implement just what it needs in an efficient manner for the use case. Unfortunately there wasn’t enough engagement from the community to drive Composer forward. It needed far more contributions from the community which sadly never happened. Composer can be used with hyperledger fabric upto the final V1 release, v1.4. But Composer is unlikely to work with Hyperledger fabric V2 and there is no indication that there will be any further contributions to make it work.

Composer remains a great learning tool to get to understand the concepts of digital assets and possibly even for demos as well. If you consider it for a POC then you need to be prepared to throw away a lot of what you coded in Composer and start again as there is no equivalent capability in native fabric applications. Some of the new programming model capability in native fabric will lessen the impact somewhat.