Hello, I am interested in having a general idea of what is happening with the Go Runtime code from the server startup to the matches being created. I really dislike being in the dark of whats happening behind the scenes and trying to make sense of what I am writing (eg where something will go in memory and does it make sense to do something like X etc… )
My understanding is that init module is called, initializes all the RPC functions, sets up everything. Then all the calls to the game server are the regular HTTP/ RPC requests with a match id that is probably stored somewhere in a map. Match is basically a struct that lives on the heap that has match state struct in itself.
I am mostly asking because of the way I use memory, I have an authoritative server, that includes influence maps, bunch of components so misusing memory can be rather costly. I don’t think about it that much nor should at this point I but I’d love to have a general idea of what I am doing.
Because of the age old question in Golang is pointer vs value . Do all the regular advice for pointer vs value apply here?