Media delivery over CDN

CalumMc
Member
 
Posts: 58
Joined: Mon Dec 12, 2011 16:50

Media delivery over CDN

by CalumMc » Mon May 13, 2013 16:45

Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Mon May 13, 2013 16:53

CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.


Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon May 13, 2013 16:56

BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.


Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.

I dont think any mods use .blend files.
The setting only has to be set in the server.
Clients without cURL support will still download from the Minetest server.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon May 13, 2013 18:06

Useful commands:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mkdir media
cd media
for f in `find ../games/minetest_game -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
for f in `find ../mods/ -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
python -m SimpleHTTPServer <port>

Warning: SimpleHTTPServer sometimes hangs up
Last edited by sfan5 on Wed May 29, 2013 11:36, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

CalumMc
Member
 
Posts: 58
Joined: Mon Dec 12, 2011 16:50

by CalumMc » Tue May 28, 2013 12:10

sfan5 wrote:Useful commands:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mkdir media
cd media
for f in `find ../games/common -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
for f in `find ../mods/minetest -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
python -m SimpleHTTPServer <port>

Thank you, they were very useful.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue May 28, 2013 12:43

BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.


Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.

blend files can not be read by Irrlicht and can therefore not be of any use for something.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Tue May 28, 2013 15:03

sfan5 wrote:
BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.


Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.

blend files can not be read by Irrlicht and can therefore not be of any use for something.


I wasn't aware, I just know some of the mods have .blend files included so I uploaded them. Didn't know the engine couldn't use them.
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Wed May 29, 2013 05:08

oth i have a small server i wrote a long time ago that doesnt hangs and looks safe...

if anyone wants, ask me here
Last edited by sfan5 on Wed May 29, 2013 05:18, edited 1 time in total.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed May 29, 2013 16:16

aldobr wrote:oth i have a small server i wrote a long time ago that doesnt hangs and looks safe...

if anyone wants, ask me here

Cool! I've been using HFS from rejetto, but I'm always out to test stuff!
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Wed May 29, 2013 18:27

http://powtils.googlecode.com/svn/dev/tools/lightwebserver/

its multithreaded and uses a white list where you add files that can be downloaded one by one to a list. i believe this is safer...

i dont remember if there is a compiled version, if not, i can upload a binary.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed May 29, 2013 18:32

Cool!
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 21 guests

cron