Menu

#93 a new metaserver infrastructure

closed
nobody
None
4
2014-01-18
2005-05-25
No

With the sad demise of the old metaserver, there is a
need for a replacement. It was suggested on IRC that
this should be web based, and more distributed, in
order to mitigate the risk of DoS attacks

The attached php script is the first alpha of a part of
this, it allows servers to declare themselves and lists
the declared servers.

Before listing the server, it tries to connect to it to
be sure it is a crossfire server....

The rest of the system will work as follows.

each metaserver (and there are serveral) will connect
to a metametaserver once a day (probably staggered
across 24hours), they will send the list of servers
that declared themselves that day, and retrieve the
list of other new servers.

the metametaserver will be firewalled off from all
other ip adresses, these will be the only ones able to
access it.

They will also retrieve a list of metaservers.

the list of metaservers will be available to the client
from any metaserver, every time the client is started,
it will use its list of metaservers, pick one at random
until it finds one that is up, and then fetch the list
of metaservers and game servers. It will store the list
of metaservers for use next time, and present the list
of gameservers to the player.

if a metaserver goes down, for whatever reason, it will
be removed from the list of metaservers, and following
the next connection to a metaserver, the client will
have an updated list.

The servers report to any metaserver they want, each
time they are started. This creates the list of new
servers to send to the metaserver, and this bit is what
the attached script deals with.

to operate.

download the php file to a directory on a system where
it is accessible through a web server running php
touch newservers (in the same directory)
chmod a+rw newservers

connect to
http://where.you.put.the/script/addme.php?name=nameofserver&version=serverversion&comment=the
comment you want to make&ip=wheretheserver is (hostname
or ip adress)&port=number

the ip address is optional, if you omit it, the ip of
the source is used.

the port is also optional, if omitted it defaults to
13327 (crossfire's default port)

before full deployment I shall include a check to limit
it to hostnames that resolve to the ip adress, for now
it is inconvient. Currently, the script could be used
as a port scanner, albeit not a very useful one...

A test version is operating on
cavetroll.uwcs.co.uk/addme.php and
cavetroll.uwcs.co.uk/newservers

this will be my current dev version however, so at any
given moment I may have broken it with
additions/modifications.

the listing format might need clarification too, the
first line of each entry is information the client
needs, the second is the information that the player sees.

Discussion

  • Brendan Lally

    Brendan Lally - 2005-05-25

    Logged In: YES
    user_id=1084627

    adding another script, this one to display the servers known
    by the metaserver

    probably not the final form, at the least I will want to add
    shading to locally known servers.

     
  • Brendan Lally

    Brendan Lally - 2005-05-25

    php script to show known servers.

     
  • Brendan Lally

    Brendan Lally - 2005-05-25

    Logged In: YES
    user_id=1084627

    ok, modification to the first script, actually checks the
    response from the server to make sure it looks vaguely like
    a crossfire server.....

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    Logged In: YES
    user_id=1084627

    new version of addme, used for initial testing.

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    third verison of addme.php

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    Logged In: YES
    user_id=1084627

    ok, now a perl script, this relies on WWW::Curl, and sends
    the data to the metametaserver. It is intended to be run by
    cron or similar...

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    perl script to sync metaserver to metametaserver

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    Logged In: YES
    user_id=1084627

    ok, with the number of files increasing, I have decided to
    make a tarball of all the files needed at both ends.

    future revisions I will number sequentially.

     
  • Brendan Lally

    Brendan Lally - 2005-05-26

    tarball of metaserver and metametaserver, initial release.

     
  • Brendan Lally

    Brendan Lally - 2005-05-27

    Logged In: YES
    user_id=1084627

    added another perl script, this does the same as the first
    one, only in Net::HTTP

    release 0.0.2

     
  • Brendan Lally

    Brendan Lally - 2005-05-27

    tarball of metaserver and metametaserver, second release.

     
  • Brendan Lally

    Brendan Lally - 2005-06-01

    Logged In: YES
    user_id=1084627

    release 0.0.3

    I've changed the field seperator to | from a space, and
    moved each record onto one line, parsing is easier now (and
    closer to the old style).

    There has been some debate about the proper structure of
    this, I am therefore ignoring that, and focusing on the
    parsing, which is indepedent of such concerns.

     
  • Brendan Lally

    Brendan Lally - 2005-06-01

    tarball of metaserver, metametaserver, and start of client support, third release

     
  • Mark Wedel

    Mark Wedel - 2005-08-17

    Logged In: YES
    user_id=98826

    With the (old) metaserver working again, this sort of fell
    by the wayside.

    A redesign may still be useful, but to me, these two big
    issues still exist:
    1) Need to provide a backward compatible mode so
    old/existing clients will still work.
    2) Need to see server code that updates metaserver and be
    assured that it will not cause any adverse effects (eg,
    cause server to block, etc).

     
  • Brendan Lally

    Brendan Lally - 2005-08-17

    Logged In: YES
    user_id=1084627

    You are right, it is no longer a major issue, so I'll close
    this patch.

    there is a good argument for seperating the metaserver out
    as a seperate process, but any attempt to write that would
    bear little similiarity to what is here anyway.

     
  • Brendan Lally

    Brendan Lally - 2005-08-17
    • status: open --> closed-postponed
     
  • Kevin Zheng

    Kevin Zheng - 2014-01-18
    • Status: closed-postponed --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB