database - Multiple users simultaneously updating XML file -


let's got following scenario:

an application runs locally on 2 computers, xml file shared.

user 1: load file. user 2: load file, update row 5. user 1: update row 6, click "save". user 2: click "save".

can prevent last "save" click override updated values of user 1?

will ms access db instead of xml file solve problem?

access might partially solve them, it's weaker in area full dbms. if want stay file based, have 3 basic options.

you write "server" deals concurrent access file.

you use pessimistic lock, first person ask edit file gets it, others read only

you use optimistic lock. if file has changed since loaded, don't allow saved. can beef doing diff , conflict resolution. think merging code changes, complicated quick though.

nb dbms might need conflict resolution layer.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -