AI / Apache Burr Interview questions
Define State Persistence in Burr?
State Persistence is Burr’s core API for saving and loading application state to and from a database, so a run can be paused and later resumed exactly where it left off.
Writing is enabled with with_state_persister(persister) on the ApplicationBuilder, which writes state after every action. Reading/resuming is enabled with initialize_from(persister, ...), which loads a prior state if one exists or falls back to a default otherwise. The same persister instance is commonly used for both.
For built-in persisters, state must ultimately be JSON serializable (custom types can hook into Burr’s serialization API if needed).
More Related questions...