Today, Blockchain technology has taken the business market by storm. Businesses are heavily investing in Blockchain technology owing to its array of characteristics. Hyperledger is somewhat of an industry favorite when it comes to Blockchain platforms, and within it, Hyperledger Fabric and Hyperledger Sawtooth are two platforms that offer the most desirable output for enterprises.
In this blog, we will learn more about how you can choose between the two platforms as well as how you can use Hyperledger Sawtooth for your business.
Because of some of their features coupled with their immense popularity, there’s an inevitable comparison between Hyperledger Sawtooth and Hyperledger Fabric. However, there are some key differences that set them apart and once you know them, you can use these two platforms where they are most relevant.
Hyperledger Blockchain is a popular project hosted by the Linux Foundation under which two frameworks- Hyperledger Fabric and Hyperledger Sawtooth operate.
Hyperledger Sawtooth is a distributed ledger platform which deals with opensource projects of the consortium Hyperledger. This project is developed by Linux Foundation in collaboration with IBM, Intel, SAP. You can use any programming language like Rust, Go, Python, JavaScript, etc. to develop distributed applications. What’s interesting is that it also supports Ethereum Smart contracts.
Hyperledger Fabric, on the other hand, is a project developed by IBM. It is a private Blockchain where only authorized users can access the network and all parties are known to each other. You can use programming languages such as Go, Java, Node, etc. for writing a chain code. By default, Hyperledger Fabric is developed in Go Lang.
Now, coming back to our focal point, what is the difference between Hyperledger Fabric and Hyperledger Sawtooth?
Allow me to explain.
The key difference between the two platforms is that Hyperledger Sawtooth supports both permissioned and permissionless Blockchain networks whereas Hyperledger Fabric support only permissioned Blockchain networks. Hyperledger Sawtooth uses the Proof of elapsed time (PoET) consensus algorithm while Hyperledger Fabric mainly uses the Kafka consensus algorithm.
The next difference is, Hyperledger Sawtooth allows parallel transactions whereas Hyperledger Fabric allows serial transactions. Because of this, Hyperledger Sawtooth can save a lot of time as well as power required for execution.
Thirdly, for transaction processing, Hyperledger Fabric uses endorsing peers and ordering services while Sawtooth use validators to validate the transaction and process the transaction.
Finally, for storing the state of transaction, Hyperledger Fabric uses CouchDB database where Hyperledger Sawtooth uses LMDB (Lightning Memory-Mapped Database). It is key to note that in LMDB all data is stored in key-value pair based on B+ tree.
So, these are the top distinguishing points between the two platforms. Let’s take a quick glance at the architecture diagram for Hyperledger Sawtooth.
Now, allow me to show you how we used Hyperledger Sawtooth for supplying milk & milk products.
Dairy owners who sell fresh, good quality milk and milk products face the following issues while doing this business:
The dairy owners need a solution for the above problems and Hyperledger Sawtooth provides one so that dairy owners can establish a foundation of trust with their clientele.
The transaction handler is the most important aspect of Sawtooth as it has the business logic that you want to implement. All records are immutable and Sawtooth can manage the whole process with barcodes and other IoT tools. When the farmers first sell milk to a manufacturer, they will assign a barcode to it that will help us track its entire journey. It continuously records data such as its location, temperature of the milk products, etc. every step of the way.
A Sawtooth smart contract will manage these transactions as well as the transfer of ownership on the Blockchain. With this, the dairy owner can confidently sell their products to the customers. Additionally, the customers are also assured that the product quality is good. This results in a positive impact on revenue for the dairy owner, milk product manufacturer, farmer, distributor etc. Also, the customers’ health stays unaffected since they will only get good quality products.
So, with Sawtooth, all parties can trust its accuracy and completeness. Blockchain technology will ensure that the data is secure and tamper-proof. Essentially, Sawtooth provides a platform to avail physical traceability in a trust less world.
Here’s what the process of milk supply will look from start to finish:
In the above figure, you can see a farmer, collection centre, processing firm, distributor, supplier, and dairy owner. All these participants can also be referred to as nodes. Every node has its own ledger in which the state of transaction performed is recorded.
First, we deploy our Hyperledger Sawtooth network and add all the participants nodes in our Blockchain network so that they can communicate through transactions. Once nodes are connected to the Hyperledger Sawtooth, every node starts performing transactions through API call.
The above figure shows the journey of milk right from the farmers all the way to the end customer. As and when each participant (node) conducts a transaction, each ledger gets updated with the relevant information. When the milk package is received by the dairy owner who conducts the final transaction, the ledger shows how many packages he received, from which distributor at what time, and again the ledger gets updated at each side.
This is how we can supply milk and milk products and record each transaction state into a ledger using Hyperledger Sawtooth.
Now that you have a fair idea about the abilities of this platform, we can infer that the decision to use Hyperledger Sawtooth or Fabric depends purely on the use-case. If you are looking to build a private Blockchain network which will hold sensitive smart contracts and highly sensitive data, Hyperledger Sawtooth would be the best option to consider. Hyperledger certainly has the potential to reduce the cost and complexity of doing things in the real world.
Reach out to us at Nitor Infotech to learn more about our Blockchain capabilities and take a look at our datasheet to learn more about how Blockchain as a Service can transform your business.
Subscribe to our fortnightly newsletter!