Answer the question
In order to leave comments, you need to log in
How to properly implement a distributed computing system?
I have a rather unusual task... I
have a project (node.js) that is quite heavily loaded.
Project objective:
Answer the question
In order to leave comments, you need to log in
Самый лучший выход на мой взгляд сделать эту возможность как задание в игре. То есть клиент сам выбирает активировать ее или нет и насколько сильно можно загружать проц и взамен за рассчет кадой игры получает какие то внутриигровые бублики, по сути они работают на вас, ведь с таким же успехом вы могли бы майнить битки на их видюхах, вместо рассчета игр, so they have to be paid for it, in proportion to the work they do, and then the players will be happy to do it. naturally, it is not necessary to tell them exactly about the calculation of games, but to beat them with gameplay (for example, accelerated learning of magic with x2 speed requires additional computing power for the player + explain to the player that the more powerful the computer, the faster the study will go). + it is possible to make an option to activate this thing only when powered by the mains, so many players will intentionally leave the phone on while charging just to get bonuses.
It is difficult for you to help even if you want. First of all, you need to see what the line with the parameters is, whether everything is needed in it. Let's all. Is everything needed right now? You probably saw that the statistics (percentage of wins) at WOT is updated once a day at night - it's no coincidence. Pavel
rightly said
about GO , look at the Ogame sources on the net - the whole game is in php there, but the combat system is written in one of the C-languages.
Why do you need a distributed system? Buy 1 server for $5000 with almost no RAM and HDD, order more processors there and write a handler in GO, C++, etc. Send all tasks according to calculations to it. PROFIT! )))
I'm not sure if this is possible in your system, but you can try to introduce a system of "time stamps", while "inactive" objects are not calculated by your function without special need, "freeze" them until they are accessed, when they were accessed calculate the function as many times as necessary, so that the "time" in the object "catch up" with the objective, while free computing power (when there are few clients) to spend on the calculation of "lagging" objects.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question