Please help me out.
I need to http post messages to a particular SMS gateway. So, I have a table similar to this:
| send_time | phone | msg |
|2010-03-15 08:30:00|12125551234|'first message user A' |
|2010-03-15 09:30:00|12125551234|'secnd message user A' |
|2010-03-15 08:30:00|15145550000|'first message user B' |
Each one represents the parameters I need to build the http post request, and it needs to be sent at the send_time
(give or take a few minutes).
I currently have a rake task every minute, that checks the db and sends the POSTs accordingly. But that seems a flimsy way to go about it. Besides, this needs to scale very well; I will have to be able send many (let's say thousands) in a given minute.
How would you tackle this problem?