A few use cases of the node RPCs are:
- administration of the node (for example, blacklisting a peer)
- monitoring of the node (for example, checking that the node is bootstrapped)
- communication with baker binaries (baker, endorser, and accuser)
- communication with tezos-client which is both a command-line wallet and a command-line interface to the protocol
- monitoring of the chain, typically to index new blocks when they are added to the chain (or operations when they enter the mempool)
It is not impossible to use RPCs to run a dapp but it has some limitations that indexer APIs don’t have:
- The node does not store what it does not need; this is important because users of the chain are charged for what they store onchain. Typically, since we cannot iterate over big maps there is no need to store the keys so the keys are not stored and the storage cost of big maps is independent of the size of the keys.
- In some cases, data is stored but not in a way that allows to get it efficiently. For example, for a given account, the balance is stored in the context but the transaction history of the account can only be obtained by iterating over all operations of all blocks which is extremely slow. Indexers store transactions in a way that makes getting the transaction history of an account efficient.