docs/content/concepts/data-access/indexer-data-integration.mdx
Building a custom indexer on Sui lets you take full control of data ingestion, storage, and processing. You can choose from multiple checkpoint data sources such as remote store, local files, or direct RPC API access, depending on whether you're indexing Mainnet data, testing against known checkpoints, or working on a local network.
For storage, you can either use the built-in IndexerCluster with PostgreSQL or implement your own Store and Connection traits to integrate a different database or storage backend. After connected, you can wire up a manual indexer, add your custom pipelines, and handle watermark coordination to keep data in sync.
Finally, you need to deserialize Move events from raw BCS bytes into Rust structs, using bcs and serde, so that your pipelines can work with strongly-typed data. This gives you a reproducible, end-to-end setup that you can tune for performance, reliability, and custom analytics.
The sui-indexer-alt-framework supports multiple data sources for accessing Sui blockchain data.You configure these sources through command-line arguments. They fall into two categories: push-based and polling-based.
Push-based sources deliver real-time checkpoint data as it becomes available, offering lower latency than polling.
gRPC streaming delivers real-time checkpoint data pushed from full nodes for the latest checkpoints. Because it only streams latest data, you must configure a polling-based fallback source (remote store, local path, or full node RPC) to retrieve historical checkpoints and ensure reliability:
$ cargo run -- --remote-store-url https://checkpoints.testnet.sui.io --streaming-url https://fullnode.testnet.sui.io:443
Endpoint format: https://fullnode.NETWORK.sui.io:443 where NETWORK is one of the available networks:
testnetdevnetmainnetWhen to use gRPC streaming:
:::info
--remote-store-url) to ensure reliability and access to historical data.:::
Polling-based sources periodically check for new checkpoints using the polling mechanism provided by the indexing framework.
The most direct stream source is a subscription to a remote checkpoint store. Sui provides the following endpoints:
https://checkpoints.testnet.sui.iohttps://checkpoints.mainnet.sui.io$ cargo run -- --remote-store-url https://checkpoints.testnet.sui.io
Local checkpoint files are useful for development and testing scenarios:
$ cargo run -- --local-ingestion-path /path/to/checkpoints
Common use cases:
Full node RPC queries use gRPC:
$ cargo run -- --rpc-api-url https://fullnode.testnet.sui.io:443
Endpoint format: https://fullnode.NETWORK.sui.io:443 where NETWORK is one of the available networks:
testnetdevnetmainnetWhen to use RPC API: