Sweeper - Polls the RPC for new block data and submits it to the message queue.
Flusher - Consumes messages from the queue and processes them into the database.
Prunner - Periodically prunes the database and stores backups in a cloud storage service.
Each service runs continuously and must be executed together for the indexer to function properly.
Sweeper
- Retrieves the latest indexed block from the database.
- Fetches data for the next block using the RPC methods
/block
and/block_results
. - Publishes the block data as a message to the message queue.
Flusher
- Subscribes to and reads messages from the queue.
- Processes each message and inserts the data into the database.
Prunner
- Triggers at predefined intervals.
- Checks whether the database requires pruning.
- If pruning is needed:
- Fetches prunable rows from the database.
- Uploads the data to a cloud storage service.
- Deletes the fetched rows from the database.
Follow the guide for running the Informative Indexer with Docker: dockerfiles/README.md.