twiliocon europe 2013: from poc to production, lessons learnt, by erol ziya & rob baines (21st...
DESCRIPTION
Here are the slides for the talk that myself (Erol Ziya - @eazynow) and Rob Baines (@telecoda) gave at the first Twiliocon Europe, providing tips for when moving from PoC to production based on our experiences in hibu labs. #twilioconTRANSCRIPT
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 ?
Get involved in the calls
Ad
d v
alu
e
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 ?
scalability
relia
bili
ty
low latency
high throughput
up
time
! Time for the
tips
Developers just want to develop
“
”
Automate your development env
iron
men
t
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
Branch your feature Pull Request for feedback
Make the most of your source code repository
Don’t reinvent the wheel
Joebloggs/super-cool-adapter.git
SuperCrunchAlgorithms TwimlThumper VoiceBanger
But don’t get caught out
Joebloggs/super-cool-adapter.git
6 months later
Joebloggs/super-cool-adapter.git
SuperCrunchAlgorithms TwimlThumper VoiceBanger
Fork it!
Joebloggs/super-cool-adapter.git Joebloggs/super-cool-adapter.git
Jhibulabs/super-cool-adapter.git
SuperCrunchAlgorithms TwimlThumper VoiceBanger
So many numbers, so many formats…
“
”
Validate
libphonenumber
clien
t s
erv
er
. 1 6 4
0877 237 6120 +44 877 237 6120 08772376120
Who is using it ?
Verification
Don’t call us we’ll
call you…
They spent
HOW MUCH ?
master
£ £ £
£
£ £ £ £ £
Subaccounts are your friend!
partitioning
sep
ara
tio
n
cost control
accountability
isola
tion
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
confident it still works ?
Test
! Test Test
Has the
logic changed ?
assert yourself
Unit
Did we break our
contract ?
Functional
Are you!HTTP 200? G
ET
PO
ST
Are they
ALL behaving
?
Browser
Selenium UI
Can we
BREAK it ?
Push it to the
limit !
and then some
more
Push it to the
limit !
Load/Perf
API
aws: boto!
Metrics, metrics, metrics!
Response
Codes Requests per second
Latency
and MUCH more
Eat, sleep,
test, repeat
Does it
REALLY make phone
calls ?
It’s “SIP-simple”
ma
ke
calls
sipsimpleclient.org! rece
ive
call
s
But will it actually
scale ?
Don’t be a monolith
mod ular ise it
Don’t be a monolith
Scale only where you need it
mod
mod
mod
it
it
mod ular ise it
1 call divert with a whisper R
ed
uce
late
ncy
1
2
3
Static? CACHE IT!
Re
du
ce la
ten
cy
Work
smarter not
harder
Re
du
ce la
ten
cy
Hey big spender !
Pricing tips
Reserve & Save
Watch the $$$
Pricing tips
Ti er
ed Pr ic
es
• 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 1
• 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
Just to recap 2
Any
questions ?
Erol Ziya
Rob Baines
Thank you
@eazynow @telecoda