[Poetic] Brain-In-A-Box
Brain-In-A-Box
A few years ago, there were two choices CCP Games could have made concerning how to handle server performance issues where large battles were concerned. They could have artificially capped systems to a maximum number of ships, meaning big battles could only become so big. Or they could figure out a way to allow big fights to continue while still allowing game mechanics to process battles in an orderly fashion.
Just a few years ago, big battles were plagued with black screens, dropped commands, unresponsive clients. Servers were overloaded when just a thousand people were on the same grid fighting.
Veritas (and his Team Gridlock) came up with the idea of time dilation**. Game mechanics slow down, allowing the servers to process data at a slower rate, thus allowing more people to engage in battles. Which means no dropped commands, and the mechanics behaving as players would expect them too (albeit in slow-motion.) Some people hate time dilation, but given the alternatives it is most definitely preferable to system capping or the random mess that was the reality before.
There are still problems with servers spiking into time dilation, though. Consider moving two fleets, totalling 500 ships, across many systems. Every time those fleets jump into a new system, time dilation [TiDi] will spike to 10-20%. By the time those fleets reach the next stargate, time dilation will have vanished. This continues after every jump into a new system. Which means that travel becomes exceptionally slow. A distance that might take 20 minutes to travel solo, now takes over an hour because of these TiDi spikes.
The reason for these spikes is that the server rebuilds every character from scratch ? taking into account the complete skill tree, implants, ship bonuses, modules, ammo ? on every session change. A session change is undocking. A session change is entering a new system (via stargate or bridging). This very complete character calculation happens when you change your ammo. When a module is burned out. When your ship is destroyed and you end up in your pod.
It's why when a large fleet is undocked all at once, that system will enter heavy time dilation until that fleet loads onto grid, at which point the time dilation starts to subside.
Veritas has a plan and he's been working at it for some time. He calls it Brain-in-a-Box.
Basically, Brain-in-a-Box off-loads all these character calculations to another server (or set of servers) and keeps a character snapshot available at all times. When you jump into a new system, rather than that node recalculating your entire character from scratch (as it does now), the node simply retrieves the character snapshot from the Brain-in-a-Box servers. This of course greatly reduces node load. In the example above, 500 capsuleers do not have to be recreated at each system jump, rather a data structure ? a character snapshot ? is simply retrieved over the internal network.
Whereas Brain-in-a-Box will not allow more people to fight in a system, it will allow people to get into those fights more quickly. It will allow fleets to travel to those fights more quickly. It means nodes that have big fights aren't wasting processing time recalculating characters entering the node, which means a battle that might normally be at 50% TiDi isn't constantly fluctuating between 10% and 50% because of spikes in character recalcs.
Of course, as simple as Brain-in-a-Box sounds, it isn't that simple in implementation. There's issues of servers. How many servers are required to handle 50K players online, without those servers becoming overwhelmed themselves intermittently? There are issues of syncing. If a module on your ship burns out, that needs to be transmitted to the Brain-in-a-Box servers, and then the recalculated data structure returned, and all in a timely manner.
I've no idea how far along Veritas is in his Brain-in-a-Box work, but I gather he's well into it. We could see this on the SiSi servers this winter. Perhaps going live next spring. Or it could still be 12 months away from just the testing phase. Either way, we'll eventually see it. And it will mean better gameplay overall, especially for large fleets.
After time dilation, what is the next big thing for CCP Veritas, potentially? Server code is single threaded. So perhaps rewriting server code to support multi-threading. That, of course, means rewriting all that code from, basically, scratch. And of course, if that is something that CCP wants to do, they might as well tackle a bunch of other legacy code too, such as POSes. Of course, multi-threading is not a panacea. Creating and switching back and forth between threads has high overhead. Too many threads and you actually have a worse situation than you did single threaded. So a lot of work and testing has to be done to find that sweet spot. This might not be something CCP wants to tackle at all (it would be a couple year project, minimum), but it is the next obvious area for server performance improvements.
** There are lots of other smaller server tweaks that Veritas and his team have implemented to improve server performance, as well.
Source: Brain-In-A-Box
