PHP Achievements/Achievements System

Asked

Viewed 147 times

-1

I’m developing a PHP achievement/feats/insignia application.

The application will be for a game in which you use an SQL Server database and server files in a Cloud, but I have no way to make changes to the game so it is updated in real time.

If I put to update in Cronjob and there were more than 30,000 users in the database, would be viable?

An example of what I’m developing: steamcommunity

1 answer

1


This is very relative and will depend on the flow of users and the tables involved.

If there is no way to modify the game script so that it saves the data as the user moves forward, then I only see cronjob as a solution.

You have to analyze the following:

  • What is the ideal period to run cronjob, that is, with less user flow?
  • If the flow is large all the time, your server can handle all the processing?
  • Your script that updates the database, consumes a lot of memory?

With the answer in hand, you’ll know:

  • If your architecture is the best choice. Maybe it’s an exaggeration, but wouldn’t it be better to move to a distributed database;
  • If your server needs an upgrade and this solution is enough;
  • If your script (updating the database) needs to be optimized;
  • Whether the database needs to be optimized.

As you can see, if you do not want to affect the performance of the application, you will have to take some care and not simply do a cron job, but only you who knows the system can respond.

  • Thanks for the reply Filipe, I was thinking, since I use SQL Server, I could leave these activities to the procedures of the database used, agree? I think the use would be less.

  • @Edgardhufelande I’m not sure, but whenever I run an update in the database it’s always faster than in php itself, so I think yes, a Schedule in the database would be faster.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.