4 ms·
I have a game running on GAE (www.runesketch.com), our initial design was really ineffecient. Using Khan Academy's mini profiler (https://github.com/kamens/gae_
by tlarkworthy 13y ago
I have a game running on GAE (www.runesketch.com), our initial design was really ineffecient. Using Khan Academy's mini profiler (https://github.com/kamens/gae_mini_profiler https://github.com/kamens/gae_mini_profiler) we slashed our gets, puts and general overheads by two orders of magnitude. Our main cost, running a live game, we managed to completely remove gets and puts and run in memcache. We hardly scratch our daily usage now.
One of the overheads I did not realise that took a long with was using channels. We found them about 3x slower than a get or put. By parrallelising those with another thread we reduced our latency hugely. Our game went from taking 8 seconds to service a move, to 300ms.
Just my experience, did you work hard with a profiler before moving all the code?
- dekhn 13y agoThis is basically a fundamental observation that applies to nearly all service-oriented-computing: unless you've collected the data of how your system operates on a platform, you have no basis to complain about the platform, except for subjective issues. And subjective issues are boring.
- alvivi 13y ago> Our main cost, running a live game, we managed to completely remove gets and puts and run in memcache. We hardly scratch our daily usage now. Using memcache for store gameplay data is not the best idea. Memcache could be evicted at any time without any previous warning. Using a backend instance and storing the data in the ram is an order of magnitude faster, and thanks to the runtime environment api the service could stop gracefully.
- tlarkworthy 13y agoI agree losing all games in progress is a pain, but our card game is meant to have a 5 min order of time investment, so its not a huge biggie that users occasionally have their games wiped. Annoying 2% of our users is sufferable at the moment