Shared Database Pros vs Cons
#1
I've been considering setting up a shared database for all of my XBMC setups but the more I think about it the less I see a need. There are only two benefits that I can come up with:

1. Share the watched/unwatched status across all systems.
2. Decreased storage requirements as all info, covers, fanart, etc are only stored once.

The pitfalls I see are:

1. Fairly extensive setup of SQL database and settings.
2. Potential for connection errors and speed issues.
3. Unforeseen concerns with individual network setups.

Am I missing anything? I can care less about the space requirements on each unit, and I rarely even bother with watched/unwatched. Is there another benefit I should be considering?
Reply
#2
Take a look at this tread here might help you decide if it is a benefit for you.

I would like to do this, but until there is a better way of handling the images, I'll just wait.
Reply
#3
watched/unwatched is all very good, but stopping video in one room and continuing it in another room is excellent feature this setup introduces
Reply
#4
Have never been able to get the concept to work Sad
Loft - Intel I5-3570K, Asus P8Z77-LX, Corsair 16GB DDR3, AMD HD 7700, AOC 27" LCD
Bedroom - Intel I3-530, Intel DH55HC, Corsair 4GB DDR3, Nvidia G610, Samsung 37" HDTV
Living Room - Intel E8400, Gigabyte GA-E7AUM-DS2H, 4GB DDR2, Nvidia G610, Samsung 52" HDTV
Reply
#5
Anastrophe Wrote:watched/unwatched is all very good, but stopping video in one room and continuing it in another room is excellent feature this setup introduces

I completely missed that ability. That would be an awesome feature to have but I'm not sure it's worth the effort, at least for me. After reading http://forum.xbmc.org/showthread.php?tid=85654 I've decided it's not for me at this time. Maybe down the road when my kids are older and everyone wants to watch something different.
Reply
#6
Anastrophe Wrote:watched/unwatched is all very good, but stopping video in one room and continuing it in another room is excellent feature this setup introduces

I really like this feature.
Reply
#7
I've been considering setting up a shared database for all of my XBMC setups but the more I think about it the less I see a need. There are only two benefits that I can come up with:

1. Share the watched/unwatched status across all systems.
2. Decreased storage requirements as all info, covers, fanart, etc are only stored once.
3. Resume stopped content from one box to another
4. Scape from one box and propagate to all

The pitfalls I see are:

1. Fairly extensive setup of SQL database and settings.
There are EASY step by step guides like this one.
2. Potential for connection errors and speed issues.
I have clients on both WIFI and LAN and have no connection errors or speed issues even with a very large collection (13TB).
3. Unforeseen concerns with individual network setups.
I have no issues with this setup...
Am I missing anything? I can care less about the space requirements on each unit, and I rarely even bother with watched/unwatched. Is there another benefit I should be considering?
Reply
#8
In a mixed OS environment you're pretty much limited to smb.
Reply
#9
I set up the central database and shared thumbs, and it is not that hard, but I agree it looks confusing. What is needed is a concise guide to do it (and maybe there is one), there is the lifehacker guide and that thread has other pieces, etc to it, but for now you have to hack the parts togeather based on your configuration. What is critical and I don't think is explained well is that the method to get to the content must be the same for all xbmc clients as that becomes the key to how content is stored and referenced in the library database and in the thumbnails folder.

I suggest you break it in to pieces.

1. Build a shared libary in mySQL (dont load the data into the shared libary, just build the mysql instance)
you need to know this for the advancedsetting.xml in each xbmc client

2. Build a shared Thumbnail server
You will require this for your client mounts and/or setting in each clients path sub in advancedsettings.xml

3. Build a Shared Source file server
Each client needs to access the files in the same way for the shared library to work correctly, you will need this so the shared database is built correctly and xbmc clients can access the files correctly. this data will be common in your sources.xml file to all your clients. You can have other unique sources in these clients but DON'T add those sources to libraries, or your other clients will see them and have no path to access them. just access those unique sources in file mode.

4. Develop a common set of client configuration setups that will use your shared common file server, thumbnail server and data base server.
Get one client working, then get 2 working, when you have 2 working you can keep stamping them out.
once you have one client working with what you think good common common configuration, e.g. they are accessing all the music and video files using the same paths, you can now use that xbmc client to load your shared database. This will populate the shared database and thumbnail share with the data that all the other clients will use to know what you have, how to get to it and what the thumbs look like. After that is done, and each client is configured the same way each client add or remove things from library with out issues.

Where you can get yourself into trouble is here. For example, you have a PC that is both a xbmc client and is your SMB server (is the host for your video and music files) when you configure the sources you might think it is ok to directly access the filesystem to the path of that file, and on your clients you set the source up to use the SMB mount. This will cause you all kinds of problems. You need to configure both xbmc clients to access the source the exact same way, SMB being likely the most common way, but NFS or other shared methods that will be consistantly the same from client, should work too. c:\movies is not the same as SMB://uid@pwd:SMBSERVER/movies, all xbmc clients (including one that may be on the same computer as where the files are located) should access the sources the same way, e.g. SMB://uid@pwd:SMBSERVER/movies that is why all my clients share a common sources.xml file that looks something like this: (this is a snippet of just the configuration for my movie sources)
Code:
...
    <video>
        <source>
            <name>Movies Volume</name>
            <path pathversion="1">smb://uid:pwd@host/Movies Volume 1/</path>
            <path pathversion="1">smb://uid:pwd@host/Movies Volume/</path>
        </source>
...



The mysql setup is very easy. not point and click easy but close.
the shared thumbnail stuff is a bit more confusing to understand what is going on and what is working and what is not in different implementations of xbmc with the advanced services substitutions tags or using fileshare and symbolic links to replace the thumbnail directory in your xbmc clients.

Here is what I am doing right now:

Server
Windows 7 PC
MySQL
SMB share with an account with RW access to that directory.

clients
2 openelec, 1 atv2 and 2 windows

Windows and openelec clients are configured to access the mysql instance on the server by configuring the advancedconfig.xml file.

atv2 is using a newer version of the database and will auto upgrade the database making it unusable for clients using the older versions, so it is using it own database for now, but I am sharing the thumbnails with it. (yes this can create corner case issues, like don't delete your library on the atv because it will clear out the shared thumbs) until you know what your are doing and the behavioral issues I would not recommend sharing thumbs clients that are not sharing the database.

For Thumbnails sharing

Openelec clients
just configure a SMB mount with RW access of the Thumbnails directory
then create a symbolic link replacing your userdata/Thumbnails with your mounted Thumbnails
now you have shared thumbs on the unix/linux/openelec client

for atv I use
<pathsubstitution>
<substitute>
<from>special://Thumbnails</from>
<to>smb://uid:pwd@HOST/Thumbnails</to>
</substitute>
</pathsubstitution>

Now you have shared thumbs on the atv
not sure why this was not working on the openelec clients but it didn't

and for the windows clients, one of them is the host server so no change required and the other uses the SMB mount and the equivalent of symbolic links for windows.

Once the path substitution method is working for all my versions of xbmc, will stop using the symbolic links and direct SMB mounts.

one more thing, you will want to make sure all your xbmc clients are using the same method / sources for building the shared database library and thumbnails. It looks like they hash the complete path to the source + file name as the primary unique key, so if one XBMC client access a file one way and another access it the other way, you will get what look like multiple instances of a movie for example, that contain the access paths of the other clients. To address this I suggest you use a common sources.xml or make sure you configure all xbmc clients to use the exact same paths to sources.

This may sound complex but it is not that bad, it just needs a good guide written, explaining the concepts and the execution.

If I had time I would.
Reply
#10
Thanks claypigeon,

That was a very straight forward and understandable writeup about using Mysql with XBMC that I have read! Big Grin
Reply
#11
Thanks claypigeon. That was a good writeup. I may give it a shot afterall. The wifey is showing an interest in it. I'm currently consumed with setting up my new home theater, but once I've got it setup, I'll look at this more.
Reply
#12
Again, thanks for taking the time to do this. It gave me the confidence to take a little time last night and set it up with one of my Windows Vistas. Works great! Combining your info with the lifejacker's and one over at the unRAID forum made it very simple to achieve.

Today I plan to test the adding of one of my XBMClive's. I do have a question before I do this.

claypigeon Wrote:...To address this I suggest you use a common sources.xml or make sure you configure all xbmc clients to use the exact same paths to sources...

Do you mean that just one sources.xml should be created, and then symlinked to each instants, just like handling of the Thumbnails folder?
Reply

Logout Mark Read Team Forum Stats Members Help
Shared Database Pros vs Cons0