Illustration of IOTA Tangle on Qubic protocol and a cityscape overlaying the image of a businessman. IOTA logo

IOTA's Qubic Protocol Make the Tangle Programmable

Jun 10, 2018, 8:10AM
8 min, 13 sec READ

Real-time data circulates globally on the tangle as the raw material for fact grounded predictions and functionally expressible smart contracts.

This is the third article in a series of 3 exploring the roots, the applications and the possibilities of IOTA. The first article presented unique computing processes such as tangle and ternary used by IOTA. The second article provides an overview of the data analysis and coordination methods employed by IOTA.

IOTA has released details regarding the scope of its keenly anticipated Qubic - an IOTA protocol extension that makes the tangle programmable, making it possible to code smart contracts and set up oracles. IOTA's data marketplace also seems to integrate with Qubic in the broader picture of what IOTA has embarked to accomplish in the realm of the Internet of Things and in fostering a breeding ground for Distributed Artificial Intelligence. 

DIKW Pyramid: Data, Information, Knowledge, Wisdom Hierarchy

Just as our minds arrive at knowledge and insight through the information they extract from the sensory inputs they interpret, so does the AI paradigm shift necessitates the free-flow of accurate, high-quality data to incrementally articulate into working knowledge, assisting the informed policies that govern society.

Being the vital substrate in a machine economy, data needs to be accurately processed in a meaningful way to make it useful. The DIKW pyramid is commonly used (especially in relation to big data) to represent the hierarchical relationships between three substrates. First, unstructured raw data (described with reference to objective metrics). Second, the information that arises from it when provided context in conjunction with the automated computation that captures and processes it. And finally, the applied practices and routines that emerge in that process. Thus, wise decision-making procedures in risk assessment and accurate forecasts are gradually refined.

Illustrated DIKW pyramid with Data as base, followed by Information, then Knowledge. Wisdom is on top.

The DIKW Hierarchy, representing the structural-functional relationships between data, information, knowledge, and wisdom.

The tangle is a general registry in which data flows as signs and signals representing discrete facts which, when correlated, report information about an inquiry in a consumable form. One of the most commonly quoted definitions of knowledge in information science and language-to-knowledge management goes as follows

Knowledge is a fluid mix of framed experience, values, contextual information, expert insight and grounded intuition that provides an environment and framework for evaluating and incorporating new experiences and information. It originates and is applied in the minds of knowers. In organizations, it often becomes embedded not only in documents and repositories but also in organizational routines, processes, practices, and norms.  / Danny P. (2007). Knowledge Management: Historical and Cross-Disciplinary Themes.

The Data Marketplace

Just like material resources, information can be (data-)mined, processed, traded and managed. One of IOTA's most comprehensive pilot study implementations is the distributed data marketplace which enables data-gathering sensors and devices to securely transmit and trade their data on the tangle (and users to monetize theirs, deciding who to sell it to and what for). And since data is only useful inasmuch as it is valid, it is important that it streams uninterruptedly with as little lag or leakage as possible.

Masked Authenticated Messaging (MAM) is the IOTA module that allows for low-power sensors to broadcast continuous encrypted streams in the tangle's distributed ledger, providing access to fine-granular data originating from all around the globe. Smart contracts powered by data-driven insights and executing unhampered by fluctuating transaction fees across networks and block time delays is key to IOTA's broader objective in fostering reusable knowledge-base pools of data refineries that make up the principal ingredients for advancing AI commonwealths.

Qubic: Quorum-Based Computations

Qubic, the freshly announced IOTA protocol specification, provides general-purpose fog-based multiprocessing capabilities in a distributed environment that is to fuel complex IoT applications. Particularly, Qubic specifies IOTA's solution for quorum-based computations (inclusive of constructs like oracles and smart contracts capable of collecting micro and nano payments in real time as they run).

In quorum-based computing, a quorum is the minimum number of approvals that a distributed transaction must acquire in order to perform an operation in a distributed environment. The technique is used to enforce consistent operation and ensure transaction atomicity in the presence of network partitioning.

On IOTA, qubics are essentially pre-packaged quorum-based computational tasks and Qubic utilizes the IOTA tangle to distribute qubics around from issuers to their processors. Qubics are published as messages in regular IOTA transactions that contain additional metadata with directives on how and when to process them. Oracles read qubic metadata and decide whether or not to perform the processing for the associated rewards. Qubic-enabled IOTA nodes (Q-nodes) will be capable of automatically dealing with much of the decision making based on the parameter adjustments set by their operators.

The Qubic protocol itself lays out the construction, execution, and life-cycle of qubics. Different qubics can be composable with each other, forming more complex applications from simpler subunits. Some general examples of types of quorum-based computations are oracle machines, smart contracts, and outsourced computations.

Oracle Machines

When processing computations tied with a decentralized database it is difficult to gather data originating from outside the execution environment. In IOTA, Qubic uses oracle machines and assemblies of oracle machines to provide degrees of certainty about the correctness of data via the quorum. A range of computing devices can form assemblies that cluster a range of appropriately suited computational resources around a given task.

Similar to the CAP theorem, Qubic assures at most two out of three properties for distributed computation in a given Oracle assembly: decentralization, latency, and trust. For example, a single trusted oracle can form its own assembly with itself as the only member. This emphasizes latency and trust at the expense of decentralization and is useful, for example, in cases where the results that need to be processed are expensive to compute but easy to verify.

Outsourced Computations

The protocol allows for anyone to propose or request the running of computational tasks, creating a marketplace for tasks where anybody can participate in processing them and getting rewarded for it. Leveraging unused computational capacity on a global scale, Qubic is intended to provide the means for solving all kinds of computational problems in a parallelized fashion distributed over a large number of processors and devices capable of finding and sorting the tasks they are best suited for at any given time.

Smart Contracts

Smart contracts are another iteration of the more general capability of quorum-based computations. A smart contract could collect data from a number of oracles into an averaged result which periodically gets published to the tangle registry. The smart contract can in such a way become itself an oracle; that is, the contract becomes a source of external data available for another oracle machine to pick up and send to some other relevant qubic in the entangled mesh of devices, nodes, and circulating data.

Abra: The Qubic Definition Language

Qubic tasks are encoded in an intermediate trinary-based functional programming language called Abra. Qubics are event-driven in that they listen to the tangle for data inputs and execute and reshuffle whenever the input data changes. When specific input data becomes available on the tangle, qubics will activate and start processing, which may trigger a cascade of events that set off other qubics to react as results get dynamically updated. 

This allows for a very adaptable programming environment because one can add new qubics at any time binding them to whatever input data is required. To prepare a qubic, the owner packages the Abra code along with metadata inside of an IOTA transaction. An IOTA transaction containing Abra code and qubic metadata is called a qubic transaction and takes advantage of the zero-value, data-only transaction mechanism of the IOTA protocol.

Functional programming is the semantic logic of things like rates, procedures and laws - this is especially relevant to financial institutions, as their operations are heavily dependent on speed, security and the predictability of how programs carry out instructions. A functional programming language also has the advantage of making it easier to analyze and prove code correctness. Additionally, functional programs lend themselves to parallelization, meaning that different pieces of a larger program can be run at the same time, taking advantage of multiple processors and devices.

Abra is thus composed of functions - there is no control flow in Qubic and Abra, but instead a "though" process of branching and merging data as it flows through static functions. This is akin to data flow programming (think UNIX pipes and spreadsheets) where operations can execute in parallel and for as long as there are inputs, similar to how electrical signals flow through circuits.

Summary

Qubic is presently in preliminary stages of research and development and Abra is in pilot mode with experimental CPU execution environment, but it is a crucially defining aspect of IOTA and an important turning point necessary for the consequent removal of the coordinator nodes. Qubic is a crucially defining aspect of IOTA that is intended to "wire" world markets with the tangle's "ledger of everything", while at the same time granting access to anybody to tap into distributed computing and an almost limitless pool of computational resources in a shared machine economy.

Q-nodes could put old hardware to use, dedicating unused computational power and storage to generate passive streams of income for the services provided. Meanwhile, cryptocurrency miners could also profit from their equipment more purposefully (instead of brute forcing increasing cryptographic difficulty as a proof-of-resource), with different pools gradually arising in specializing in the different services they are best suited to provide. 

This is the third article in a series of 3 exploring the roots, the applications and the possibilities of IOTA. The first article presented unique computing processes such as tangle and ternary used by IOTA. The second article provides an overview of the data analysis and coordination methods employed by IOTA.

Disclaimer: information contained herein is provided without considering your personal circumstances, therefore should not be construed as financial advice, investment recommendation or an offer of, or solicitation for, any transactions in cryptocurrencies.