views:

123

answers:

1

I have a object map on my server (objects representing Customers, Orders, Items, related to each other, based on content from a database) and want to keep an up to date version of that object map in the browser where the user is manipulating and viewing the data.

Since more users can access and modify the same object map at the same time, I need a way to keep the clients in sync with the server.

My server environment is based on .net/asp.net 3.5 sp1, and the client needs to run in a browser (html/javascript). I am considering using asp.net ajax 4.0 due to its databinding capabilities and observable collections on the client side, and using something like .net ria service or ado.net data services on the server.

If anybody have any experience or know of blog posts/tutorials/research papers/articles/you name it, on the topic, I would really appreciate a link or comment.

Best regards, Egil.

+1  A: 

Concurrency control is a complex area and is more of a question of design, rather than what client-side/AJAX tools to use.

For example:

  1. user A opens object X (to modify if)
  2. user B opens object X, modifies it and saves

At this point user A will clobber user B's changes upon save (aka last-in-wins). There is no single best-practice solution to this problem. And although choosing the right tools/libraries for the job is important, what ASP.NET AJAX version you are using is the least of your worries here.

Here's a short article on the matter that speaks to client/server architectures. It's written in layman's terms and is a really nice intro to the problem you're thinking about.

Crescent Fresh
Thank you for the feedback and links. I do understand the basic problem and challenges of concurrency control. It may not have been clear my original question that I am looking for input on how to do it in my environment - browser/javascript with a .net web service on the other end.Mind you, I am definitely not trying to do anything as advanced as Google Wave, i.e. I dont need character by character sync.
Egil Hansen