Click here to Skip to main content
15,843,865 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Where To Store Configuration File for This App Pin
Richard MacCutchan8-Sep-23 9:01
mveRichard MacCutchan8-Sep-23 9:01 
GeneralRe: Where To Store Configuration File for This App Pin
Gerry Schmitz8-Sep-23 9:20
mveGerry Schmitz8-Sep-23 9:20 
GeneralRe: Where To Store Configuration File for This App Pin
Dave Kreskowiak8-Sep-23 10:24
mveDave Kreskowiak8-Sep-23 10:24 
AnswerRe: Where To Store Configuration File for This App Pin
jschell7-Sep-23 6:11
jschell7-Sep-23 6:11 
GeneralRe: Where To Store Configuration File for This App Pin
Kevin Marois7-Sep-23 6:28
professionalKevin Marois7-Sep-23 6:28 
GeneralRe: Where To Store Configuration File for This App Pin
jschell8-Sep-23 8:50
jschell8-Sep-23 8:50 
AnswerRe: Where To Store Configuration File for This App Pin
Richard Andrew x648-Sep-23 11:33
professionalRichard Andrew x648-Sep-23 11:33 
GeneralRe: Where To Store Configuration File for This App Pin
trønderen8-Sep-23 13:19
trønderen8-Sep-23 13:19 
Richard Andrew x64 wrote:
On second thought, even this wouldn't work because a person might still write an older version of the file when committing changes.
So, either lock the file, read what you need to make a decision, and write it back, in one go.

Or, if you require some time to ponder the changes: Read lock, take note of the last modification time, read, release. Do all your pondering, preparing your changes. When changes are ready to be written: Exclusive lock, check time of last modification. If later than the one you saw the first time, read the new data, release and repeat from the pondering step. If write timestamp is unchanged, write your new data and release.

This is a file system version of database 'optimistic locking'. With database transactions, you should always be prepared for a rollback if some other transaction modifies data you have based your calculations on. I am not saying that all database applications are prepared for rollback, only that they should be Smile | :) . Databases with optimistic locking favors short transactions: The shorter the time span from data are read to the commit, the less risk for someone else making modifications inbetween. Your DIY optimistic file system locking is similar: Do all the preparations that you can do without reading the file, leaving the minimum work between reading and writing, to reduce the risk of a rollback. But you must be prepared for it, forcing you to read the updated data before attempting a redo transaction.
QuestionNeed some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com3-Sep-23 22:31
professionalme@dagsunde.com3-Sep-23 22:31 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon3-Sep-23 22:46
subeditorPete O'Hanlon3-Sep-23 22:46 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde3-Sep-23 23:20
Dag Sunde3-Sep-23 23:20 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon4-Sep-23 0:18
subeditorPete O'Hanlon4-Sep-23 0:18 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde4-Sep-23 1:11
Dag Sunde4-Sep-23 1:11 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon4-Sep-23 2:23
subeditorPete O'Hanlon4-Sep-23 2:23 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 2:55
professionalme@dagsunde.com4-Sep-23 2:55 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
Mircea Neacsu4-Sep-23 1:22
Mircea Neacsu4-Sep-23 1:22 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 1:39
professionalme@dagsunde.com4-Sep-23 1:39 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Mircea Neacsu4-Sep-23 1:58
Mircea Neacsu4-Sep-23 1:58 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 2:04
professionalme@dagsunde.com4-Sep-23 2:04 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
jschell4-Sep-23 6:33
jschell4-Sep-23 6:33 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde4-Sep-23 10:06
Dag Sunde4-Sep-23 10:06 
Questionbest solution Pin
erummirza1-Sep-23 0:59
erummirza1-Sep-23 0:59 
AnswerRe: best solution Pin
Richard MacCutchan1-Sep-23 5:01
mveRichard MacCutchan1-Sep-23 5:01 
AnswerRe: best solution Pin
jschell4-Sep-23 6:38
jschell4-Sep-23 6:38 
QuestionQuestion on Versioning My App Pin
Kevin Marois24-Aug-23 17:12
professionalKevin Marois24-Aug-23 17:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.