more like locking.
For example I have PHP FTP set and getting a file, and I don't want another user to call it, and hence over writing the first user's file.
wanted to wait until the file is recieved and back (10 seconds), that file is parsed and the data is taken out.
If another user executes the same request action, the file will be over written on the FTP server. (I'm limited in that way, the program on the remote server can take and generate one file at a time, i can't create multiples).
So while i'm waiting that 10 seconds, i want to tell all other requests a busy signal and try again later.
The way i'm planning to do this is to have a database row that sets a boolean value
when a request is made, it is set to busy, and all incoming requests will be denied, when that user's file is received and parsed, the record is changed back to ready and will process the next request.
How my vendor works is that, i ftp a file with a specificname, in a few seconds, their program reads my "request" file and processes the "response" file. I basically have a loop that waits 5 seconds and checks to see if this response file exists yet. If it does, i grab it, and parse the data in it. Then its ready for the next transaction.
I hope that all makes sense, i know its a lot of reading.
|