twiliocon europe 2013: from poc to production, lessons learnt, by erol ziya & rob baines (21st...

79
From Proof of Concept to Production Lessons learnt

Upload: eazynow

Post on 26-Jun-2015

730 views

Category:

Technology


1 download

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. #twiliocon

TRANSCRIPT

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

From Proof of Concept

to Production

Lessons learnt

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

The Lesson:

PoC != Production

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

who are we?

Erol Ziya

Rob Baines

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

hi-who?

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

We were… (UK) (USA) (Spain / Lat AM)

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

More recently...

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

So who are

Labs?

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

Where does

fit in?

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

Promoted customer’s numbers

then left them to it…

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

What did we want to change ?

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

Get involved in the calls

Ad

d v

alu

e

Help our customers

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

So we built a PoC...

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

POC Architecture

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

They

LOVED it

!

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

Let’s use it for

REAL

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

Keep it simple

Reduce:

features complexity

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

Focus on basics

Number purchase

Verification

Call diverts

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

Then enhance

SMS’s

Blacklisting

Voicemail

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

Finally

Call Analytics

Customer view

Admin view

Status summary

Etc.

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

What did we use ?

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

Tools, tools, tools!

?

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

Prod Architecture

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

What does this give us ?

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

scalability

relia

bili

ty

low latency

high throughput

up

time

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

! Time for the

tips

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

Developers just want to develop

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

Automate your development env

iron

men

t

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

Automate deployment with

Fabric http://www.fabfile.org

local-pc$ fab aws_dev deploy_site

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

twilio loves to talk to you

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

Developers

like to be able to debug

locally

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

Companies don’t like external services talking to you

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

Tunnel your way out to freedom!

ngrok

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

Branch your feature Pull Request for feedback

Make the most of your source code repository

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

Don’t reinvent the wheel

Joebloggs/super-cool-adapter.git

SuperCrunchAlgorithms TwimlThumper VoiceBanger

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

But don’t get caught out

Joebloggs/super-cool-adapter.git

6 months later

Joebloggs/super-cool-adapter.git

SuperCrunchAlgorithms TwimlThumper VoiceBanger

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

Fork it!

Joebloggs/super-cool-adapter.git Joebloggs/super-cool-adapter.git

Jhibulabs/super-cool-adapter.git

SuperCrunchAlgorithms TwimlThumper VoiceBanger

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

So many numbers, so many formats…

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

Validate

libphonenumber

clien

t s

erv

er

. 1 6 4

0877 237 6120 +44 877 237 6120 08772376120

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

Who is using it ?

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

Verification

Don’t call us we’ll

call you…

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

They spent

HOW MUCH ?

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

master

£ £ £

£

£ £ £ £ £

Subaccounts are your friend!

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

partitioning

sep

ara

tio

n

cost control

accountability

isola

tion

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

We should NEVER lose a call

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

Balance the

load and deploy

without

downtime

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

And if the

whole system fails…

failover

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

And what about

reuse

?

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

Give/it/a/REST

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

How can we be

confident it still works ?

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

Test

! Test Test

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

Has the

logic changed ?

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

assert yourself

Unit

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

Did we break our

contract ?

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

Functional

Are you!HTTP 200? G

ET

PO

ST

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

Are they

ALL behaving

?

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

Browser

Selenium UI

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

Can we

BREAK it ?

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

Push it to the

limit !

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

and then some

more

Push it to the

limit !

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

Load/Perf

API

aws: boto!

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

Metrics, metrics, metrics!

Response

Codes Requests per second

Latency

and MUCH more

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

Eat, sleep,

test, repeat

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

Does it

REALLY make phone

calls ?

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

It’s “SIP-simple”

ma

ke

calls

sipsimpleclient.org! rece

ive

call

s

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

But will it actually

scale ?

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

Don’t be a monolith

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

mod ular ise it

Don’t be a monolith

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

Scale only where you need it

mod

mod

mod

it

it

mod ular ise it

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

1 call divert with a whisper R

ed

uce

late

ncy

1

2

3

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

Static? CACHE IT!

Re

du

ce la

ten

cy

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

Work

smarter not

harder

Re

du

ce la

ten

cy

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

Hey big spender !

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

Pricing tips

Reserve & Save

Watch the $$$

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

Pricing tips

Ti er

ed Pr ic

es

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

•  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

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

•  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

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

Any

questions ?

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

Erol Ziya

Rob Baines

Thank you

@eazynow @telecoda