It is easy to become jaded with the term “blockchain.” Although the turbulent nature of blockchain ICOs may have added credibility to the claims of skeptics, skepticism can be healthy when new disruptive technology emerges. In fact, skepticism is likely a form of fuel for emerging technologies. As the Hype Cycle of any new technology begins the descent into the Trough of Disillusionment, it is the feedback from skeptics that will refine the tech. So here begs the question - are there any blockchain projects that could serve practical IoT use cases today? Not considering cryptocurrency investing or virtual crypto kittens; are there decentralized networks being created right now that could become the preferred architecture for IoT data transport within the next 12 to 18 months? Below is a comparison of the most promising decentralized networks for IoT that can be used or are accepting alpha/beta testers today.
A Typical IoT Solution
One of the most commonly used protocols for transmitting IoT device data is MQTT, a server/client message queue that operates on a publish and subscribe model. MQTT requires a central authority called a Broker to act as the single source of truth.
The premise of MQTT is simple. The architecture has a central Broker receive data from multiple data Publishers. Once data is centrally collected the Broker proceeds to pass the data to any number of Subscribers who are waiting. In addition to being a message queue, an MQTT Broker can support authentication, up to 3 levels of QoS (Quality of Service), and filter data by topics. MQTT was authored originally in 1999 and actively developed by IBM until open-sourced in 2013. Today there are many accepted MQTT Broker projects and MQTT Client libraries for anything you can imagine.A number of commercial IoT platforms use MQTT as a backbone. Because of its versatility companies can have a large number of IoT devices continually publishing data and on the other side, any number of servers subscribing to pre-filtered raw data.In case you are curious, here are the most common MQTT platforms our customers use: AWS IoT, Google Cloud IoT Core, Azure IoT Hub, Losant, and Adafruit IO. MQTT is a great solution, but scaling to a hypothetical 20.4 billion IoT devices would require massive infrastructure and cloud computing. Any team planning a start-up or commercial project with IoT elements must be ready to incur substantial cloud infrastructure fees and investment in devops.For this article, MQTT will serve as our baseline to compare Blockchain and Distributed Ledger technologies.
A Blockchain is an immutable decentralized ledger. You can think of it as a new type of database. The essential core function of a blockchain is a shared ledger that gets updated across the entire network of nodes. Every Node is a computer who will receive and verify copies of the ledger. Data is stored chronologically on this ledger with new data being appended and propagated to the entire network. The data a ledger holds can a record of transactions, documents, files, or something else of value.The Block part of the term refers to the current place in the chain. Once the network confirms a Block copies are sent to all the nodes, becoming a permanent part of this distributed ledger, or database. A new Block is appended after the previous Block. As a result, each Block contains a hashed copy of the previous Block. Blockchain - a chain of blocks! Because each subsequent block contains a hash of the previous block if someone attempts to change data at any point in the chain the resulting hash would be different and not validated by other nodes. It becomes practically impossible to introduce manipulated data to the network. To make a viable attempt to change the chain would require access to every copy of the ledger around the world and the ability to alter it simultaneously. No person or group will ever have access to that much power making blockchain a trusted source of transactions or identity without the need for a central source.A self-validating massively distributed database made up of secure user accounts, and their transactions have some serious appeal. Historically, this problem was impossible to solve and why we created federally insured banks.
Ethereum Blockchain for IoT
Bitcoin may have introduced blockchain technology to the mainstream, but Ethereum became the most practical by introducing blockchain to developers. Ethereum allows developers to create their own decentralized contract where they specify the rules, functionality, and even a unique coin. Remember the explosion of ICOs in 2017? Ethereum's tools gave tech entrepreneurs the ability to create those unique cryptocurrencies. The ease at which a developer could create a unique cryptocurrency is a testament to the Ethereum ecosystem, Ethereum's developer community, and the Ethereum Blockchain.The computing power and storage requirements of traditional blockchains such as Bitcoin and Ethereum have eliminated the possibility of IoT devices being able to use this technology. For example, typical Ethereum nodes use GPUs to process blocks as CPUs are too slow and each node stores nearly 1TB of historic blockchain transactions. As Ethereum stands today, it is slow, expensive, and energy inefficient when compared to centralized cloud services. To become a viable data transport option consensus time and mining fees need to decrease significantly. These issues have not gone ignored by Ethereum's leadership team. For years core developers have been working on a project called Casper. Casper would move blockchain consensus from a computationally intensive operation called Proof-of-Work to a risk-based operation called Proof-of-Stake. Casper will have significant effects on the Etereum market. For IoT projects, the result will be positive as it will reduce transaction processing costs and allow computationally constrained devices to confirm blocks. In May, the Casper team released version 0.1.0 and seven days later version 0.2.0. In January, the Ethereum Foundation further recognized scaling issues by announcing two subsidy programs where developers could receive grants ranging from $50,000 to $1,000,000 or more to work on proposed solutions. Specifically, the foundation outlined two strategies they wanted the community to work on in parallel - Blockchain Sharding and Layer-2 Protocols. Sharding will allow Ethereum's network of nodes to work on multiple blocks simultaneously. In essence, this is similar to how MongoDB shards data into different partitions. The only project we found working on Sharding is prysmaticlabs.com. For IoT devices, Sharding is another way Ethereum plans to decrease the time to consensus drastically.Layer-2 Protocols are commonly defined as sidechains. Borrowing many features from Ethereum, these sidechains create an independent chain where many data transactions can happen off of the Ethereum chain. Eventually, a sidechain will memorialize all of their transactions on to the main Ethereum Blockchain.
By creating a sidechain specifically for IoT constrained devices we begin to see a similar architecture to MQTT. Sidechain data flow would be Device → Sidechain → Blockchain where MQTT data flow is Client → Broker → Central Database. Using this architecture there can be a sidechain “Broker” interacting with constrained devices. On the other end the sidechain syncs “side” transactions at set intervals with the main Ethereum Chain. Two notable sidechain projects actively being developed are Raiden and Plasma. With so many Ethereum-based projects and developers focused the issue of scale, Ethereum paired with a sidechain may soon become a popular alternative to traditional Message Queue + Database architectures.
IPFS for IoT
An exciting and presently practical implementation of Distributed Ledger Technology is the Interplanetary File System (IPFS). IPFS creates a distributed file system across independent nodes. IPFS can be used to host websites, files, and even videos.IPFS nodes store only the content they're interested in as well as an index of who is storing what. This is unlike traditional blockchains that require each node to have the entire history of transactions stored locally. IPFS may be very different from conventional blockchains, but similar in that cryptographic hashes of files save across multiple nodes in a network. The claim to fame for IPFS is the bold suggestion that the entire public web itself would better serve the world if it used IPFS rather than centralized HTTP servers. Each client node has access to the whole network of files if you know the hash address. Client nodes can decide to store the hash and in doing so becomes a host node of that data. If any nodes storing the data is disconnected, the file continues to be available through the other nodes as if nothing happened.In addition to the storage tools it exposes to application developers, IPFS also exposes a pub/sub event bus similar to MQTT. Unlike MQTT there is no centralized Broker, IPFS provides a completely decentralized and distributed Broker equivalent. This means that every subscriber interested in an event also acts collectively to Broker event syndication to other interested subscribers. Then, there is also the added benefit of built-in cryptographic security.You can use IPFS Pub/Sub today, but you'd quickly run into the reality that IPFS requires nodes to opt-in to host individual data. For this reason, larger projects built on top of IPFS provide value by bringing structure, libraries, and a "network" of interested nodes all running the same project application.One project built upon IPFS is Computes.io. The founder, Chris Matthieu, wrote a blog post that demoed an IoT pub/sub example using an Arduino last year - Build an IoT Supercomputer. The term supercomputer might raise your eyebrow but consider this demo where Computes demos a brute force password attack using multiple computers acting like one.[embed]https://www.youtube.com/watch?v=_csMpIEJLxo[/embed]IPFS gives us the ability to network a series of IoT devices and have them act as a shared file system, an event bus, and with Computes.io as a distributed computation platform.
The Helium Distributed Machine Network for IoT
Helium is another startup that has caught our attention here at Hologram. They're building a Decentralized Machine Network, which is a new term they're using to describe their product. Helium's network combines a physical blockchain, wireless technology, and open-source software to create a distributed blockchain uniquely built for IoT. When Helium first announced the Decentralized Machine Network their website stated: “IoT has failed.” Their reasoning was due to the mess of protocols and proprietary technologies, IoT had not lived up to the hype.
The solution they're developing involves a gateway and low power wireless modules using a new wireless protocol called WHIP. On top of that they've created an incentive platform for individuals to act as hotspot providers. The idea is that if you set up a gateway and provide internet access to IoT devices, then you'll earn cryptocurrency. Helium has also developed novel cryptographic proofs for its proposed network to incentivize expansion and maintenance of the network. Instead of Gateways providing compute cycles and electricity to some power-hungry mining function, Helium Gateways offer the practical service of extending their network to a specific geographic area, as verified by Helium's Proof of Coverage proof. The end result is that the Gateway receives tokens as a reward for making verifiable contributions to the underlying network. Let's step through how data transfers over the Helium network.
- IoT machines will use the WHIP protocol to connect to multiple local Gateways within range securely. Once joined a device sends encrypted data to all the Gateways.
- Each Gateway adds the data to a block later appending the block to Helium's global Blockchain. Data objects will contain information about a Router to forward sensor data.
- The Gateway sends earmarked data to the specific Router. For providing this data transfer service, the Gateway expects payment from the Router.
- The Router decrypts the data completing the process.
This explanation may seem cumbersome as Helium is currently under development. We anticipate better terminology describing this process.
“We use a blockchain to reward anyone who deploys a Helium Gateway; a wireless hotspot for machines. This approach enables us to build a community-owned, decentralized network that provides secure, affordable, and ubiquitous wireless coverage that will connect billions of machines to the internet.”
IOTA Tangle for IoT
Another technology that is available today is IOTA. This project introduces its concept of a Tangle network, rather than a network powered by traditional blockchain. Tangle is a new form of distributed ledger technology, crafted with the Internet of Things in mind.[caption id="attachment_5904" align="aligncenter" width="468"]
Source: http://www.iotasupport.com/[/caption]Unlike blockchain, a tangle is merely a tangled network of users instead of miner nodes. The idea is that, for any device or user that makes a transaction, it must also process the next two transactions. This scheme allows for fast transactions with fees less than any of the other options discussed. IoT devices can quickly make small transactions for sensor data or functionality. It enables a whole new kind of economy around connected devices. A fun claim of IOTA is safeguarding against quantum computing-based attacks. This claim is impossible to verify but fun to consider. IOTA's white paper runs through the math. They use “exclusively quantum resistant cryptographic algorithms” which decreases the effectiveness of certain quantum attacks by 1 million.In a future where much of city infrastructure could be managed and influenced by sensor networks and distributed actuators, it is conceivable that an attack involving the spoofing of identity or falsifying of data could be catastrophic. A quantum-resistant cryptographically-secure IoT network would help prevent such attacks over the duration of the node life cycle.
Consider the Future
While it is still important to hold skepticism, there is a lot more going on with this technology once you look past it as just a means to build a currencyWhen thinking of the billions of devices that will be coming online in the next 5-years, it is easy to see why projects like IPFS and Helium are so important. When we get to the critical threshold of connected devices, we will need the peace of mind to know that they can remain connected.The various protocols under development for distributed networks are solving real problems preventing adoption. We are starting to rethink the internet as less cloud-centralized and more as a decentralized web of devices similar to its roots. It is fun to envision a future where device connectivity happens through micro-transactions via independently owned gateways, and where the network distributes across multiple privately owned nodes. Every device works to maintain the system they consume, a system that can also be forked and merged if parts of it need to go “off-grid.”
Current IoT solutions depend upon platforms that may not exist in a few years' time. I have built many projects that no longer run because the services used were shut down. The distributed projects shared in this article enable us to go beyond the limitations of central authorities. Systems not easily destroyed and data not easily lost.An important thing to consider is the practical technical solutions behind cryptocurrencies instead of just the financial value. Ultimately, we all will be affected in some way by decentralized technology. In our lifetime we will see at least a few blockchain based systems become part of daily life.It is interesting to witness security and privacy issues make daily headlines; and, as a result, companies find solutions in blockchain technology. As the shift to decentralize happens we see practical use cases start to emerge.What are some areas or industries that you think blockchain or blockchain inspired technology would be good for? Reach out to us on Twitter @Hologram