by fswd · 3y ago · 0 comments
I use postgraphile graphile-worker https://github.com/graphile/worker for this.
For example, every month we roll over credits. For each user, when they signed up, 30 days from that, check. If they are available for roll over, reset and email. Then we have drip campaigns for alerts like running low on credit.
Also, if you upgraded your account, then pause payment, it uses a worker to schedule the date they are paid up to run the SQL to downgrade. With a simple API called 'addJob' that looks for a JavaScript file in a folder called task.
I could see this selling fast to corporate
It's on a separate network so they may go down and cause outage in your own app, go out of business, etc. (Yes, your IaaS service provider can go down as well, but that's a much larger operation and something that's very-very likely to have a much better uptime than what you could do on-site. And whatever the case is with that, it's still on top of that.)
Abstractions aren't free. (BTW, I don't see it as an abstraction, it's simply outsourcing. You'd use some kind of API anyway even if you hosted the job queue yourself.)
Depends what you're building, but likely a good trade if it's an MVP.
At $30/mo you're already ahead if it saves you 1 hour of dev time.
Most of the time, I don't want control over my infrastructure (boring, low value); I'd rather focus on building features (fun, high value).
If these start to matter, even picking a service from a list of possible providers takes time. Learning their tools, their APIs takes time, etc. OTOH if you have a project template, a setup you know, doing an MVP with that can be really cheap/quick. If not, I can see how this makes sense. But I'm not sure you can have a sustainable business just by serving people building MVPs.
You need to put up significant resources in order to beat a dedicated team running this. Many companies can do that. Many can't. Even Twitter increasingly runs into problems with site reliability...
Something something Dropbox, something something rsync.
Charly, Bryan consider yourself flattered.