stigrv posted on Jul 26, 2012 2:43:47 AM - Report post
What I meant is that I assume it now sends one small request for each and every trainer. Joining all these in one larger request means less server processing per single trainer.
PHAT CAT
DABhand posted on Jul 26, 2012 4:34:26 AM - Report post
Nope it wouldn't
Sending a block will result in the server PC having to split them up to do individual searches and then resend back, then onto the next etc. Will cause it to be using more processing power and time. And the more people who do that at the same time will clog up the server.
Hence why individual searches is better.
Oh and Don't forget some tuts on ASM and defeating DMA
stigrv posted on Sep 22, 2012 9:47:07 AM - Report post
Whether you send separate requests for each trainer or send one request for all of them, the server will need to process the same amount of trainer states. By sending several requests you spread the problem over a longer time, in a very simplified "load-balancer" implemented on the client side.
The time a client uses in roundtrip for each and every request is the exact same whether you send small or large messages over the network. It is thererfore desirable to reduce the number of requests against the server and instead send few large requests instead of many small ones. Look at how it has become favorable to use sprite maps instead of single images on webpages for example. This reduces the time it takes to load a webpage, and gives a better user experience.
Because of the number of users who ask for the status of trainers from the manager I would suggest that the state of every single available trainer is cached in-memory on the server. This will be faster than looking up the state from the database or whatever technique you use to lookup trainer states. This will greatly reduce the time it takes to look up the state of trainers, no matter what scheme is used to check for updates.
The reason why I want the manager to be updated is to fix a few of its usability problems. One of the biggest issues currently is that it takes too long to start the application because of how it communicates with the server. It takes several minutes to start in my case because I have many trainers in my list.