Sui.

Допис

Діліться своїми знаннями.

article banner.
dhaholar.
Aug 22, 2025
Стаття

Storage Sharding and Data Indexing

Problem this solves: Apps slow down because they lump too much into single large objects.

What you’ll learn:

How to shard storage

Dynamic fields as scalable indexes

Trade-offs of fine vs coarse objects

Step-by-step: Sharding NFT collections

Root Collection object (shared).

Dynamic fields for each NFT.

Retrieval by ID → no scanning large lists.

  • NFT Ecosystem
0
Поділитися
Коментарі
.
Dpodium.js.
Aug 23 2025, 00:57

Storage sharding and indexing help avoid bottlenecks by splitting large objects into smaller, more manageable ones. Instead of cramming everything into a single shared object (which forces consensus overhead), you shard storage into multiple objects. For example, in an NFT collection, a **Root Collection** acts as the anchor, while each NFT is stored as its own object via **dynamic fields**. This way, retrieving an NFT by ID is direct and efficient, without scanning a huge list. **Trade-offs:** * **Fine-grained objects** = better scalability, but more objects to manage. * **Coarse-grained objects** = simpler design, but slower as they grow. In practice, sharding ensures apps stay fast even with thousands or millions of entries.