OPINION - Pros vs Cons shared mysql database
#1
Hey Folks,

I would like peoples opinion on using a central database for my kodi system. Currently I use 4 android players and 1 pc. My media collection is VERY large and I have contemplated doing this since it would be nice going from one player to another and have my saved viewing spots etc. The other issue I have which is not really an issue, more or an annoyance, is when I access my collection, at least on the android players which are Khadas Vim3 Pro's which are pretty quick as they are, can take 15-25 secs some times. The PC is slightly faster at 5-8 secs which I am attributing to it running on a NVME drive. I have no such option for the VIM3. 

Also when I add media to it, because the shared drives are so large and full of media it can take 20mins to scan through the drives for added media. If for some reason I need to burn down one of the players for updates or something, rebuilding the collection DB from scratch can take 90 mins...

#1: Would using a shared DB increase performance accessing the collection if it was hosted on a super fast NVME and ran over a gigabit network? The VIM3's are limited to the speed of a usb 3.0 drive but do have gigabit ethernet.

#2: When adding new media into a shared DB would it be a 1 shot thing, since I am assuming the changes would propagate to the others that are using the shared DB?

#3: Is there a way to run multiple DB's and or User profiles? Say I have my movies/shows that I watch and have bookmarks. My partner has her own movies/shows which I would like to keep separate on the interfaces. Or am I relegated to just using different players?

#4: What would be the cons of a system like this?

Any folks using a system like this? Any advise would be greatly appreciated.

Thanks!!
Reply
#2
(2021-12-11, 21:15)TemporalBurn Wrote: My media collection is VERY large
Give us a some indication of the number of movies and tvshows/episodes.

(2021-12-11, 21:15)TemporalBurn Wrote: Also when I add media to it, because the shared drives are so large and full of media it can take 20mins to scan through the drives for added media.
In a "proper" NAS / File server, the FAT of each drive would be cached, so access to their directory listings would be quite fast. And yes, scanning/updating your media collections is best done by the fastest gruntiest computer in the Kodi network.

(2021-12-11, 21:15)TemporalBurn Wrote: #1: Would using a shared DB increase performance accessing the collection if it was hosted on a super fast NVME and ran over a gigabit network?
It's about the fastest way a database can read/write data.

(2021-12-11, 21:15)TemporalBurn Wrote: #2: When adding new media into a shared DB would it be a 1 shot thing, since I am assuming the changes would propagate to the others that are using the shared DB?
Yes, only each Kodi client will need to read artwork to its own local cache. You could try to place the Thumbnail cache on a shared server, but filepaths are best kept identical for all connected Kodi clients.

(2021-12-11, 21:15)TemporalBurn Wrote: My partner has her own movies/shows which I would like to keep separate on the interfaces. Or am I relegated to just using different players?
You can define a separate database for several or even each Kodi client. Downside is that each database requires its own scanning/scraping of new material.

(2021-12-11, 21:15)TemporalBurn Wrote: #4: What would be the cons of a system like this?
A bit of SQL (maintenance) knowledge (such as for database backups) always helps.

(2021-12-11, 21:15)TemporalBurn Wrote: Any folks using a system like this?
I've been using a MySQL database since XBMC Eden, some 14-15 years ago. It still works for me.
Reply
#3
Klojum, Thank you for the quick response. Is there a way to PM you?
Reply
#4
(2021-12-11, 21:46)TemporalBurn Wrote: Is there a way to PM you?

Nope. TeamKodi people are not personal assistants.
Why would you need to PM (which is currently not even enabled for you as a forum newcomer) ?
Reply
#5
Sorry Man,

I was NOT looking for a personal assistant...

I have a larger project, that because...
Quote:I've been using a MySQL database since XBMC Eden, some 14-15 years ago. It still works for me.
I thought you might be interested in some GIG work on design of said system.. That was the whole idea of me asking the opinion...

Sorry, if I don't want to put my personal business out there for everyone to see..


None the less, thank you for your input on the previous post..
Reply
#6
This is a public support forum for a free open-source software application. Questions that you ask could also be applicable and/or beneficial to other people as well. PM messaging is only a last resort IMO.

For a "larger project" we'll still need at least some details upfront. Larger can be 5 to 20,000 clients. Business solutions should be handled by people who can do database solutions for you. We may be quick in initial responses on the forum, but we don't offer 24/7 support on location.
Reply
#7
Having a shared (MySQL or MariaDB) database running on a 'server' type device like a NAS, that also hosts your media will have a lot of benefits. But it will only be as good as your weakest (slowest) link in the chain, which, unless you possess a 10GbE network infrastructure, will be your network link between all the devices which will be accessing the content.

As Klojum suggested, you should use your (single) PC device to orchestrate your scraping, and just use the other devices for playback. Also look into converting your databases from 'MyISAM' table structure to 'InnoDB' table structure after creating them, but before doing any scraping, in order to greatly speed up the process. It's unlikely that any 'off the shelf' NAS device will store the OS and by extension the database files directly on SSD/NVMe storage, but it will be able to be utilized as a cache drive which is nearly as good (assuming said device utilizes a mixture of SSD vs. traditional rotational HDDs).

Sharing your thumbnails on the same server is doable, but may result in some lag populating kodi due to network latency and the small sizes of a lot of artwork. If you have sufficient space on your devices for thumbnail storage, I wouldn't bother doing this extra step. You will also be somewhat limited to only one device being able to run Kodi at any one time on a single MySQL server due to the potential for sharing violations and possible damage from two clients attempting to access / modify the same database tables/data at the same time. So if you wish to use two or more Kodi installs concurrently, a shared database might not be the perfect solution for you. There are ways around this, but it's not without risk, with regards database integrity IMHO.

With regards your partner's content being segregated from yours, create separate folders on the share your media resides in, from those with her media in, then add them as separate sources. You can then set up separate profiles within Kodi, which will allow you to attribute some of those sources to your profile, and the others to your partner's profile, thus hiding the content you don't want to see, from your own profile. How well this will work with MySQL / MariaDB databases, I don't know, as I've never had a need to use profiles. But that is exactly the kind of use case profiles were designed for.

Smile

Dan / Gib.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
OPINION - Pros vs Cons shared mysql database0