Let's take a simple example. I have a stateful service that manages users. It has a reliable dictionary that maps UserID to some data, including User Name.
In this service's RegisterUser method, we want to check that the user name has not already been used. This is quite straightforward when the service is a singleton, but when it's partitioned we end up with several problems:
I'm looking for general advice for possible ways to deal with situations such as this. I can imagine that this sort of problem would occur regularly with partitioned data.
This is usually resolved with an external data store that is atomic in nature. Use a transactional data store like a SQL database to store user names/ids. This will allow you to do things like create unique constraints to enforce the uniqueness of these user names.