Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Handling updates in distributed applications

Updates in distributed application usually involve performing optimistic locking on the data to be updated. This requires to store a copy of the previous column values or to have a 'version' field in the database table to compare against it.

Let's say we decide for the first approach.

If we have a stateless middle tier, then the old values and the new values needs to be sent to the middle tier in each update, so it can compare the values and perform the update. If we have a stateful one, the values could be kept in the middle-tier state. A stateful middle tier is as its own set of problems, so let's say we decide for a stateless one.

If we need to send the old values and the new ones, the data structure that is exchanged through the tiers should support storing the two versions of the data and sending the differences.

DataSets do this using diffgrams.

I have two questions:

- How do you deal with this problem if you are not using DataSets to exchange data between tiers?

- How do you deal with this problem if you are building a Web Service that needs to talk to Java, that does not have built-in support for diffgrams?

 

2 Comments

Comments have been disabled for this content.