How Galaxy, an In-Memory Data Grid for MMO Games, Works

Started by
14 comments, last by pronpu 11 years, 7 months ago

Thus, if only 1% of your interactions are across a network, you become network limited instead of RAM limited. For some topologies, the allowable interaction fraction is even smaller, such as 0.1%.


I wrote a blog post on highscalability.com today analyzing the performance of a data structure distributed on top of Galaxy. It proves that if you use a data structure that fits well with Galaxy's design, you'll get far, far fewer than 0.1% of the transactions would require any network hops.
Advertisement
if you use a data structure that fits well with Galaxy's design[/quote]

I also have no argument with that. The question is whether you can implement the actual gameplay you want with that data structure.
enum Bool { True, False, FileNotFound };
@pronpu, great post at HS. I have one question though - many scenarios would require dealing with border objects (items that are in one node, but they are spatially close to items in another node so as to cause interaction) so won't that require network IOs? Even if we assume those type of items are shared across the two nodes, updating them frequently would result in network IO isn't it?

updating them frequently would result in network IO isn't it?


Well, after an object is updated (once or multiple time), a read from any other node would require a network roundtrip. Just items close to one another "across the border" won't cause network IO, even if clients need to see items on both sides. You can just send the data to the client from both nodes.
It's only when the items interact that inter-node IO would be required. Now, if one node initiates a transaction, all items in that transactions are transferred to that node (to be "owned" by it), and then they stay there. So, for example, if a character stands right on the border and touches an object on side, that object will be transferred to the character's node; if the character then touches an object on the other side, this, too, will be migrated to the same node, and any further interaction with those two objects will no longer require network IO.

So, potentially you'll have a problem if two characters stand on either side of the border, kicking, say, a ball between them back and forth. But how fast could that happen? Would your game allow them to pass the ball hundreds of time a second?

[quote name='andyaustin' timestamp='1345582213' post='4971972']
updating them frequently would result in network IO isn't it?


Well, after an object is updated (once or multiple time), a read from any other node would require a network roundtrip. Just items close to one another "across the border" won't cause network IO, even if clients need to see items on both sides. You can just send the data to the client from both nodes.
It's only when the items interact that inter-node IO would be required. Now, if one node initiates a transaction, all items in that transactions are transferred to that node (to be "owned" by it), and then they stay there. So, for example, if a character stands right on the border and touches an object on side, that object will be transferred to the character's node; if the character then touches an object on the other side, this, too, will be migrated to the same node, and any further interaction with those two objects will no longer require network IO.

So, potentially you'll have a problem if two characters stand on either side of the border, kicking, say, a ball between them back and forth. But how fast could that happen? Would your game allow them to pass the ball hundreds of time a second?
[/quote]
Thanks for the explanation, pronpu! I'm thinking in the lines of a fast paced game (let's say it is similar to Quake, but not exactly a FPS). If for some reason two players are handled by two nodes, and they need to know about the other's position (they both are running around so their positions update many times per second, and the game's engine needs to do some processing on these objects), then with Galaxy the nodes would need to read data from each other everytime the position changes if I understand it correctly. I was wondering if there are some standard techniques to reduce this communication.

If for some reason two players are handled by two nodes, and they need to know about the other's position... then with Galaxy the nodes would need to read data from each other everytime the position changes if I understand it correctly. I was wondering if there are some standard techniques to reduce this communication.


Well, if the two characters just see each other, then there's no reason why each wouldn't get updates about the other from the other's node. If they interact then the way Galaxy works, after the first interaction they would both be handled on the same node. So the scenario you describe could really only happen if the two interact indirectly, say by passing a ball between them back and forth. In that case, the ball would migrate from one node to the other and back. That would entail one network roundtrip for each pass. But how fast could the two characters pass the bal between them?

This topic is closed to new replies.

Advertisement