Metaserver? We don't need no steenking metaserver!

Picture the scene: You’ve written a multiplayer game that actually works: people can start servers, other people can connect, it’s all good. The only problem is server discovery - to connect to a given server, the client needs to know it’s IP. This is annoying.
Happily this problem is easy to solve: You have one machine that everyone knows the IP of that keeps track of all the servers - the metaserver. When a server is started, it registers itself with the metaserver. Clients can connect to the metaserver and download a list of active servers.
The downsides of this approach are:

  • The metaserver needs to be constantly available and either on a static IP or have a DNS entry. This stuff costs money.
  • Scalability. Your game gets released on Steam and you underestimate the strain that is placed on the metaserver by the additional demand (witness the Defcon launch). Your new users get pissed off and your metaserver explodes, killing your family.

So what to do if you need metaserver functionality that scales, is always available, is free, and probably won’t kill anyone?
I would suggest taking advantage of Google Base. This is a service that allows anyone to upload data, tag it with arbitrary attributes, and have it indexed and made searchable by Google. There’s even a Java API.
The game servers could upload their details to Google base, and clients search the uploaded details. All the hard bits are done for you by Google.

The only problem that I can see so far (apart from the need for server owners to have a google login - hardly onerous) is that of latency between entering details into Google Base and them showing up in search results. The FAQ advise that items can take up to 24 hours to appear, but do not mention the latency for changes to the attributes for already-submitted items, or for changes to the submitted data. I’ve submitted a question to get a feel for typical latencies, but had no reply so far.
At any rate, The possible scenarios in worst to best case order:

All changes take 24 hours to take effect - would still be useful for dedicated servers with long uptimes, but not so much for transient servers running on a client machine. Volatile data about servers (active status, currently connected players, etc ) would have to be gotten directly from the server.

Submitted data changes quickly - Volatile data can be put in the submitted data item, reducing load on the servers.

Attributes change quickly - Bandwidth usage is reduced as volatile data can be moved to attributes.

Everything happens instantly - utopia

Additional benefits besides the cost and quality of service:

  • Search capability : Ever wanted to search the Steam server browser for that server name you can’t quite remember? Now you can. There’s also cool stuff like geographical searching.
  • IP changes : Every item in google base gets a fixed URL, so you can move the server’s IP without worrying about losing all your regular players
  • Now that everyone needs to have a Google login anyway, you can use their Jabber servers for instant messaging

In a similar vein, high score servers can also be replaced. Just have each user submit their high-scoring game recording to Google Base, tagged with the score and perhaps some kind of game-specific hash for quick verification. A simple ordered search will give you the list of candidates to verify.

I await a reply to the latency query with interest…

Any thoughts? Is this ripping the piss out of Google just a little too much?

you would put people’s IP out into public search? that could be a privacy issue.

unless i am reading this whole thread wrong.

He’s just taking data that was (would be) already available anyway, and … making it availalbe somewhere else, no?

Yeah, the IPs of the servers would already be available (or else it’s not a very effective service), this approach just (ab)uses Google to provide metaserver functionality with better availability and capacity than anything anyone short of tech behemoths like Google can muster. The price can’t be beaten either :slight_smile:

I’m aware that I’m terrible at explaining things, can anyone point to the ambiguous bits so I can clarify?

putting data on a publicly searchable service is way different than keeping data on your metaserver and allowing other clients to connect to the IPs. at least with your own metaserver, people have to TRY to see the IPs with netstat or whatever… putting it on google though… eh. x_X;

no matter, i doubt you’ll get past the latency anyway. 24hr latency wont do well for a game lobby

I’m just not seeing the privacy issue. If you start a game server, you presumably want other people to be able to connect, and so you want the IP to be as widely available as possible. Analogy: If you want people to phone you, you’re going to have to deal with the fact that they need to know your phone number.
As it stands, services like this and this allow people to find server IPs without using the game client.

As to the latency, I’m currently hoping that even if changes to item attributes take a while to be indexed, they are still applied instantly. So instead of a server adding an item to Google Base when it starts up and removing it on shutdown the entry is always there, and the IP attribute is set to the correct value on server start and to a nonsense value on shutdown. Thus a client can still search for servers based on non-volatile properties like server name, game name, version, ruleset, location, etc, and just has to examine the IP attribute of the returned items and discard the inactive servers.

well, at least make sure you put an advisory in your client :stuck_out_tongue:

though other sites are already making IPs public, i still don’t agree with it. I feel better about a game’s “inner circle” (if you will) being able to connect to my IP and only being able to see it if they TRY (like through netstat).
clicking on my alias from a server doesnt bother me so much. putting my IP in plain site on a public service does =)

anyway, what are you waiting for? try this “base” stuff out, show us what happens :stuck_out_tongue:

Woah, lets clarify the position here…

Bleb means to put the GAME SERVER IP’s onto google base, not the players IPs. Basically, the meta server provides a directory for the game server IP addresses which players can lookup and then connect to, at no point are player IP’s revealed anywhere. Its the primary problem with a distributed network structure (distributed servers in this case) that you NEED first contact to know where everyone else is. The gnutella p2p network is fully distributed, HOWEVER, still needs first contact with a known node before it can start moving to new leaves.

All B. is trying to do is off-load the work of running an always avaliable server for directory listing of avaliable servers from his own systems to that of Googles mainframes.

However, I wouldnt be suprised if thats against policy as they’d lose ad revenue from direct Java API access, best check the T&C of use for that one, i was bitten once with the eBay API.