How do games handle arrays/objects of billions of lines to load every gameobject/players positions of big maps for example (server side, for authoritative servers)?
I understand it could be split into chunks like in minecraft. As i imagine it, the client request nearby chunks data from the server. And the server load/unload chunk from separate json files when a player arrive near or inside the chunk. But is it the right approach ? It could also be loaded from a database but it doesn't look like the right approach performance wise (but opening local files neither...i guess)
This lead me to the idea of loading the entire map in a variable at runtime, but it will just explode my memory usage too and eventually even crash nodejs if there is too much data to load in memory.
Edit: i have just remembered that world Of Warcraft private servers running on CMANGOS are just loading all data in memory at server start, so maybe it is not that crazy to do
How do Minecraft or Eve online/echoes handle this part?