Networked Game Structure

Started by
11 comments, last by hplus0603 12 years, 2 months ago

Yes, you may pay many thousand dollars for this hardware, but when you're at the point where you need gateways and forwarders and whatnot, the leasing cost of this hardware is a very very small part of your budget.

I am thinking in the amazon web services, do you have a favorable opinion about it?
http://aws.amazon.com/ec2/
http://aws.amazon.co...cloadbalancing/

Thank you hplus and ApochPiQ for the time to response, got it clear now.
Advertisement
Designing scalable infrastructures - in pretty much any field, but particularly in networking - is all about contextual details.

What kind of service are you trying to provide? How are requests from clients fulfilled by servers? How frequently do requests come in? What is the ratio of servers to clients expected to look like? What kind of resources does it take to fulfill the average request? Can you segregate request types based on their resource requirements, i.e. put lots of cheap requests on one server and spread out the expensive requests among multiple load-balanced servers?

All these kinds of details are important. I could probably write a huge list of such considerations that go into designing the typical high-scale internet service, and I'm far from an expert on the different models in use in real life systems (my own experience in high-scale systems is limited to a particular subset of technologies).

Without considering all these factors, it's hard to accurately judge the merits of some arbitrary architecture. What you have diagrammed may work excellently for certain styles of service, and completely fall apart at high loads for other types of service. There's a reason why services like elastic cloud computing are middle-of-the-road solutions; they will neither give you optimal performance at load, nor optimal price efficiency on the low end of the scale. (Though to be fair, cloud services are getting pretty darn affordable for most applications these days.)

Services like EC2 have to try and strike a balance between effective use of their own hardware resources and effective scalability for their clients. Someone designing their own network back-end infrastructure is free of such constraints, and can focus on building something that is optimal for their particular needs. And the solutions they deploy are likely to look very, very different.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


I am thinking in the amazon web services, do you have a favorable opinion about it?
http://aws.amazon.com/ec2/
http://aws.amazon.co...cloadbalancing/

Thank you hplus and ApochPiQ for the time to response, got it clear now.


Yes, Amazon Elastic Load Balancer is one way to achieve load balancing, if you use their Elastic Compute Cloud infrastructure.
enum Bool { True, False, FileNotFound };

What kind of service are you trying to provide? How are requests from clients fulfilled by servers? How frequently do requests come in? What is the ratio of servers to clients expected to look like? What kind of resources does it take to fulfill the average request? Can you segregate request types based on their resource requirements, i.e. put lots of cheap requests on one server and spread out the expensive requests among multiple load-balanced servers?


Inter process communication between client and server via remote calls, client and server send to each other text strings. There will be several server-services: IRC, Anti cheat, trade, etc. each one with its particular set of scripts.

I am figuring the anticheat service to work like this:
For each action the client affecting the persistent data, once validated by client it will send a text-string to the server in the form: "script_command&param1&param2,..."

For example, if the player buys a potion, it will send to server: "buy_potion&life_potion"

At server side (where the incoming connection is assiciated to a player at login) it is verified if player can buy that potion and have enough money, if so, the operation becomes validated and changes are made to DB (no communication back to client), if operation not validated player is cheating and server will log/disconnect that client.

Another case:
The server want to display a message window to the client: it would send a string to the client in the form: "message_player&A message"
the client receives that string and calls its script "message_player" with the param "A message"

The system is for an MMO Tycoon style game. TCP and just sending strings between client and server for simplicity. I have been digging and thinking how to implement this and this is what I ended with. I think it is very low-bandwitch demanding, in any case, any suggestion is welcome, maybe Im making some mistakes or possible to improve.

Thanks in advance!

This topic is closed to new replies.

Advertisement