Page MenuHomePhabricator

Add a parameterized Future for Twilio API calls
ClosedPublic

Authored by epriestley on Wed, Jan 2, 3:12 AM.

Details

Summary

Ref T920. We currently embed the Twilio PHP API, but can replace it with about 100 lines of code and get a future-oriented interface as a bonus. Add a Future so we can move toward a simpler calling convention for the API.

Test Plan

Used this future to send SMS messages via the Twilio API.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Wed, Jan 2, 3:12 AM
epriestley requested review of this revision.Wed, Jan 2, 3:14 AM
amckinley accepted this revision.Thu, Jan 3, 12:21 AM

This is a Good Thing regardless of how we go forward, but FWIW, AWS also supports sending SMS via SNS: https://aws.amazon.com/sns/sms-pricing/

This revision is now accepted and ready to land.Thu, Jan 3, 12:21 AM

I was looking around for a second provider but didn't realize SNS supported it. "Plivo" seems like another one, do you know of any more? I'd ideally like to aim for ~3 reasonably sensible providers so we can do fallback. Googling hits a lot of stuff but I've never heard of any of it.

I was looking around for a second provider but didn't realize SNS supported it. "Plivo" seems like another one, do you know of any more? I'd ideally like to aim for ~3 reasonably sensible providers so we can do fallback. Googling hits a lot of stuff but I've never heard of any of it.

I haven't heard of any of these guys except for AWS and Twilio, which seems like a pretty good combo for fallback. It's probably not worth changing our existing queueing/retry behavior, but FWIW SNS makes pretty serious resilience promises:

Upon receiving a publish request, SNS stores multiple copies (to disk) of the message across multiple Availability Zones before acknowledging receipt of the request to the sender.

Also just for giggles, I'm going to subscribe our phones via SMS to the AWS CloudWatch alarm that actually has caught a few real issues (as opposed to the strange "1/4 of a machine is down" alarms).

Groovv Offers is a text, email and social marketing solution by Total Merchant Services. Groovv Offers acquired Fanminder, one of the SMS text messaging services included on this original list. Groovv does not make pricing public on its website.

Wow this provider sounds RELIABLE.

This revision was automatically updated to reflect the committed changes.