A question about ruby scripting in .4 and built in webserver

Post here if you need help setting up your server, etc.
Post Reply
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2333
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

A question about ruby scripting in .4 and built in webserver

Post by compguygene »

I noticed when I compiled a dedicated server from the latest trunk code that there is an option

Code: Select all

--enable-ruby
It says to enable ruby scripting api. Requires ruby to be installed. (default=disabled).

I was wondering what the ruby api is and what can be done with it. If it's not documented, can you point me to where in the code I can read to get an idea of what it does.

Also, I noticed,

Code: Select all

 --wwwrootdir=DIR        web root [[DATADIR/www-root]]
.
I have seen mention on these forum of some sort of built in webserver for armagetron, now that I see this compiler option, I have to ask what can be done with it, if anything.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: A question about ruby scripting in .4 and built in webse

Post by Durf »

xampp = Apache + PHP + MySQL + Perl
I mean, if tron had a webserver (apache?), I would want PHP...if it has PHP (then scripting is taken care of), I would want MySQL...etc..

But still, I think it would be a neat addition to tron - like everyone can host their own little website from within tron.
compguygene wrote:I have seen mention on these forum of some sort of built in webserver for armagetron, now that I see this compiler option, I have to ask what can be done with it, if anything.
I too would like to know more about it

User avatar
Light
Reverse Outside Corner Grinder
Posts: 1659
Joined: Thu Oct 20, 2011 2:11 pm

Re: A question about ruby scripting in .4 and built in webse

Post by Light »

Durf wrote:xampp = Apache + PHP + MySQL + Perl
I mean, if tron had a webserver (apache?), I would want PHP...if it has PHP (then scripting is taken care of), I would want MySQL...etc..
It would make much more sense if it were just a server status page. Kind of like some torrent clients do. I don't see the need to get a full blown web server going with every distribution of an armagetron game server.

Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: A question about ruby scripting in .4 and built in webse

Post by Durf »

I guess what I was suggesting was the pointlessness of adding extra software into tron when those who want that functionality can easily get it.
(tron + xampp can offer more than just tron with a built in webserver. Plus, xampp is easy to get, install, and use)

Not sure what the extent of a server status page would be..(tbh maybe I'm getting the wrong idea of the purpose of a webserver in tron)
Would it show server settings? Would it only be available through tron? (no web browsers)

Maybe I'm missing something...but that's why I want to know more about this feature.

User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2333
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: A question about ruby scripting in .4 and built in webse

Post by compguygene »

Well, this wiki page has been up in its current form for a long time. It somewhat explains what is going on. However, since I noticed the compiler option, I decided it was time to ask the devs more about it.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: A question about ruby scripting in .4 and built in webse

Post by Lucifer »

Light wrote:
Durf wrote:xampp = Apache + PHP + MySQL + Perl
I mean, if tron had a webserver (apache?), I would want PHP...if it has PHP (then scripting is taken care of), I would want MySQL...etc..
It would make much more sense if it were just a server status page. Kind of like some torrent clients do. I don't see the need to get a full blown web server going with every distribution of an armagetron game server.
Ultimately, it's to provide two things:

1) A visual admin interface for the server
2) A json (or other RPC-type of interface) to integrate with a bigger website.

The recommended way to make information from it available is going to ultimately be using an apache proxy (or whatever server you prefer), which should be a bit more secure than anything we'll be able to provide.

In it's current form, it's only a proof of concept. The admin command interface isn't as easy to reach as I'd hoped when I started it, and I haven't even looked at it in awhile. I think the last thing I did was disable building it by default because I didn't know when I'd be able to get back to it.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2333
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: A question about ruby scripting in .4 and built in webse

Post by compguygene »

compguygene wrote:I noticed when I compiled a dedicated server from the latest trunk code that there is an option

Code: Select all

--enable-ruby
It says to enable ruby scripting api. Requires ruby to be installed. (default=disabled).

I was wondering what the ruby api is and what can be done with it. If it's not documented, can you point me to where in the code I can read to get an idea of what it does.
Thanks for your response about the built in webserver. What about the Ruby scripting api?
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm

Post Reply