The approach I like to think about Durable Objects, and suggest others too, is to stop worrying abou
The approach I like to think about Durable Objects, and suggest others too, is to stop worrying about "managing the Durable Objects themselves".
When you need them, you just reference them, and they will magically appear. You don't ever delete DOs. By deleting their storage you just stop paying for storage. Even after
Obviously, without any storage used a DO is stateless so its ID doesn't matter much other than for a few seconds before it hibernates again, but it doesn't change the fact that you should not think in terms of creating and deleting DOs.
You delete the storage to not pay for it, not to delete the DO. That's just an implementation detail.
This is also what some literature refers to as "virtual actors", they always exist and are always addressable.
When you need them, you just reference them, and they will magically appear. You don't ever delete DOs. By deleting their storage you just stop paying for storage. Even after
deleteAll(), you can reference the same ID and get it running again.Obviously, without any storage used a DO is stateless so its ID doesn't matter much other than for a few seconds before it hibernates again, but it doesn't change the fact that you should not think in terms of creating and deleting DOs.
You delete the storage to not pay for it, not to delete the DO. That's just an implementation detail.
This is also what some literature refers to as "virtual actors", they always exist and are always addressable.

