Skip to main content
GameDev.net gamedev.net
🔒 Locked

Light weight server. Comments?

Started by Shadow Mint Oct 31, 2002 at 8:28 AM 1 replies 950+ views
Original Post
Shadow Mint
Shadow Mint
I''ve been exploring peer to peer options for gaming for quite some time now, and I''ve found that the n-node problems involved are generally either insoluble or result in a system that has a pathetically high latency. So I''ve come up with a different solution to the same problem, and I''d like some comments on it. I''m implementing a prototype proof of concept at the moment; any thoughts before I finalise the prototype architecture are what I''m really looking for. The basic system: The server is light-weight and performs protocol validation and packet forwarding only. The clients connect to the server in client-server mode, but each client runs an entire game state. Any update from any client is sent to the server which performs source validation, and if it is valid, passes the request on to the connected clients. It''s simple, it''s clean. It''s generally extensible by expanding the count of trusted servers and having servers talk to each other through a minimum spanning tree of servers. Problems: * If all clients start at the same time (t = 0) it''s all good, for example for an RTS. No problem. For a game where there is persistent game state even when no clients are connected (eg. online rpg) this doesn''t work. I''m contemplating some kind of data-resource clients which are special (trusted) authoritive clients that can be used to update the game state of late joiners, or something. thoughts? * Server clustering. This is the standard stupid thing about c/s architecture. When too many clients or clients use too much bandwidth the server chokes and lags. Multiple servers reduces the problem, but its (as always) an issue. Especially a problem if clients all cluster around a fast server. * Protocol validation is actually a lot harder than it sounds. The point of the servers is that like a standard ip forwarding machine it has fast core functionality of forwarding packets. The most processing it does to check validation, the slower it is, but the more secure. At the very least it MUST validate any request which says it comes from a specific client actually comes from that client. Anyway. Any general thoughts on this? Know of any (open-sourced preferably, or at least documented) implementations of a similar system? Cheers!
Vaporisator
Vaporisator
Well, that sounds interesting. But you have the one big problem of syncronization! if only one of the peers looses sync, you''ll have to stall every other peer to get the one back to sync.


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Don''t klick me!!!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
Shadow Mint
Shadow Mint
Eh? There is no server data. If one of the clients loses sync screw em. All their invalid requests are ignored by the other servers (invalid) and they get dropped eventually when the client decides it is getting only invalid messages.

Although you do have a point. It's possible to get a degenerate case where 50% of the clients are using one state model and ignoring the input from the other 50%; the other 50% do it the exact other way.

It's a problem because the server cant tell which clients are good and which are bad, so it cant close bad clients off...but on the other hand, those clients are gonna get aweful lonely if only one or two lose sync and the rest are still good.

Authoritive clients are starting to sound really attractive actually.

-- Edit --

Or do you mean one of the servers just lagging up? In that case, again, screw it. As long as the clients get the events in the order they should, it doesnt matter. Only the clients on the lagging server will be affected.

[edited by - Shadow Mint on October 31, 2002 10:51:52 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.