Hey, great question(s)
I’d probably create a special database resource, which stores the names and respective versions. We’d need to finish work on adding the node transactions to a database-wide transaction though and once committed the resource is also kept up to date.
The slightly harder thing will be to manage failed database-wide transactions, but maybe in the first step we can ignore this and add cleanup methods in a second step.
But in general I think it’s not so much work (when a special .commit-file is not deleted inside a resource-folder it means a transaction started but crashed in the middle – we then need to truncate the resource back to the offset of the most recently committed revision and UberPage, otherwise some storage space would be wasted) Other than that I think we either could run background threads periodically to do this or wait until a read-write transaction is opened on the resource again.
We’d also have to check the special resource in the most recent revision to truncate the most recent revisions, if a database-wide transaction fails. Maybe we can also manage this with a special .commit file which just denotes if a database-wide transaction failed or not.