Click here to Skip to main content
15,887,027 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Where To Store Configuration File for This App Pin
Richard MacCutchan8-Sep-23 8:01
mveRichard MacCutchan8-Sep-23 8:01 
GeneralRe: Where To Store Configuration File for This App Pin
Gerry Schmitz8-Sep-23 8:20
mveGerry Schmitz8-Sep-23 8:20 
GeneralRe: Where To Store Configuration File for This App Pin
Dave Kreskowiak8-Sep-23 9:24
mveDave Kreskowiak8-Sep-23 9:24 
AnswerRe: Where To Store Configuration File for This App Pin
jschell7-Sep-23 5:11
jschell7-Sep-23 5:11 
GeneralRe: Where To Store Configuration File for This App Pin
Kevin Marois7-Sep-23 5:28
professionalKevin Marois7-Sep-23 5:28 
GeneralRe: Where To Store Configuration File for This App Pin
jschell8-Sep-23 7:50
jschell8-Sep-23 7:50 
AnswerRe: Where To Store Configuration File for This App Pin
Richard Andrew x648-Sep-23 10:33
professionalRichard Andrew x648-Sep-23 10:33 
GeneralRe: Where To Store Configuration File for This App Pin
trønderen8-Sep-23 12:19
trønderen8-Sep-23 12: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 21:31
professionalme@dagsunde.com3-Sep-23 21:31 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon3-Sep-23 21:46
mvePete O'Hanlon3-Sep-23 21:46 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde3-Sep-23 22:20
Dag Sunde3-Sep-23 22:20 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon3-Sep-23 23:18
mvePete O'Hanlon3-Sep-23 23:18 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde4-Sep-23 0:11
Dag Sunde4-Sep-23 0:11 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Pete O'Hanlon4-Sep-23 1:23
mvePete O'Hanlon4-Sep-23 1:23 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 1:55
professionalme@dagsunde.com4-Sep-23 1:55 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
Mircea Neacsu4-Sep-23 0:22
Mircea Neacsu4-Sep-23 0:22 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 0:39
professionalme@dagsunde.com4-Sep-23 0:39 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Mircea Neacsu4-Sep-23 0:58
Mircea Neacsu4-Sep-23 0:58 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
me@dagsunde.com4-Sep-23 1:04
professionalme@dagsunde.com4-Sep-23 1:04 
AnswerRe: Need some advice on Post-Processing large amounts of data. Pin
jschell4-Sep-23 5:33
jschell4-Sep-23 5:33 
GeneralRe: Need some advice on Post-Processing large amounts of data. Pin
Dag Sunde4-Sep-23 9:06
Dag Sunde4-Sep-23 9:06 
Questionbest solution Pin
erummirza31-Aug-23 23:59
erummirza31-Aug-23 23:59 
AnswerRe: best solution Pin
Richard MacCutchan1-Sep-23 4:01
mveRichard MacCutchan1-Sep-23 4:01 
AnswerRe: best solution Pin
jschell4-Sep-23 5:38
jschell4-Sep-23 5:38 
QuestionQuestion on Versioning My App Pin
Kevin Marois24-Aug-23 16:12
professionalKevin Marois24-Aug-23 16: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.