May 17, 2010 10:16 AM|netplan|LINK
First of all...I hope I have the right forum.
I have a webform for an ecommerce website that can process hundreds, maybe thousands of purchases at specified times of the month.
Users will sign up for autoshipments once a month and I will charge them for their order and submit their order to have their products delivered to them.
This is the flow:
-I go through everyone in the database that has signed up for autoshipments
-I get their order that they have specified that that they want to recieve every month
-I submit the order to the Payment Processor and charge them for their order
-If Successful, I write their order to my database
-I send an email to the distributor (warehouse) so they can ship their order
-Send an email to the user informing them that their Autoship order has been processed
...and then I do this for every user in the database. I've tested this with about 5 users and the process takes about 15 seconds. If I have 1000 users, this will take a considerable amount of time and this will use up a lot of resources.
Is there a better way of doing this so that my website doesn't go down everytime I run this process?