

How patio11 builds Twilio apps - gregorymichael
https://www.twilio.com/blog/2015/01/how-patrick-mckenzie-builds-twilio-apps.html

======
sdrothrock
> I'm generally pretty happy with Twilio's responsiveness to everything over
> the last couple years.

I have to disagree with this. I've had a number of problems with both Twilio's
customer support (failing to simply explain how to do something when I stated
what I was trying to do) and also with their technical support (completely
abandoning me for a week despite me immediately following up with what they'd
requested and then asking for status updates).

~~~
gregorymichael
OP here. I'm so sorry to hear that we let you down like that. Totally not what
we're striving for. Wouldn't be surprised if you've moved on after an
experience like that, but if you need any help from us in the future and
you're not getting what you need, please feel free to reach out to me directly
(gb@twilio.com).

~~~
sdrothrock
Thank you, and I appreciate it. If I get abandoned again in the future, you'll
be the first person I contact.

------
Animats
Twilio is useful, and not too expensive. It's most useful for SMS input, since
it doesn't understand voice; it just records it. I just use it for a fun
application; I have it connected to a 1930s Teletype machine at steampunk
conventions, so people can send in telegrams to be hand-delivered.

Inbound SMS is still limited to 160 characters; Twilio can't reassemble a
multipart SMS message, or give the user enough info to do so. Nexmo, a
competitor, can handle multipart inbound SMS. I wish Twilio would catch up in
that area.

~~~
ezequiel-garzon
I didn't know teletype machines were that old. By any chance, do you happen to
have a video available?

~~~
Animats
[https://vimeo.com/97062822](https://vimeo.com/97062822) -

[https://archive.org/details/Aethericnovaalbiion2011](https://archive.org/details/Aethericnovaalbiion2011)

[https://archive.org/details/Aethericmachine14](https://archive.org/details/Aethericmachine14)

[http://www.aetherltd.com/refurbishing.html](http://www.aetherltd.com/refurbishing.html)

Those are some of my machines. Those machines were built between 1924 and
1944. There are older printing telegraph machines, back all the way to 1852,
but the Model 14 from 1924 was the first one that "just worked". So hundreds
of thousands were produced, and many are still around. If you want an old
Teletype, there are usually some on eBay.

~~~
ezequiel-garzon
Thanks for such a thorough reply. I'm sorry I just saw it now, 9 days later.
Thanks again.

------
hawkice
Great piece. More B2B companies should offer customers promotion in exchange
for stories of how useful their product is. Major win-win. And of course
'patio11 is doing odd and clever things with twilio aside from his business.
:)

Minor nitpick: Incorrectly states he's the highest karma user of HN, when
'tptacek has almost double his karma, and pg is #2 even though he's not on the
list of high-karma users.

~~~
gregorymichael
Haha. I knew someone was going to call me out on that -- tried to phrase his
HN status succinctly and came up ambiguous. I was looking at the average
rating on the top 10 list, but you're absolutely right that a couple folks
have more gross karma. Semantics matter. Thanks for pointing that out.

And thank you too for the compliments.

------
sleazebreeze
I loved the in depth discussion of his process for making the app more stable.
Is there any other good articles or books about making applications more
stable and reliable against hard failure?

------
JonoBB
>Someone could be logging in to their dashboard and the web service basically
is like, “Well sure, I’ll serve up your dashboard HTML at the moment, but I
got to send these phone calls out right now so you’re going to wait.”

Why not just use a push queue like iron.io so that it doesn't block http at
all?

~~~
lmm
More moving parts, more points of failure, async queues make problems much
harder to debug (you no longer have a "stack trace" that tells you where your
bad data came from, you just know it came off the queue like that). Async
queues have advantages for many problems but they don't come for free.

~~~
JonoBB
Sure, but those are in most cases _easily_ surmountable, and the advantages in
this case sound somewhat higher than the downsides. Who knows...except
@patio11.

------
simonebrunozzi
Waiting for patio11 to show up here :)

------
davidw
Reliability, FSM's... Erlang might be a good fit for people working with
Twilio - I wonder if there's any kind of API though.

Sounds like fun though - there's something cool about doing stuff in the "real
world" beyond the screen that is somehow satisfying.

~~~
Jtsummers
Here [0] are a list of Twilio libraries. I used the erlang one a couple years
ago for a pretty basic application, similar to patio11's. I was traveling to
Canada for a couple weeks and picked up a pre-paid SIM. I set up my primary
phone to forward to my twilio number which in turn connected to my temporary
number. Pretty unnecessary (I received no calls, and often forgot my phone at
the house I was staying it), but a good learning exercise.

The erlang library is at [1]. It doesn't look like it's been touched in a
while, though. I've also not touched Twilio since then so I have no clue if
that's an issue or not. Though I'll probably use a similar setup for a longer
trip planned for this summer so maybe I should track down that code.

[0]
[http://www.twilio.com/docs/libraries](http://www.twilio.com/docs/libraries)

[1]
[https://github.com/huffman/twilio_erlang](https://github.com/huffman/twilio_erlang)

------
jerguismi
We use both nexmo and twilio, and I prefer the nexmo. Better coverage,
features etc.

------
mikelbring
Whats the best way to insert <Say> in a <Play>, splitting the mp3 up?

~~~
taf2
You'd have to split the mp3 on your end. then it's simple just:

<Say>message</Say>

<Play>part1.mp3</Play>

<Say>message</Say>

<Play>part2.mp3</Play>

...

etc...

But I could be missing the point of your question?

~~~
mikelbring
That's what I feared. Didn't know if there was a way to do like a delayed
<Say> into a <Play>

------
curiously
twilio is great but the toll free number is seriously expensive. the android
client is a joke and you can't use it to answer or make calls. what twilio
needs is an official skype like app.

~~~
taf2
We use the android and iOS clients to make calls - it works really well.

~~~
curiously
I get reports of voice echoing.

------
Artemis2
Very nicely written article, a good PR piece! I'm just curious about how much
patio11 was paid by Twilio for that.

~~~
patio11
A potbelly sandwich and a bag of chips. I get rather substantially more
monetary consideration from Chase Bank as a consequence of my relationship
with Twilio than I do from Twilio. (I spend +/\- $7k per year on Twilio, so 1%
CC rewards is $70 cash money. Chase clearly has me on the take!)

Seriously, though: I've never taken money for promotion from anybody. That's
not my business model, which is straightforward: mostly, I sell software to
businesses for money. It's not terribly difficult to get me to write or speak
for free, since I love writing and speaking about geeky subjects, as evidenced
by about 2 million words on my blog or HN comments.

~~~
Artemis2
Thank you for answering, I was genuinely curious, this feels like you put a
lot of work in it.

