Mythruna

General Category => General Discussion => Topic started by: Endimmion on May 10, 2013, 12:34:31 AM



Title: A servers list for Mythruna
Post by: Endimmion on May 10, 2013, 12:34:31 AM
Hello everyone,

I know that Mythruna will have an ingame servers list. But I think that it's not incompatible with an "external" servers list.

Owner of a servers list for Minecraft, I decided some time ago to adapt it to Mythruna.

So if some of you have Mythruna servers running, I invite you to register them on it.

I let you discover it: http://mythruna-servers.com/ (http://mythruna-servers.com/)


Title: Re: A servers list for Mythruna
Post by: Moonkey on May 10, 2013, 04:07:32 PM
Whoa, cool. Really cool!


Title: Re: A servers list for Mythruna
Post by: Endimmion on May 11, 2013, 04:59:41 PM
Thank you  ;D


Title: Re: A servers list for Mythruna
Post by: Budehgong on May 11, 2013, 11:25:43 PM
Looks neat.
Will you put the official one on it as well?


Title: Re: A servers list for Mythruna
Post by: Endimmion on May 12, 2013, 04:26:58 AM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D



Title: Re: A servers list for Mythruna
Post by: Sean on May 12, 2013, 09:04:28 AM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D


For griefing purposes he might not be able to register his server.


Title: Re: A servers list for Mythruna
Post by: Budehgong on May 13, 2013, 12:43:53 AM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D


For griefing purposes he might not be able to register his server.

What do you mean?


Title: Re: A servers list for Mythruna
Post by: Sean on May 13, 2013, 11:28:39 AM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D


For griefing purposes he might not be able to register his server.

What do you mean?
Meaning when a server ip is publicly available on the internet it is more likely to get griefed.


Title: Re: A servers list for Mythruna
Post by: Moonkey on May 16, 2013, 05:59:52 PM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D


For griefing purposes he might not be able to register his server.

What do you mean?
Meaning when a server ip is publicly available on the internet it is more likely to get griefed.
Wrong, actually. He could just enter in the shortened version of it that comes pre-entered in Mythruna. Unless I have what you're thinking of confused.


Title: Re: A servers list for Mythruna
Post by: pspeed on May 16, 2013, 06:14:41 PM
It's up to everyone to register their servers.

I would be very happy if Paul register the official server on it.  ;D


For griefing purposes he might not be able to register his server.

What do you mean?
Meaning when a server ip is publicly available on the internet it is more likely to get griefed.
Wrong, actually. He could just enter in the shortened version of it that comes pre-entered in Mythruna. Unless I have what you're thinking of confused.

I don't know if his site is google indexed or not.  If my host names appear on google then the amount of hacker-style traffic goes up by about 100x.  It's the same reason I prefer not to post the host name here.


Title: Re: A servers list for Mythruna
Post by: pspeed on May 16, 2013, 06:15:48 PM
And actually, it's probably moot at this point since my host shows up all over google now.


Title: Re: A servers list for Mythruna
Post by: Endimmion on May 17, 2013, 03:25:24 AM
Yes actually my list is indexed in Google (there is no point in doing that if not) but I'm pretty sure that the forum get more visitors than my list.

The only server on it is mine and yes, there has been some light grief. That doesn't bother me because this server is for the moment to test the multiplayer and allow users to test it also.

There is not a hurry for server advertisement in the actual state of the game but at least it bring attention that there is a  real need for a protection system in multiplayer.


Title: Re: A servers list for Mythruna
Post by: pspeed on May 17, 2013, 09:14:43 AM
Yes actually my list is indexed in Google (there is no point in doing that if not) but I'm pretty sure that the forum get more visitors than my list.

The only server on it is mine and yes, there has been some light grief. That doesn't bother me because this server is for the moment to test the multiplayer and allow users to test it also.

There is not a hurry for server advertisement in the actual state of the game but at least it bring attention that there is a  real need for a protection system in multiplayer.


What sort of protection system did you have in mind?  The property system is supposed to cover that.

An aside, not in this next version of Mythruna but hopefully the next one, there will be some level of default server list support built into the client.  I only mention it because by then a registered server will be able to specify that it only allows "real users" on, ie: users who have actually paid.  This should cut down on the griefing tremendously, I think... for servers that don't want to go so far as to require a whitelist.

I don't mean to side track your site because I think it's cool.  Just trying to keep everyone abreast of the fact that sooner rather than later, you will be able to run a server that isn't open to every guest who comes along.

...or course, all of these releases were supposed to be done by now.   :-\


Title: Re: A servers list for Mythruna
Post by: Endimmion on May 18, 2013, 03:58:58 PM
What sort of protection system did you have in mind?  The property system is supposed to cover that.

An aside, not in this next version of Mythruna but hopefully the next one, there will be some level of default server list support built into the client.  I only mention it because by then a registered server will be able to specify that it only allows "real users" on, ie: users who have actually paid.  This should cut down on the griefing tremendously, I think... for servers that don't want to go so far as to require a whitelist.

I don't mean to side track your site because I think it's cool.  Just trying to keep everyone abreast of the fact that sooner rather than later, you will be able to run a server that isn't open to every guest who comes along.

...or course, all of these releases were supposed to be done by now.   :-\

A property system will be a good start to protect things.

Also the option to limit a server to "real users" is a good choice. Minecraft servers works also that way (you can choose to allow real users or not).


Title: Re: A servers list for Mythruna
Post by: BigredRm on May 18, 2013, 04:35:10 PM
I thought about finding an active server yesterday. Unless the game can search and save for me I will prob not switch servers much. I want to play so bad!


Title: Re: A servers list for Mythruna
Post by: pspeed on May 18, 2013, 05:17:09 PM
I thought about finding an active server yesterday. Unless the game can search and save for me I will prob not switch servers much. I want to play so bad!

It will probably be more inviting with more RPG elements, anyway.  Then the character of the server could really change from admin to admin, player set to player set.


Title: Re: A servers list for Mythruna
Post by: Michael on May 18, 2013, 06:57:04 PM
What sort of protection system did you have in mind?  The property system is supposed to cover that.

An aside, not in this next version of Mythruna but hopefully the next one, there will be some level of default server list support built into the client.  I only mention it because by then a registered server will be able to specify that it only allows "real users" on, ie: users who have actually paid.  This should cut down on the griefing tremendously, I think... for servers that don't want to go so far as to require a whitelist.

I don't mean to side track your site because I think it's cool.  Just trying to keep everyone abreast of the fact that sooner rather than later, you will be able to run a server that isn't open to every guest who comes along.

...or course, all of these releases were supposed to be done by now.   :-\

A property system will be a good start to protect things.

Also the option to limit a server to "real users" is a good choice. Minecraft servers works also that way (you can choose to allow real users or not).
Within the 'server.properties' file, it contains a setting 'online-mode=' and it uses a boolean expression for it. Uses that feature to check if the user is verified or not, but they are a troll, they tell you ( or at least for bukkit servers ) to include '-o true' in your run.bat file, so no matter what online-mode is set to true, they don't want people with cracked mc to get on..


Title: Re: A servers list for Mythruna
Post by: Endimmion on July 13, 2013, 07:49:16 AM
Hello,

I have added a little script I made (groovy is rather easy to learn) that wrote the number of players connected to a file.

Now my servers list will check if a webserver is available for each registered servers on the same IP as the server and then get the content of the players count file.

That allow me to display the number of connected players on the list. It's really sucks to have to do that, but at least it works.

If someone want to register his server and want this plugin, just ask.


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 10:25:01 AM
Hello,

I have added a little script I made (groovy is rather easy to learn) that wrote the number of players connected to a file.

Now my servers list will check if a webserver is available for each registered servers on the same IP as the server and then get the content of the players count file.

That allow me to display the number of connected players on the list. It's really sucks to have to do that, but at least it works.

If someone want to register his server and want this plugin, just ask.

Do you only show this in the server's details or do you show it on an overview screen with the list of all servers?

How much control do you have over what's running on your server?

Architecturally speaking, it is better if the Mythruna servers can notify you about the number of players, etc. that they have.  This changes rather infrequently compared to the other direction... where you ask every server what it's player count is every time the page is refreshed.  In the first case, no activity means no traffic.  In the second case, every server gets hit for every viewer of the page (or if you cache it a minimum of X times a day).  If I added this support right to Mythruna as you requested then that either means I add a lighweight web server into Mythruna (like JAX-RS's built in server), implement a separate connection/response custom protocol, or hack this into the existing game connections.  The first option of these is the best, architecturally speaking but that means every time some page needs this info then they are hitting the server with a web request.

This is why the official server list will go with the reverse approach I mentioned earlier.  When the servers come online or have changes in status, they will make an xml-rpc call to the main server list (because that's what my site already supports... I'd actually prefer a REST API but I can avoid writing code this way).  For registered game servers, this also means that other web pages can ask for this status from mythruna.com directly.

Then it's just a matter of pinging the servers to see if they are still online once in a while... which could be metered by how recently they last reported.


Title: Re: A servers list for Mythruna
Post by: Endimmion on July 13, 2013, 10:43:10 AM
Every values on my list is cached. Each servers is queried every 5 minutes and the results is cached. It's a "background process" who handle that.

And as I said in a previous post, I don't ask for a lightweight server into Mythruna. I asked the same solution as every game used, aka: A query protocol inside the game that return some values, like "server version", "connected players" and "max players allowed on the server".


You solution for the official servers list seems good, but how will it work for players count? Every time the number of players change, the server will make a call to the main server list?


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 11:05:01 AM
Every values on my list is cached. Each servers is queried every 5 minutes and the results is cached. It's a "background process" who handle that.

And as I said in a previous post, I don't ask for a lightweight server into Mythruna. I asked the same solution as every game used, aka: A query protocol inside the game that return some values, like "server version", "connected players" and "max players allowed on the server".

How else would this be supported than to implement some light weight connection server into the Mythruna server?  If I used JAX-RS and a simple REST interface than it could trivially be queried in standard mash-up style.  It's just not a good idea for these poor servers to be answering this question 100s of times.  Otherwise, I have to implement some custom protocol which is still another port and still another set of classes managing those connections.  It may be slightly lighter weight but that doesn't change the real architectural issue.

(BTW: using JAX-RS it would probably take less than an hour or two to write a plugin for this... presuming a certain familiarity with REST concepts.)

I suppose the ping protocol could include some info as its ping response.  That would all be done with UDP so wouldn't even require a full connection setup... on the other hand, it also means that queriers will be potentially hitting the server multiple times if they don't get a response right away.

You solution for the official servers list seems good, but how will it work for players count? Every time the number of players change, the server will make a call to the main server list?

Yes... they are already calling the server to verify the user anyway.  It's just an extra call when the user logs out again... which could also be batched and cached. 

On average, this count will change much less often than 20 times an hour X number of server lists querying... and that presumes they are all nice about not querying more often than 20 times an hour.


Title: Re: A servers list for Mythruna
Post by: Endimmion on July 13, 2013, 12:19:10 PM
It's just not a good idea for these poor servers to be answering this question 100s of times. 

We are talking about dedicated servers here. Not an on old pentium running on a 56K connection. If a server cannot hold several queries (something less than a 1kb), then it will not be able to support more than a few players.

On Minecraft there are thousand servers (I'm tracking myself more than 8,400 on my Minecraft servers list) with more than 100 players connected along the day on each server. Theses servers are registered on several lists and are queried from every direction several times per seconds: and there is no problem.


Your system reminds me the one using by Counter-Strike. But it was using two ways:
- a first way with a master list like your idea
- a second way with a basic query protocol (to allow users create their own script to display server status on a website without overloading the master list)



Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 12:32:52 PM
I can make it part of the ping protocol.  If you need me to implement this now then I could probably put regular development on hold until August or so to get this plugin done.


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 12:39:12 PM
Or maybe someone else that doesn't already have three development environments open could implement it.

The plugin would look something like:
Code:
AtomicInteger numPlayers = new AtomicInteger(0);
on( serverStarted ) {
    // Start a server thread or whatever with access to numPlayers
}

on( playerJoined ) {
    numPlayers.incrementAndGet();
}

on( playerLeft) {
    numPlayers.decrementAndGet();
}

With JAX-RS you should be able to start a server in one or two lines, I think... I don't know if they have built in groovy niceness or if you will have to create a Java class to act as the resource.


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 12:57:29 PM
The jersey JAX-RS implementation would look something like this in Java:

Code:
package stats;

import whatever stuff
import com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory;
import com.sun.jersey.api.core.*;

public class StatsServerConfig extends DefaultResourceConfig {
    private AtomicInteger playerCount;

    public StatsServerConfig(AtomicInteger playerCount) {
        super( StatsResource.class );
    }

    public AtomicInteger getPlayerCount() {
        return playerCount;
    }

    public static HttpServer startServer( URI baseUri, AtomicInteger playerCount ) {
        StatsServer config = new StatsServer(playerCount);
        return GrizzlyServerFactory.createHttpServer(baseUri, config);
    }
}

Code:
package stats;

import whatever stuff

@Path("/stats")
public class StatsResource {
    @Context
    private Application app;
   
    @GET
    @Produces("text/plain")
    public String getPlayerCount()
    {
        return ((StatsServerConfig)app).getPlayerCount().get();
    }
}

Or something like that.  It's just kind of off the top of my head but it should be clear that for a Java dev it's not particularly difficult.  The query for this would then be "http://host/stats/playerCount"  If the baseURI was "http://host/"

It would surprise me very very much if groovy didn't have a way to do this easier.  I've just never looked but I have made a few REST resources using jersey before so I had stuff to look at.


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 12:58:19 PM
Reference: https://jersey.java.net/


Title: Re: A servers list for Mythruna
Post by: Endimmion on July 13, 2013, 01:01:49 PM
I can make it part of the ping protocol.  If you need me to implement this now then I could probably put regular development on hold until August or so to get this plugin done.

I think that a new public build is much important for Mythruna community than a query/ping protocol for the moment  :)

I will try to look with the few examples you gave, if I can do something (never do groovy or java).


Title: Re: A servers list for Mythruna
Post by: pspeed on July 13, 2013, 01:43:59 PM
I can make it part of the ping protocol.  If you need me to implement this now then I could probably put regular development on hold until August or so to get this plugin done.

I think that a new public build is much important for Mythruna community than a query/ping protocol for the moment  :)

I will try to look with the few examples you gave, if I can do something (never do groovy or java).

Hopefully someone else chomping at the bit to help with plugins can give you a hand.  Someone who knows Java well should be able to run through the jersey samples and figure it out pretty quickly.


Title: Re: A servers list for Mythruna
Post by: belgariad87 on July 13, 2013, 11:27:34 PM
Maybe Shzylo cld help?


Title: Re: A servers list for Mythruna
Post by: Michael on July 13, 2013, 11:39:00 PM
Maybe Shzylo cld help?
o.o when did I get in this? all I did was make an API XD
EDIT: I do plan into looking into those scripts that Paul posted a bit.


Title: Re: A servers list for Mythruna
Post by: pspeed on July 14, 2013, 12:25:10 AM
Maybe Shzylo cld help?
o.o when did I get in this? all I did was make an API XD
EDIT: I do plan into looking into those scripts that Paul posted a bit.

Note: I didn't try any of them.  I just wrote what I thought might work and mumble-mumbled the parts I couldn't remember.


Title: Re: A servers list for Mythruna
Post by: Michael on July 14, 2013, 02:27:35 AM
Maybe Shzylo cld help?
o.o when did I get in this? all I did was make an API XD
EDIT: I do plan into looking into those scripts that Paul posted a bit.

Note: I didn't try any of them.  I just wrote what I thought might work and mumble-mumbled the parts I couldn't remember.
No offense, but I expected that.


Title: Re: A servers list for Mythruna
Post by: belgariad87 on July 14, 2013, 08:33:29 AM
Maybe Shzylo cld help?
o.o when did I get in this? all I did was make an API XD
EDIT: I do plan into looking into those scripts that Paul posted a bit.
idk i figured you would like to take a crack at it.