But being a web game there is a web server involved and the big question is what sort of data architecture to use? The most obvious one is probably using a relational database behind the scenes. That way each game (with up to 1,000 players) is held in a single database in about 12 tables. I’ll probably use MariaDB.
I did consider doing everything in RAM but its a terrible abuse of a web server and rather restricts it to running one or two games. Pulling stuff out of a database is much less strain on the system than having a few hundred MB of RAM tied up per game. A web server can support multiple games which helps keep the costs down.
Also with a web game, it raises the possibility of caching certain static files on disk to improve throughput. This blog uses WordPress but has a cache so when you view a page, it’s almost certainly been pre-generated rather than built on the fly.
An example of a web game that I admire is Torn.com.