Use an in-memory database for staged updates and commit in sorted order