How IOTA Foundation uses ScyllaDB to Store Unbounded Flow
IOTA Foundation created a feeless, minerless distributed ledger technology. Learn how they use ScyllaDB for their persistent datastore.
The DLT behind IOTA, known as the Tangle, is different from other decentralized ledgers; it requires neither transaction fees nor miners. The Tangle is a particular kind of directed graph, one which holds transactions. Each transaction is represented as a vertex in the graph. When a new transaction joins the Tangle, it chooses two previous transactions to approve, a process that adds two new edges to the graph. The Tangle grows quickly as new transactions are added and verified.
Many node owners have limited storage, and IoT transactions can quickly run out of space. With a focus on IoT, many nodes run on low-level, resource-constrained devices. To address this challenge initially, IOTA introduced local snapshots, allowing node owners to delete old transactions and prevent the database from growing too large.
Real-world business use cases, however, often require persistent storage to support auditability and compliance. Financial data, for example, must be stored for up to 10 years, while identity data needs to be kept for the lifetime of the identity.
To support this requirement for persistent storage, the IOTA Foundation implemented Chronicle, a persistent node referred to as a “permanode.” Chronicle enables node owners to store all IOTA transactions in a scalable and distributed database. Additionally, the permanode will, in theory, offer indefinite storage and easy access to the transaction history recorded in Tangle.
“Why choose ScyllaDB over other NoSQL databases? Lucky us, ScyllaDB met all our hard requirements,” said Louay Kamel, distributed systems engineer, IOTA Foundation.
IOTA adopted ScyllaDB as the default storage solution for Chronicle based on the following key features:
- Fault tolerance: Users can set a replication strategy to determine how to replicate data to avoid a single-point of failure
- Data consistency: Users can set a consistency level to determine whether a read or write operation is successful
- Fast and efficient data queries: ScyllaDB uses LSM-based storage with high write throughput
- Time to live: Users can define the lifetime of their data
- Low operating costs: Licenses (including free and enterprise licenses) and operating costs are very favorable compared to other solutions
According to Kamel, IOTA also appreciates ScyllaDB’s underlying shared-nothing architecture. Built on the Seastar C++ framework it “offers unlimited scalability.” A few other key features driving IOTA’s choice of ScyllaDB are support for the CQL binary protocol and asynchronous streams.
The new IOTA ScyllaDB driver makes use of shard awareness to further enhance scale and low-latency. “All of this enabled our Tangle Explorer. It’s ready, stable, and rock solid, thanks to ScyllaDB.”