| Deutsch English Français Italiano |
|
<ZqSdna1wIsnm7Qn6nZ2dnZfqnPWdnZ2d@earthlink.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!local-4.nntp.ord.giganews.com!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 25 Jan 2025 05:02:51 +0000 Subject: Re: Tentative File Open & Safe Save Newsgroups: comp.os.linux.misc References: <vmungm$1sjgj$1@dont-email.me> <q6CdnW6It640ug76nZ2dnZfqn_GdnZ2d@earthlink.com> <vn0ofr$2c40e$1@dont-email.me> From: "186282@ud0s4.net" <186283@ud0s4.net> Organization: wokiesux Date: Sat, 25 Jan 2025 00:02:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <vn0ofr$2c40e$1@dont-email.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Message-ID: <ZqSdna1wIsnm7Qn6nZ2dnZfqnPWdnZ2d@earthlink.com> Lines: 55 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 99.101.150.97 X-Trace: sv3-Cctrx/hVQyMw8TnPGwOPvCffm93wNvTUQt0Y+E0UN3j2J6Hvf5AxhkB8bUO9Nhao26HIlAcn08hhcRm!La1KZ0/KxShLOTC/d80j8QI0BHJ8nxYNJrRwROnLsFXM0Nkv2DtC2BaBKoTHpY+zfUGSwbgbSStp!24aBqXGmxJcqfWZsjV1N X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 On 1/24/25 2:08 PM, Rich wrote: > 186282@ud0s4.net <186283@ud0s4.net> wrote: >> On 1/23/25 7:39 PM, Lawrence D'Oliveiro wrote: >>> When developing an app, saving changes that a user has made to a document >>> needs to be managed carefully. Simply overwriting the existing file with >>> the new data can cause trouble, if your app (or the system) should crash >>> part-way through, because then the file ends up with some part of the old >>> document overwritten with the new one, and so the user ends up without a >>> valid copy of either the old or the new version -- in effect, all their >>> work is lost. >>> >> >> Of course systems CAN glitch at any time, often for >> totally mysterious reasons - power maybe, minor >> coding error only hit 1:1000 times, cosmic rays .... >> so if yer stuff is SUPER important, like tax docs >> or whatever ....... > > Third option: > > Use a Sqlite file as the "file" the app uses, and delegate all the ugly > aspects of atomic file "adjusting" and "storing" to Sqlite (which by > now has mitigations for issues most individual developers will never > see nor hear of). > > Plus, a Sqlite file would allow a very easy "versioned file" setup as > well. > > Downside: one has to have an Sqlite module for one's language availble, > or one has to include Sqlite's driver in one's app. I looked into this a bit ... it's a potential solution, but seems, well, a little TOO for the issue at hand. If using Word or Excel, the system continually creates temp files of every little change every X minutes. My bitch is that sometimes if FORGETS to delete all those files after (had to add a filter to my backup pgms) - but I'm not bitching about the CONCEPT. Basically ANY programming language allows easy use of that particular kind of solution. No add-ons needed. Let's say I'm a fan of "KISS" solutions. A concern is systems that update ALL OF THE TIME like databases. Keeping in-transaction copies of every little file is less fun. Totally do-able, and oft is, but less fun. Multi-user record-only-locked files makes it even more less fun. But, alas, abrupt crashes/lockups or user madness is STILL a real problem so SOMETHING has to be done. Computers are machines, and machines fuck up and/or CAN be fucked-up.