Jump to content

b0r

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

b0r's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am new to php/ajax and I am currently building a web site. I am wondering how periodic update requests from users are handled by the server. If the database and website needs to be updated reguarly (every 30 sec or so) how would I do this? I read about cron jobs which would allow the database to be updated without user interaction but currently I am not in any position to use that. I did think about just letting the requests from the users actually update the database but then i got worried about how to handle possible race conditions. If the script requested by the user contains logic between calls to the database then I assume it is possible for other requests to pre-empt the first request and all various problems might arise because of this. My question is basically how I should go about to solve this. What I want is for the database to be updated correctly, data needs to be updated according to the time and value of other stored values in the database. If this update is separate from user interaction or not does not matter as long as no data is corrupted. I guess it would be possible to solve this using transactions and smart queries but it doesn't sound like that is how it should be solved. Perhaps some sort of event scheduling in the database just using stored routines is a better choice. I am ranting now Regards b0r.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.