Posts: 2
Joined: Apr 2010
Reputation:
0
I've read through the thread and I'm very interested in getting a central mysql server up and running. Are there some directions on how to get this enhancement? If its part of the trunk (SVN) what changes do we need to make to the config files to get it to use a mysql DB running on another box?
Sorry if this was answered earlier and I missed it.
Posts: 11
Joined: Apr 2010
Reputation:
0
Another DBA who is also a user here with my thoughts..
- Normalizing the data and reducing the redundancy of the tables seems to be an excellent idea.
- I also agree that including the TYPE in the field name is a bad idea
I don't however see the case for supporting a network / service based DB... It seems to be a great deal of work that will increase complexity but has little or no value based on how XBMC actually works..
MySQL and PostgreSQL are designed for dealing with lots of transactions from many processes, however how many instances of XBMC are you going to see in one home network? SQLlite is actually faster when used locally and for reading can support concurrent access from multi-pule sources. It has built in locking to prevent concurrent writing from multi-pule sources.
What I propose instead would be a master / slave style sharing.. continue to use SQLLite and have an option to share a master DB from a network share or from XBMC it self on a special share.. Additional XBMC units could then be slaves.. From an end user point of view this would be much easier to manage as setting up a Service based DB and managing it probably well beyond the ability of a simple end user...
In the master slave setup all XBMC databases would be the same and sync up their records, all containing a common set.. Slaves would sync up common records to the master and sync back down any new records on the master they find... The master would control the deletion and DB cleanup tasks to ensure the databases stay clean.
I really don't think a LIVE network linked DB would work well for XBMC, for one it would be slow for retrieval of artwork and two it might take away bandwidth from video streaming tasks. Not to mention writes over the network during discovery would be slower.. Building up a local DB then syncing the DB should provide much better local performance and be fault tolerant to disconnects from network issues, or power loss on the master.
I see XBMC as more of an appliance, keeping DB management out of sight of the user would be ideal in my mind.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Such users should simply use UPnP - no need to reinvent the wheel here. Agreed there are some improvements that can and should be made to our UPnP server (eg serving fanart to clients).
For those users that really do want a centralised database, I don't see any huge issue with supporting one - it actually has benefits as far as the internal sqlite database goes. The code becomes more modular and likely more efficient, and has the benefit of being more open to scrutiny from DBAs such as yourself - after all, none of us core developers are DBAs (or, perhaps more correctly, those that are don't want to work on this aspect of XBMC).
Artwork retrieval isn't a problem really - each XBMC client will ofcourse have a local cache of all of that - no matter how the system is arranged, there'll be time taken up caching local copies of artwork.
Similarly, network outages aren't really an issue in a home LAN, nor are power outages, and the centralised database is designed to handle data integrity.
firnsy has done some great work on getting an initial improved schema written up - we're just working through some more details and will have it available for comments in the coming weeks. It is imperative that we get this right first time. Obviously this schema applies to both sqlite and a central db.
Cheers,
Jonathan
Posts: 3
Joined: Jan 2010
Reputation:
0
Hi there,
That's a brilliant improvement you're working on!
jMarshall mentioned the artwork will be cached on the local machine, so I have a question about what kind of memory is expected to be necessary on that satellite machine.
I'm planning to set up a huge server at home connected to a 1Gb network with all my media collection, with several thousands music and videos.
I am trying at the moment a VIA Pico-ITX machine, that I would like to use as terminal everywhere in the house where media is needed, connected directly through the LAN, and controlled with a Logitech Remote.
The OS will be Ubuntu installed on a 4 or 8 Gb Flash disk maximum, and no hard drive, so I wonder if in this configuration I will have enough space to manage this cache if the library is really huge...
Sorry if my question is too anticipative; I'm looking for my best move on the hardware as I definitely want XBMC to be the media center.
Cheers!
Thomas
Posts: 815
Joined: Nov 2008
Reputation:
9
I understand storing media on your local box, but why not reference that media by a universal name for all your network clients.
So instead of C:\media\localmedia as your source
You use: smb:\\myclientpc\localmedia
(or some other protocol if your not a smb guy)
This is what I do. It allows me to take advantage of unused space on my dumb clients, works well with the central DB storage, and allows the media to be accessed by every xbmc client instead of just locally.
I should mention that all my xbmc PC clients are always-on, so this may work better for my case than yours.
Hope this helps someone.