Note that there are some explanatory texts on larger screens.

plurals
  1. POCan you sacrifice performance to get concurrency in Sqlite on a NFS?
    primarykey
    data
    text
    <p>I need to write a client/server app stored on a network file system. I am quite aware that this is a no-no, but was wondering if I could sacrifice performance (Hermes: "And this time I mean really slash.") to prevent data corruption.</p> <p>I'm thinking something along the lines of:</p> <ol> <li>Create a separate file in the system everytime a write is called (I'm willing do it for every connection if necessary) </li> <li>Store the file name as the current millisecond timestamp</li> <li>Check to see if the file with that time or earlier exists</li> <li>If the same one exists wait a random time between 0 to 10 ms, and try again.</li> <li>While file is the earliest timestamp, do work, delete file lock, otherwise wait 10ms and try again.</li> <li>If a file persists for more than a minute, log as an error, stop until it is determined that the data is not corrupted by a person.</li> </ol> <p>The problem I see is trying to maintain the previous state if something locks up. Or choosing to ignore it, if the state change was actually successful.</p> <p>Is there a better way of doing this, that doesn't involve not doing it this way? Or has anyone written one of these with a lot less problems than the Sqlite FAQ warns about? Will these mitigations even factor in to preventing data corruption?</p> <p>A couple of notes:</p> <ul> <li>This must exist on an NSF, the why is not important because it is not my decision to make (it doesn't look like I was clear enough on that point).</li> <li>The number of readers/writers on the system will be between 5 and 10 all reading and writing at the same time, but rarely on the same record.</li> <li>There will only be clients and a shared memory space, there is no way to put a server on there, or use a server based RDMS, if there was, obviously I would do it in a New York minute.</li> <li>The amount of data will initially start off at about 70 MB (plain text, uncompressed), it will grown continuous from there at a reasonable, but not tremendous rate.</li> <li>I will accept an answer of "No, you can't gain reasonably guaranteed concurrency on an NFS by sacrificing performance" if it contains a detailed and reasonable explanation of why.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload