How It Works
The NEAR Indexer works by running a node and processing blocks as they are added to the blockchain. The framework provides a stream of blocks, allowing developers to subscribe and process these blocks in real-time.Comparison with NEAR Lake Framework
Comparing to NEAR Lake Framework in terms of latency the NEAR Indexer is significantly faster as it reads data directly from the blockchain the same way as RPC nodes do.| Feature | Indexer Framework | Lake Framework |
|---|---|---|
| Allows to follow the blocks and transactions in the NEAR Protocol | Yes | Yes (but only mainnet and testnet networks) |
| Decentralized | Yes | No (Pagoda Inc dumps the blocks to AWS S3) |
| Reaction time (end-to-end) | minimum 3.8s (estimated average 5-7s) | minimum 3.9s (estimated average 6-8s) |
| Reaction time (framework overhead only) | 0.1s | 0.2-2.2s |
| Estimated cost of infrastructure | $500+/mo | $20/mo |
| Ease of maintenance | Advanced (need to follow every nearcore upgrade, and sync state) | Easy (deploy once and forget) |
| How long will it take to start? | days (on mainnet/testnet) | seconds |
| Ease of local development | Advanced (localnet is a good option, but testing on testnet/mainnet is too heavy) | Easy (see tutorials) |
| Programming languages that a custom indexer can be implemented with | Rust only | Any (currently, helper packages are released in Python, JavaScript, and Rust) |