View Single Post
Old 06-20-2010, 07:29 AM   #1
Krystian Galaj
Guru
Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.Krystian Galaj can tame squirrels without the assistance of a chair or a whip.
 
Posts: 820
Karma: 11012
Join Date: Nov 2007
Location: Warsaw, Poland
Device: Bookeen Cybook
Possible storage plugin?

Nearly weekly there's a new thread about storage of calibre's books in the filesystem, and asking why is it done such way.

I wonder if it would be possible to abstract the functionality of storing of calibre's files on disk in a separate plugin. There could be an abstraction layer between this plugin and the rest of calibre, defining operations calibre presently needs, or is likely to need in the future to create/delete/rename/move/setCurrent folders, read/write/create/delete/rename/copy/move files in them. The default module would simply forward those calls to system calls, and thus calibre's library would stay as it is, a subfolder tree on filesystem - but other storage plugins could also be made then. One such plugin could store all the information in a single opaque file and maintain the calibre-visible filesystem inside it. That might also allow to store Unicode filenames on old or/and crazy filesystems that don't support them, and would drive home the point that calibre's filesystem data is private to calibre. Another version the plugin would remap file/folder naming/positioning to allow tinkerers to keep the calibre file/folder structure just the way they like it, while still aloowing calibre to get all the neccessary info through known calls.

Of course, I don't know enough of calibre's workings to know all the details (it probably would make more sense to define more database-like storage structure, to represent database connections more naturally), but I think with this level of interest, removal of this functionality to a plugin might lead to creation/modification of versions of this plugin by interested people, creation of versions of the plugin customized for speedier operations on specific storage media, and less topics with people complaining that calibre isn't for them because they can't adopt it to fit their needs perfectly.
Krystian Galaj is offline   Reply With Quote