From
Proof of Concept 
to Production


Lessons learnt
The Lesson:


PoC != Production
who are we?

Erol
Ziya

Rob
Baines
hi-who?
We were…
(UK)

(USA)

(Spain / Lat AM)
More
recently...
So who
are

Labs?
Where does

fit in?
Promoted 

customer’s numbers

then left

them to it…
What did we
want to change

?
Add value

Get involved in
the calls

Help 

our customers
So we built a PoC...
POC Architecture
They

LOVED
it

!
Let’s use it for

REAL
Keep it simple

Reduce:


features
complexity
Focus on basics
Number purchase
Verification
Call diverts
Then enhance
SMS’s
Blacklisting
Voicemail
Finally
Call Analytics
Customer view
Admin view
Status summary
Etc.
What 

did we use

?
Tools, tools, tools!

?
Prod Architecture
What does this

give us

?
reliability

scalability
uptime

low latency
high 
throughput
Time for the

tips

!
“

Developers just
want to develop
Automate
 yo
ur d
eve
lopm
ent

environment
Automate deployment with

Fabric
http://www.fabfile.org

local-pc$ fab aws_dev deploy_site
twilio 

loves

to talk
to you
Developers

like to
be able to
debug
locally
Companies

don’t like

external services

talking to you
Tunnel your

way out to

freedom!
ngrok
Make the most of your
source code
repository
Branch your feature
Pull Request for feedback
Don’t reinvent the wheel


Joebloggs/super-cool-adapter.git

SuperCrunchAlgorithms

TwimlThumper

VoiceBanger
But don’t get caught out





6 months
later
Joebloggs/super-cool-adapter.git

SuperCrunchAlgorithms

TwimlThumper

VoiceBanger

Joebloggs/super-cool-adapter.git
Fork it!


Joebloggs/super-cool-adapter.git

SuperCrunchAlgorithms

TwimlThumper

VoiceBanger

Joebloggs/super-cool-adapter.git

J
hibulabs/super-cool-adapter.git
“

So many numbers,
so many formats…
0877 237 6120
+44 877 237 6120
08772376120

libphonenumber

server

client


Validate
.
1
6
4
?

Who is using it
Verification
Don’t call
us we’ll
call you…
They spent 

?

HOW MUCH
Subaccounts are
your friend!
master
£

£

£

£

£

£

£

£

£
isolation

separation

partitioning

cost control
accountability
“

We should


NEVER

lose a call
Balance the

load
and deploy
without

downtime
And if the 
whole system
fails…

failover
And what about

reuse

?
Give/it/a/REST
How can we be

it still
works

confident

?
Test 

Test

!
Test
Has the

logic
changed

?
Unit

assert 
yourself
Did we break
our

contract

?
Are you!
HTTP 200?

POST

Functional

GET
Are they

ALL
behaving

?
Browser

Selenium UI
Can we

BREAK it

?
!

Push it to the

limit
!
more
Push it to the

limit
and then some
Load/Perf

API

aws: boto!
Metrics, metrics, metrics!

Response
Codes

Latency
Requests 
per second
and MUCH more
Eat,
sleep,
test,
repeat
Does it

REALLY
make phone
calls

?
receive calls

make calls

It’s
“SIP-simple”

sipsimpleclient.org!
But will it actually

scale

?
Don’t be a
 monolith
Don’t be a
 monolith
mod
 ular
 ise

it
Scale only where you
need it
mod
 ular
 ise

it

mod

it

mod

it

mod
Reduce latency

1 call divert with a whisper

1

2
3
Reduce latency

Static?

CACHE IT!
Reduce latency

Work

smarter
not
harder
Hey big
spender

!
Pricing tips

$

Watch the $$


Reserve & 

Save
Pricing tips

es
Ti
ic
er
ed
 Pr
Just to recap 1
•  Validate and verify numbers
•  Use subaccounts to
partition cost
•  Monitor your servers
performance
•  Test it, and test it some more
•  Make the most of tiered pricing
Just to recap 2
•  Automate Everything
•  Use tools like localtunnel for
debugging
•  Branch off features
•  Don't reinvent the wheel
•  Deploy without downtime
•  Have a failover plan in place
•  Make it RESTful
•  Modularise your code
•  Minimise the latency on a call
Any

questions

?
Thank you
Erol
Ziya
@eazynow

Rob
Baines



@telecoda

Twiliocon Europe 2013: From PoC to Production, Lessons Learnt, by Erol Ziya & Rob Baines (21st Oct)