We currently support postgres and VSS as remote persistence backends, which makes it possible to run LDK Node in environments where another process could restart the same node identity using the same persisted state.
The problem is that there is currently no ownership mechanism or locking for accessing the persisted state and we can't the 2 copies of the same node running at once. We need a way to ensure that exactly one process owns and mutates a node’s persisted state at a time, while allowing another instance to wait and take over quickly if the active instance crashes.
We should add a locking mechanism in our remote storage to allow for nodes to fail over to another instance if one crashes. Ideally this would also work for mobile use cases where if one mobile wallet is running, it stops another from spinning up until the other has closed.
We currently support postgres and VSS as remote persistence backends, which makes it possible to run LDK Node in environments where another process could restart the same node identity using the same persisted state.
The problem is that there is currently no ownership mechanism or locking for accessing the persisted state and we can't the 2 copies of the same node running at once. We need a way to ensure that exactly one process owns and mutates a node’s persisted state at a time, while allowing another instance to wait and take over quickly if the active instance crashes.
We should add a locking mechanism in our remote storage to allow for nodes to fail over to another instance if one crashes. Ideally this would also work for mobile use cases where if one mobile wallet is running, it stops another from spinning up until the other has closed.