Sharing database files without hassle
#1
From what I read, the easiest way to share the database file between two XBMC machines, is to set up MySQL, etc.

Generally, In this case, only one of the multiple machines actually host the media, and the others merely stream the content from the shared drive.

If this is the case, why not have a setting that, instead of creating a local database file for each machine, allow users to point to the database file on the main machine's shared drive? For all I know, this may be much easier said than done, but to me that seams like the most simple and hassle free approach.

Thanks!
Reply
#2
I don't work at all on XBMC, but I think there's a few flaws in your reasoning that you might not have seen. I'm assuming that you mean don't set up a MySQL server allow other XBMC instances to access the main machine's XBMC SQLite databse, please correct me if I'm wrong.

Firstly, an SQLite database is not built in the traditional client/server-daemon architecture, it is purely a flatfile on the filesystem, which means it can't react to queries coming from other machines about its state, or modify itself based on received requests. The only way that other machines would be even able to access the file is if the folder containing it was shared with the network. Then there arises issues with multiple XBMC instances attempting to edit the file at the same time, a problem MySQL avoids by using something called transactions which utilise a form of data locking.

Secondly, the machine holding all the content might not even be running an XBMC instance, it could be a dedicated NAS hard drive plugged into the router sharing via NFS for instance. This means that the main XBMC machine would have to be on all the time as well as the content machine, sharing the folder containing its database file in order for any other XBMC instances to function correctly.

That's not to say it is not possible, but I think that's 2 significant caveats that having a MySQL server running (which many NAS boxes support) avoids.
Reply
#3
Ahhhh, Yes, these are valid points. I did not think about these variable did not occur to me before hand. I suppose the SQL would be the best bet.

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Sharing database files without hassle0