Over time, from listening to various comments that Lawton and other devs have made, I believe I have a rough understanding of the general types of servers that ANet employs to run the game. (Of course, I might be wrong, but what I’m going to say should apply in broad strokes).
There are several different classes of servers. At a minimum we have:
- Login Servers, which could also likely be called “Character Servers”. These are responsible for holding all of the durable information about your account and characters.
- Trading Servers, basically, the Trading Post, and likely the Gemshop as well.
- Map Servers. Each of these drive one or more map instances at a time.
- Asset Servers, which are what the client downloads textures, sounds, etc from.
- Config Server, where they are able to do things like disable a trait on the fly, or where gem store sales are turned on or off, etc.
When a character enters a map, they connect to the appropriate Map Server, when then contacts the Login Server, and checks out a copy of the character. The Map Server is in charge of player location, combat, etc. Any changes made to things like inventory are first applied at the Map Server, and then pushed to the Login Server on a frequent basis (details a bit fuzzy here, and rightly so, as this gap is where duplication bugs crop up in other games).
With the API system, they’ve added another set of servers, which I’ll call:
- API Snapshot Servers.
When an API request is made, it looks to see if it already has that information snapshotted. If so, it serves it directly. If not, it goes out and asks another server for that information. In order to ask those servers for information, an internal connection has to be built to allow for that. This can often take a lot of effort, since those other servers likely never expected to have these types of requests asked. Also, extreme care has to be given that these things are done correctly, so that the stability of the main game is not compromised. Thus, many of the delays in getting information are likely a result of coordination with the team which owns those other servers.
The first round of APIs were able to pull things from Asset and Config servers, and as such only gave you global information, which was mostly static. (Though I’m not 100% sure how event information was pulled). Later, we got a connection to the trading post added, which was later upgraded to give per person information. Most recently, we’ve gained access to the Login servers.
This request is about getting information about current location. This is strictly a function of the Map Servers. There’s several issues that come to mind with getting this:
- Update Speed. The API system is set up to take snapshots, and then serve off that snapshot for many minutes. Changing to a direct feed would require some rework.
- Potentially significantly increased load on Map Servers. Constantly getting this information isn’t free. Responding to requests takes resources, especially if many people do it at once. Think of a WvW map, where several of the major guilds are using this to coordinate attacks. Would this be worth it if in response to this side load, they had to lower the max map population by 15 people?
Overall, the effort needed to make this happen is very non-trivial. Meanwhile, there are lots of other things that can be done with the newfound connection to the Login servers, such as Wallet, Unlocks, and Guild info. From the Asset and/or Config servers, we can get things like Skills, Specializations, and Traits.
There’s also the overall question of the right tool for the job. Is a constant stream of pull requests against a REST API the right way to do this? Or should we instead look to expand on the Mumble model, where we’re getting information direct from the client, and thus avoid many of these issue. We’ve already got location and map information kludged into the Mumble API. Perhaps at some later point, we could get a similar direct memory tool which expands on this more cleanly. These things, however, almost certainly would require the effort from people on a team other than those currently working on this API.
Hope that helps.
PS – I’d love to know how wrong I am about your server structure.
PPS – I also understand if you’re not allowed to tell me.