[mythtv-users] Web interface scalability issue: Video Gallery
Paul Harrison
mythtv at mythqml.net
Tue Sep 12 14:46:26 UTC 2023
On 11/09/2023 23:58, James wrote:
>
>> On 11 Sep 2023, at 8:09 pm, Paul Harrison <mythtv at mythqml.net> wrote:
>>
>> On 11/09/2023 01:48, Peter Bennett wrote:
>>
>>> On 9/10/23 09:59, Paul Harrison wrote:
>>>> I wonder how many users have actually used it though?
>>> James Abernathy tested everything, including doing multiple setups from scratch using the web app setup.
>>>
>>> Klaas DeWaal, Bill Meek, Ken Mandelbaum, David Engel, gave feedback after testing it. Some feedback was that it does not look pretty, but no slowness complaints that have not been fixed.
>>>
>>>
>> OK so just me then :(
>>
>>
>>> I have done nothing for security in the web app. I rely on the ip address checks that I put in a couple of years ago. Unless the user specifically allows connection form all ip addresses, only connections for the local subnet are permitted.
>>>
>> Yeah you definitely don't want to expose the API or WebApp to the internet in it's current state. The initial aim was the WebApp would be secure out of the box although admittedly we never came up with a plan to do it. You can password protect some or all of the API but unless you added it there is no support in the WebApp to use it that way.
>>
>>
>> The other thing we would have liked to add was to follow up on Stuart M's user support and to be able to restrict parts of the webApp to certain users. For example admin users could use the setup stuff but other users can't. Or the kids can only see video's or recordings appropriate for their age that sort of thing.
>>
>>
>>> Slave backend setup is supported. If you start the web app on a slave backend, or a system that looks like it should be a slave, it displays at the top of the page:
>>>
>>> This appears to be a slave backend. If it is intended as a slave backend, please disable scheduling on the master backend while running slave backend setup.
>>> If this is not intended as a slave backend, please go to Setup, General, Host Address Backend Setup, and select "This server is the Master Backend" or else set the correct custom identifier on the Database Setup page. Save and Restart the backend,
>>>
>>> In the case of master backends, the code will not save any setup pages until you disable scheduling. In the case of slave backends, the user must manually make sure that scheduling is disabled on the master.
>>>
>>> The dashboard part of the web app is rather limited when running against a slave.
>>>
>> Cool. I missed you added support for slave BE's. Is that support built in to the API or just the WebApp? I kind of envisioned a drop down in the header where you could select the BE you wanted to configure.
>>
>>
>>>>> I have installed a recent master on my production system, and I use the web app perfectly successfully on that, no delays.
>>>>>
>>>>> Here are my timimgs for main.js: 10 ms for local machine and 51 ms for remote over wifi. Nowhere near 10 seconds.
>>>>>
>>>>> https://imgur.com/a/3I9iUFN
>>>>>
>>>> Aren't you the lucky one :)
>>>>
>>> It is hard work, not luck. I have spent over a year working on this and some of the time was spent on improving performance whe I found something was slow.
>> Oh I'm not ungrateful you took on the task. I appreciate the time and effort you have put in to this because I know how much work is involved.
>>
>>
>>>>> Peter
>>>>>
>>>>>
>>>> I just did some testing on the slowest machine I have, a pentium laptop from 2017. For example it takes 30 seconds on this laptop for chrome to start after clicking it on the start menu. I am accessing a backend that is on wifi and the slow machine with the browser is also on wifi. The slow laptop has only 2.4 GHz wifi, the backend on a fast laptop has 5 GHz wifi, so the signal is getting translated in the router.
>>> Channel editor (843 items) : 7 seconds to open
>>> Program Guide (843 channels): 6 seconds to open
>>> Videos (7531 videos) : 3 seconds to open
>>> Upcoming (701 shows): 1 second
>>>
>>> Is your database remote from your backend? Tests of running queries against my slave backend are rather slower (because of the remote database), with API response of 6.2 seconds for the call to get the video list, for example
>>>
>> My MySql server runs in it's own VM because it is shared by several VM's in my ESXI server, it just makes maintenance easier if there is just one MySql server running that is shared. I haven't observed any problems with the other users of the database server. Most of the queries are from VM to VM so never leave the virtual environment so everything is really quick from what I've seen.
>>
>>
>>> If my database is on a system connected to the backend via wifi, then I get some horrible response times. Wifi is asymmetric. They advertise speeds of a Gigabit per second, but that is download speed. Upload speed is a fraction of that, and having the database on a wifi connected laptop kills the speed.
>>>
>> I have a really good UniFi smart switch and everything is hard wired using Gigabit connections where appropriate.
>
> My backend is headless and although I *can* run eg nomachine My normal use would be from a front end.
> Since I've not tried 34 maybe my concern is missplaced
> James
Well one the reasons for creating the WebApp was so users could run
their BE headless if they wanted and you would be able to do everything
you can currently do in mythtv-setup by using the WebApp in any web
brower on any machine that can see the BE on the local network.
Unfortunately it's not quite there where you can do everything in the
WebApp you still need to do some things from the commandline like
setting up XMLTV for example.
If you mean you want to be able to do all the setup from the frontend
then I agree that has always been my preferred method, I mean how many
TV or STB's do you have to configure using a browser? If you think of
MythTV as an appliance then it makes more sense to be able to do all the
setup from the FE. The cool thing is once the Service API is all there
to be able to run the WebApp then the same API can be used by any
client, a modified mythtv-setup, a modified mythfrontend, a Kodi client
or any 3rd party client could if they wanted be updated to allow you to
do everything you can in the existing mythtv-setup but it would work on
any machine on the local network that can see the BE or potentially any
machine on the internet although that is not recommended because there
is no way to secure it. The clients don't need database access of their
own since they do everything through the API so they should be really
easy to setup. The long term goal a few of the devs have wanted to do
for some time is update the FE so it doesn't require direct DB access
but would use the API for everything.
Paul H.
More information about the mythtv-users
mailing list