Friday 29 December 2017

Node cluster examples other than for handling server load?

Hey there /r/node, here is the context of my problem:I'm creating a game with electron and I have to run some expensive computations periodically on some of the game objects(mostly AI related). It used to work well until I scaled up the number of active game objects, where the performance bottleneck showed up.My potential solutions are:1- Reduce the polling rate of the AI updates.2- Try to distribute the computing load between different processes and comunicate the output back to the main thread? (not sure that's why I am asking).3- Decrease the computation price cutting out some features.I'm still learning node API so I've checked several pages including node documentation and a bunch of tutorials but all of them use the same example(distributing load amongst child process in a htpp server) and I would really appreciate other types of examples, especially if they showcase how to properly comunicate different types of data structures between processes.So if you got any resource or insights to share about this topic I would really apreciate it, thanks!

Submitted December 30, 2017 at 01:12AM by Valaelys

No comments:

Post a Comment