I have a daemon that does the following
- retrieves site members from a mysql database (I used LIMIT 1000 to retrieve 1000 rows at a time)
- send information about these members to a third party server
- flag each member as having been processed
- Sleep for 2 seconds
- Retrieve the next batch of 1000 "unprocessed" members and send to third party server. and so on.
I am wondering whether a php daemon (I am using the system Daemon library), is the best way to accomplish this task delineated above.
I am worried of wasting too much memory (as PHP is known for that)
I am also worried about sending multiple requests to third party server, because on a high traffic day, there can be a lot of nonreceipts.
Is there a tool other than daemon I can use to accomplish this task? What methods can I implement to make this efficient considering there is a possibility of having to process over 100K rows in the mysql table, and the task is time sensitive. Also, at what point should I consider adding more servers?
Thanks!