Sending the NOTIFYs in `write_to_store` feels wrong. I think the caller should be responsible for working out whether a NOTIFY is needed and call a separate function.

Also, how does this work with geographic redundancy, where you write to local and remote stores?