RIF Scheduler - Services
The Service Providers will run the scheduler service that will track all new requested transactions and execute them in the correct time
See this guide to run a scheduler on your own
The service works as a caché system. It collects information from another source of trust: The smart contract.
- Stores the requested transactions in a SQLite database (configurable)
- Runs every 5 minutes collecting transactions that need to be executed (configurable)
- Connects to Rootstock (RSK) node using web sockets --
- It executes transactions storing a private key in a file -- this can be easily improved
- It does not expose any HTTP API
It has 5 core components
- Recoverer -- recovers all the requested executions when the service was asleep
- Listener -- notifies the service when new executions are listed
- Collector -- recurrently collects all the transactions that need to be executed
- Scheduler -- sets alarms for collected executions
- Executor -- executes the requested transaction at the given time
The service in designed to allow any of its modules to be switched for different implementations. For example, it is easy to change the scheduler module to implement a different scheduling technique.