Rough ideas on how I envision the future scalability of this server:
- a Map simulation update runs single threaded and should require no synchronization
- a GameServer can host 1 or more Maps; it would simulate each Map in parallel taking advantage of however many cores the hosting server has available (8 cores is not uncommon)
- a player Connection has a Channel ID as its state, selected from the initial auth screen
- a Channel has it own full World copy (i.e. full set of supported Maps instances, different for each Channel)
- the mapping is (Channel, Map) -> GameServer (a GameServer can host Maps belonging to different Channels)
- we mostly want to keep a 1-to-1 mapping between Channels and GameServers, but not enforce to allow deployment flexibility
- some lightweight TCP proxy could route to the correct GameServer by a facade "channel server" stored in the game client config
- could perhaps allow live shard migration (a busy ch1 map1 full of shops and buyers could be moved alone in one server)
- warping keeps the player in the same Channel, possibly (but not necessarily) hopping to another GameServer
As a first preparation step I suggest to simply parallelize Map simulation updates within a World, so we find and squash any synchronization bugs early.
Rough ideas on how I envision the future scalability of this server:
As a first preparation step I suggest to simply parallelize Map simulation updates within a World, so we find and squash any synchronization bugs early.