Jorge Alves
YaBB Newbies
Offline
Posts: 34
Braga - Portugal
Re: two php requests at the same time.
Reply #4 - Dec 4th , 2009, 11:26am
i'll try to explain better.... i'll have, something what i can call "smal files", but i'll have lots of files. those files will be geometry vertices processing will use. each file will cover a section of the main geometry that users will work on. like in a building site(main geometry), several workers(users) in a level(file), where each level is a file, and those workers will acess only that level(file), but with time, the building(main geometry) will grow up and that means more file, and i want every user when loading or saving his data, doesn't need do acess ALL the data in the database, but a small section of the main geometry stored in a small file. a user will work in a file only to prevent the server to process everything all the time. it's possible to have 2 users updating the same data at the same time, thats no problem, because i thought about that already, i just need to prevent the script updating each file not to corrupt the file, because that would be total FAIL, since is geometry data. so, my ideia is to make a writing_file_script that will not be executed twice at the same time. THAT JUST CAN'T HAPPEN. and as you told me is is possible to happen, right? if script is executed, it blocks it's self from execution and processes data from data_queue or something, after doing so, it unblocks it's self to be executed again. if script is blocked , data send by user goes to the data_queue only, if not blocked data goes to data queue the same way, but script is activated to process all data in data_queue. i hoppe it works fine.....