refactor to prepare for supporting multi-backend
support deleting app
implement app hot swapping
fix state unmatch
fix: instances info should be vector