Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: RFC Metaserver overhaul
Home

[Freeciv-Dev] Re: RFC Metaserver overhaul

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Paul Zastoupil <paul@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: RFC Metaserver overhaul
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Sat, 2 Nov 2002 16:24:52 +0000 (WET)

On Fri, 1 Nov 2002, Paul Zastoupil wrote:

> I think the metaserver needs a complete overhaul.
>
> I propose that the new metaserver consist of purely HTTP calls.
>
> The server will use POSTs and the client will issue GETs.
>
> I volunteer my time to write the actual metaserver on the freeciv
> website.  But before I start I would like to have some input as well as
> some people willing to help with the new client and server code.
>
> As for the input, I want to build this protocol so its easily extensable.
> It would be nice to be able to tie this in with any future player
> authentication so we can support things like friends lists.  What else
> would be nice?
>
> What information needs to be sent from the server to the metaserver?
> How often should the server update itself in the metaserver?  How does the

The server should send updates any time the previous information sent is
invalid. i.e.:

* After boot.
* Every turn.
* Everytime game status changes.
* Everytime someone changes a server variable.
* Everytime someone changes the comment.
* Everytime a player is created, destroyed, set to computer or human
  control, connects or disconnects .

Since this may cause too many updates to be sent we could make the server
only send updates at most every 5 seconds or so.

I do not expect the size of the data sent per update to be larger than
2-4KB.

> metaserver determine if the server is no longer there?  What information

Since the metaserver will know the server host and port why not make it
try to connect a socket to it every minute or so to check if its there or
not?

> needs to be available to the client?

Server name, port, version, status, comment are essential.
Number of players also is helpful.

The rest is IMHO optional.

> Once we have answers to these and any other questions we can get a good
> idea of the overall design of what we want.

I propose we format the information from the server to the metaserver
in XML. Here is a sample of the proposed format minus XML info:

<metainfo version="1.0">
  <game name="Freeciv">
    <server>civserver.freeciv.org</server>
    <port>5555</port>

    <version>1.14.0</version>
    <capability>+1.14.0 conn_info</capability>

    <status>Running</status>
    <comment>Come on, join now or never!</comment>

    <year>4000 BC</year>

    <options>
      <option name="xsize" value="80" />
      <option name="ysize" value="50" />
      <option name="generator" value="1" />
      .
      .
      .
    </options>

    <players number="2">
      <player>
        <name>War King</name>
        <nation>Latvian</nation>
        <ai>0</ai>
        <host>h453n2gfd65o835.telia.com</host>
      </player>

      <player>
        <name>HAL 9000</name>
        <nation>Mordor</nation>
        <ai>1</ai>
        <host></host>
      </player>
    </players>
  </game>
</metainfo>

The <server> tag should really NOT be used. But I do not know how easy it
will be for the metaserver to lookup the name of the connecting server in
case we use PHP.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa



[Prev in Thread] Current Thread [Next in Thread]