[TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Server

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

viewtopic.php?f=10&t=18951

I've deployed a Public Remote Media Server for use for everyone! It uses mtmediasrv, and is available to all minetest servers for use. Please go to the linked thread and see how you can enable and use this remote media server.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

I've released v2. A small permission problem was found in the socket permissions. I'll stop making 32bit releases too, since those are obsolete.

u18398

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by u18398 » Post

This seems to be a very promising project. Unfortunately I encounter similar problems
like Lejo said on github. You said maybe Lejo's systemd is outdated. I was using ubuntu 16.04.
Is that also outdated there ?

A little bit more of information of which version of systemd is needed or better on which linux distro it should run
would be helpful. Maybe you know a link to some wiki or something about nginx and systemd, also ?

Your public media server might be a nice idea, but not everyone thinks it is good idea that not involved people
know about who is connecting to which server when.

Is it really that complicated to set up nginx together with your mtmediasrv ? That would be a pity because it sounds like it could take some load from the game server.
But it sounds like I need some extra studies in server administration :)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

Setting up nginx and an fcgi daemon like this isn't trivial, and the bug I posted about earlier on Dec 31 indeed made things more difficult. However, with the fix it's hopefully one steap easier.

One of the problems is that even though I have a nice systemd unit file, it may just not work for people who have a different linux distribution, since e.g. the `www` user is named differently on different Linux versions. Some distributions use `http` or `http-data` or even `nobody`. These are just implementation details that I can't solve because I'm not making this project to work with *every* linux distribution, as that would be too much work. So, I provide a template unit and people should read up on how to install daemons and how their OS does nginx... All those topics are covered extensively by documentation already, and if you run a public internet facing server, you should really read them. Google is your friend.

The systemd version shouldn't matter too much, but with older versions you may have to modify the unit further to make it work.

As for privacy concerns with the PRMS, I understand them, and nobody is forced to use it, so .. shrug. It's something nice to help server owners?

u18398

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by u18398 » Post

sofar wrote: One of the problems is that even though I have a nice systemd unit file, it may just not work for people who have a different linux distribution, since e.g. the `www` user is named differently on different Linux versions. Some distributions use `http` or `http-data` or even `nobody`. These are just implementation details that I can't solve because I'm not making this project to work with *every* linux distribution, as that would be too much work.
That I understand very much. So it would be good to know on which distribution you are it running. If that is not too secret :)
For example, I plan to rent another Vps just for the media server to run on, so I am free in my choice which linux distribution I will use there. If I use the same than you do, there should be no confusion with different "www" users, right ?

sofar wrote: As for privacy concerns with the PRMS, I understand them, and nobody is forced to use it, so .. shrug. It's something nice to help server owners?
This is also totaly right. I am a bit paranoid concerning privacy things. :)
The less data which is send to somewhere where it does not belong to,is the better. At least that is my
rule :)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

Gundul wrote: That I understand very much. So it would be good to know on which distribution you are it running. If that is not too secret
I host using clearlinux for several reasons, but even in clearlinux the `www` user does not exist. The unit file is really a template for the most common case (www seems to be the most common username for it) but it won't always exist, even on the distro I use. In clearlinux, it's "httpd" btw.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

Quick note: MT versions 0.4.13 and older are not supported by the mtmediasrv daemon. These clients do not properly undestand the API and will fail to work with any remote media server. Tell your users to upgrade, and make sure that your server rejects these very old game clients.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

Version 3 was just posted. I've simplified installation and left more information with the `make install` rule in the provided makefile, but it's still mostly targeted for expert Linux admins.

Fixed a crash on a wrong http method as well, which will improve response rate to clients. Until now, it would restart, but we don't want to restart all the time.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

v4 release fixes a potential data-saving issue. It turns out that the MT clients can ask multiple times for the same checksum, and we can return a list with duplicates filtered out. This may potentially save a lot of data.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

v6 fixes a crash on startup if there are duplicate files on the server.

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by LMD » Post

I'm not sure whether it makes a big difference (or is even worth it), but while examining your implementation to find out the specification for my Java implementation (which worked great for that purpose BTW!, might even write it down sometime...) I found some line where you had a nested for loop iterating over your media and the requested hashes : https://github.com/minetest-tools/mtmed ... in.go#L101

Couldn't this be made faster by storing your hashes ("arr") in a map, which should (?) be faster than linear search ?
My stuff: Projects - Mods - Website

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

LMD wrote:I'm not sure whether it makes a big difference (or is even worth it), but while examining your implementation to find out the specification for my Java implementation (which worked great for that purpose BTW!, might even write it down sometime...) I found some line where you had a nested for loop iterating over your media and the requested hashes : https://github.com/minetest-tools/mtmed ... in.go#L101

Couldn't this be made faster by storing your hashes ("arr") in a map, which should (?) be faster than linear search ?
Yes, absolutely.

It's probably worth doing. I remember I had no maps at all in my first design, and changed a few things to optimize it after. This one is likely worth fixing too.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by sofar » Post

sofar wrote: It's probably worth doing. I remember I had no maps at all in my first design, and changed a few things to optimize it after. This one is likely worth fixing too.
Done. I doubt it's anywhere measurable really. Maybe it'll save 10ms per connection, but, it's slightly cleaner. In v7.

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [TOOL]mtmediasrv[mtmediasrv] - Minetest Remote Media Ser

by LMD » Post

> Done. I doubt it's anywhere measurable really. Maybe it'll save 10ms per connection, but, it's slightly cleaner. In v7.
You are probably right. But if you added far more media, it might become measurable.
My stuff: Projects - Mods - Website

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests