Concurrent use of data from different client sites
Hi all i know this question is not specific to this forum. I am asking here as i think i will get much more response from here other than any other forum.
I want to manage concurrent use of data from different cliet sites. I am working in a health care project. I want to show one particular record of a patient say one of his problems details with read/write permission to first client who requested the details first. And to other users who are requesting the same record should get a read only view of the data. How can i implement this effectively. Mine is web based application. at present i am keeping a map of record id, and user who is viewing this in server for each type of record. I know this is not an effective method. Can anyone sugest an effective method for this.
Re: Concurrent use of data from different client sites
More effective method is the following:
1) Give read/write access to every client that opens a record.
2) In the case client updates data, block the record and check whether it was changed/deleted from the time it was loaded. If data was changed, you need to show message "Data is changed by another user", and reject current change or merge current change with previous one - depending on your needs.
However, all these algorithms are built in modern database technologies. For example, take a look at optimistic and pessimistic locking.
Re: Concurrent use of data from different client sites
Hi Alex, we thought of this method first but then we changed out plan. Its just because we need to show the user who access the record second that this is a readonly data and so he/she dont try to update the record. We think this will be more user friendly when we see things in a user point of view.
Can you suggest a method for this flow.