Whats the best approach for writing data to a file that will be picked up daily by a link to the feed?
I want our multi-client web app to allow each client to write information into an .xml file when they click a "post to feeds" button. That xml file will then be picked up daily by the feed that retrieves it. However, at any time of the day the clients can click a button to post information that should be put inside the xml file.
My initial thoughts were to just use php's fopen, fwrite to write directly to the file. However, as clients grow I want to avoid the possibility of the main .xml file getting locked during an update, which would prevent other users from being able to add data to the xml file.
Is the file getting locked like this even possible, or am I worrying about something insignificant? We'll have about 3000 clients.
Would I be better off putting their information into the mysql table, then write a separate process that runs once an hour to query the database and write any new posts into the xml file, which would limit the possibitily of the file getting locked?
What advice would you give me?
Thanks in advance.