views:

60

answers:

4

Let's say I have an application that is guaranteed to overwhelm one server even after optimizations. Is there a technology that allows a web application to be split over multiple servers while maintaining its state?

Take for example a multiple player online game. Usually in World of War craft there are multiple servers with each one having its own game state. What I'm looking for is something that would allow this game state to be shared amongst multiple server.

EDIT: The platform doesn't really matter since this is for a web application therefore the backend doesn't matter much. However, Rails and Java are possibilities.

Also, WoW was just an example, I'm just interested in such a technology; a large game would be a good application for it.

A: 

I use Microsoft HPC, not for games though. Pretty easy to set up and use.

Otávio Décio
A: 

You don't mention your platform. For Java there's Terracotta

Vinko Vrsalovic
Thanks, I'll fix the question to reflect that.
edude05
Well, the platform matters with products such as Terracotta...
Vinko Vrsalovic
A: 

Have a look at Hazelcast. It is open source, highly scalable data distribution platform for Java. Hazelcast offers distributed Map, which will be shared among cluster members. you can easily store your data in it. It is super super easy to use. Just add hazelcast.jar to your classpath. No need to install any server.

Fuad Malikov
A: 

There isn't really anything for low latency, high throughput in-memory applications like real-time online games, at least not as a piece of arbitrary middleware.

Project Darkstar made an admirable attempt at this on the usability and complexity side, but found (unsurprisingly) that it wasn't scaling.

Ultimately it's a difficult (though not intractable) problem where there is no solution that is near to being universally applicable. In particular you are likely to have a tradeoff, between needing to act on stale game data on the one hand against needing to constantly exchange shared data on the other hand. Lack of correctness vs. exponential growth in complexity... pick your poison.

It's worth noting - especially if your application domain isn't real-time games - that you often don't mind if you are working with stale data, as long as it becomes correct soon enough. In such cases simple caching systems like memcache are great. Similarly, if you need more correctness but don't have to worry about throughput so much, something like Hazelcast (mentioned in another answer) might be great, but for most online games that are big enough to require load balancing "thousands of operations/sec" is just not good enough.

Some MMO technology makes some attempt to distribute the application by partitioning it geographically, which means there isn't really much shared state at all, and it requires this scheme to make sense in the game world and fiction.

Another approach is to partition it by service, and implement most services with your favourite off-the-shelf RPC approach. This lets you scale quite easily if your services are independent, but any dependencies between services puts you right back at square one.

Kylotan