Data / Microservices

What Blockchain Looks Like in Microservices

28 May 2018 9:00am, by

There’s an awful lot of hype, though somewhat diminished as the price of BitCoin has fallen, around blockchain technology as a solution. The trouble is, many folks have been desperately searching for the right problem. Certainly, digital currency is a use case, but many in the IT world have also been murmuring about the idea of using blockchain in IT installations.

Much of the discussion centers around using blockchain in distributed systems, as you would expect. Some of the theoretical uses have been around IoT, distributed transaction systems, and consensus gathering, but in the end, all of these use cases essentially boil down to one simple use of the technology: peer-to-peer recording of transactions.

For enterprises, transactions are a large part of the day-to-day IT workload, and having a way to validate those transactions that are redundant and impossible to forge offers a unique set of capabilities many developers have likely never even considered as a possibility. These IT use cases are currently heavily focused on Hyperledger, the Linux Foundation open source project headed by Apache Foundation co-founder Brian Behlendorf.

That project has been quickly gaining mindshare from some of the world’s largest software companies, including IBM, SAP, Intel, NEC, and Fujitsu. To date, the effort has yielded a number of developer frameworks, targeted at making the creation of blockchain-backed applications easier for folks not well versed in the technology.

The Hyperledger Fabric is designed just for this use: building enterprise applications. Since the release of version 1.0 last July, the project has grown considerably. Today, it includes 96 contributors. Other projects under the Hyperledger umbrella include Sawtooth, for managing large numbers of ledgers, and Burrow, a permissionable smart contract interpreter that can run on top of the blockchain.

At Developer Week in Oakland earlier this year, Mike Myburgh, principal consultant, office of the CTO at Tibco, laid out a concept architecture that includes blockchain through Hyperledger to produce a distributed transaction system for use with microservices.

Myburgh said that blockchain can be used to build a “distributed system of record. When you have a blockchain, you have a set of nodes around the network where your transaction are stored. It’s a peer-to-peer system where transactions are stored, and there is no central database. Nobody owns that data. The audit trail is captured in the blockchain and is immutable,” said Myburgh.

This coupled with the ability to embed contracts into blockchain applications means that actions can be automatically triggered based on events and that those events and actions can be accounted for in an easily dissected trail of transactions. Thus, if an SLA is broken, the distributed transaction storage ensures that the breach is not a hoax, and can immediately affect change upon the system to account for the breakage.

“The smart contracts that can be stored on top of the actual blockchain and replicated to all the different hosts. All the network parties validate the transaction, and the block is added to the chain. The technology behind blockchain isn’t really new. What’s new is blockchain engineers put it all together in one solution. Enterprise use cases require the ability to automatically execute programmable logic within the blockchain network,” said Myburgh.

Thus, blockchain in IT, said Myburgh, presents an “opportunity to reduce risk, increase efficiencies and automate the execution of the business logic for you with smart contracts. Smart contract execution is computationally more expensive than local execution, but there is no single source of control: multiple participants run the same code. Additionally, the code can typically be viewed by all participants, which may not be desired. The code is part of the network itself,” said Myburgh.

As an example of an enterprise application, Myburgh cited a produce company and a supermarket. As the trucks are carrying that produce to market, sensors inside the refrigerated compartment of the vehicle, and perhaps even in the produce containers themselves, will take constant measurements of the temperature.

If the temperature rises above a set level for a set period of time, that produce could be considered to be in breach of a contract, and thus, that sensor data can trigger an event in the blockchain which cancels the contract for the delivery of that produce and procures a refund for the buyer, without any human hands being involved.

This does present some problems, however, most notably, the problem of corrupted or tampered-with data coming into the sensors. Myburgh said the solution to this issue is zero-knowledge proofs. This is a technology pioneered by Zcash, a privacy-focused crypto coin.

Zero-knowledge proofs allow two parties to verify that something has actually occurred without transferring the information about that thing. It works a bit like 20 questions, where the one party asks the other repeated questions about the hidden info, yielding true or false returns, and thus discerning whether or not the thing in question has really happened. Ideally, all the questions would return as true if the transaction has indeed taken place.

In practice, this means lots of transactions back and forth consisting of computational proofs, the results of which are sent back to the questioning party to verify the truth. While zero-knowledge proofs aren’t necessarily new, the advent of Zcash brought to the forefront a new take on them called zk-SNARK. While that’s all complex university mathematics, the upshot is that this new approach shrinks the size of the proofs needed, allowing for the technology to be utilized within the blockchain itself.

The idea of using blockchain for business is certainly hot right now, but the problems facing enterprises wishing to implement this technology are far more complex than simply those of software. One big question is whether or not smart contracts count as legal contracts. This comes down to whether or not such clauses can be easily automated, said Myburgh.

Linux Foundation is a sponsor of The New Stack.

Feature image via Pixabay.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.