Quote:
Originally Posted by erwin1234
Thank you for making this a seperate thread.
The FAQ does not make sense because the answer to the question "on setting up calibre to run from a network" is smiply "Do not put your calibre library on a networked drive". That is not an answer !
The content server solution is not an option. The goal is to have ONE user at the time working with the full calibre software using the DB over the network. So multiple user but NO concurrency - only one user at the time. But from different locations.
Solution 1: All modern network filesystems have a file locking option - if you open a Word file over the network and another user opens the same file you get a dialog box with "file is already open". This could be a simpe check in calibre? http://en.wikipedia.org/wiki/File_locking
Solution 2: Alternatively you could just create a temp filename "metadata.db.locked" at startup and check for the presence of this file at startup and open it for read/write. If you succeed, you can continue. If not, it is already opened in another instance, so inform the user and quit. The normal program exit would remove this .lock file. But in case of a crash it still works because the file will be closed after some time by the OS.
|
Calibre works with more than just the metadata.DB.
Calibre also does a 'Transaction' with the file system (the contents of the Book Folders).
You change an Author or Title, The Author or Title folders get Renamed/Moved.
You change the cover, and the Cover file gets updated
You change any Metadata, and Metadata.OPF (the backup) gets updated
It is not as Simple as 'Let the OS locking do it'.
Caching created delays alone will wreak havoc if any file is delayed and another Calibre instance makes a request before the 'transaction' has reached stability.
Timing is everything.
Kovid is doing a re-write to accomplish Multi User.
Again, Timing.
It will only be released when it is working perfectly Right