Move to SQL server instead of db3 file? (1 Viewer)

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Most file systems provide the ability to lock a file and SQLite does indeed use this feature. According to their documentation though, with many configurations, file locks on network shares are not consistently honored. I suspect this is a big cause of the corrupt database issue. If you can't guarantee atomic access to the database though, I am not sure there is a work around aside from limiting access to the database to only one app (I am referring to a client/server scenario again).

    Oh, indeed. Filesystems should provide a secure way to lock the file. It should be atomic, but as you said it wont work nicely when it comes to networked shares (Windows, Linux... both are in the same boat).

    So, if someone writes a server component that handles all the talking to the SQLite DB (as we don't want to rely on the broken locking over network) it would solve the DB corruption. Also same component could be used to make sure that the data iself is valid (different issue that the DB corrution).
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    44
    Texas
    Home Country
    United States of America United States of America
    I agree, and this is the approach we plan to take with Moving Pictures when we implement multi-seat support.
     

    joz

    Portal Pro
    March 17, 2008
    1,353
    306
    Home Country
    Netherlands Netherlands
    Interesting discussion you guys are having here, learned a bit in the process :D

    If MP2 will handle these sorta concurrency issues then maybe moving pictures and tv series and others should not be trying to recreate the wheel for mp1, imo.
    Anyways will be a while since I guess it's not an easy matter and maybe a lot of work and testing, you don't hear me complaining (I would like it though). Just the usual, "it's done when it's done" ;)
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    44
    Texas
    Home Country
    United States of America United States of America
    Well long term we plan to expand Moving Pictures to other platforms (Windows Media Center specifically). So given that we would need to maintain our own storage system.
     

    MrLobster

    Portal Pro
    July 21, 2009
    70
    18
    Home Country
    United Kingdom United Kingdom
    Interesting discussion you guys are having here, learned a bit in the process :D

    If MP2 will handle these sorta concurrency issues then maybe moving pictures and tv series and others should not be trying to recreate the wheel for mp1, imo.
    Anyways will be a while since I guess it's not an easy matter and maybe a lot of work and testing, you don't hear me complaining (I would like it though). Just the usual, "it's done when it's done" ;)

    Its only recreating the wheel, if its already been done before (MP2 isnt anywhere near finished, but i would love some info on progress). Now is the time for everyone concerned (including MP creators) to find the best method for achieving this goal.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Well long term we plan to expand Moving Pictures to other platforms (Windows Media Center specifically). So given that we would need to maintain our own storage system.

    That's a bit unfortunate as it wont fit into the MPII general idea, where all plugins could access all the media items and metadata if needed. But maybe MPII implementation for the Moving Pictures can be handled with a wrapper for MPII MediaLibrary, where the actual data is not stored in MPII's ML. Sounds hacky, but still better than not allowing other plugins to access the data.

    I think Albert could/should explain the MPII MediaLibrary :)
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    44
    Texas
    Home Country
    United States of America United States of America
    I am sure we will figure something out. We already have an abstraction layer for the database, so outside of that we never interface directly with SQLite. Based on that it would not be difficult to create a new ORM implementation with the same interface as what we currently have, that hooked into MPII instead of SQLite. It really just depends on what advantages the MPII ORM brings though. We already have a relatively robust DB layer so spending time to change it would have to mean that there were definite advantages in doing so.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    We already have a relatively robust DB layer so spending time to change it would have to mean that there were definite advantages in doing so.

    Biggest benefit is that plugins can share the metadata. Every plugin can extend the media item's metadata elements to match it's own need.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom