Search code examples
wcfweb-servicessoapws-reliablemessaging

Building a reliable service in WCF


I am currently designing a service (wsHttp) which should be used to return sensitive data. As soon as a client asks for this data, I get it from the database, compile a list, then delete the data from the database and return the list.

My concern is that something happens on the way back to the client (network issues, ...) I have already deleted the data from the database, but the client will never get it.

Which out of the box solution do I have here?


Solution

  • This is an inherent problem in the distributed computing. There is no easy solution. The question is how important it is to recover from such errors.

    For example, if one deletes some records but the client gets disconnected, next time he connects he will see those records as deleted. Even if he tries to delete them again (data stayed in the UI), this will do no harm.

    For banks transferring money, they have an error resolution mechanism where they match the transactions that happened between them in a second process. Conflicts will be dealt manually.

    Some systems such as NServiceBus rely on MSMQ for storing messages and eventual consistency where a message destined to a client will eventually arrive whenever he is connected again.