Erlang - Because s**t Happens by Mahesh Paolini-Subramanya

Post on 10-May-2015

1.027 views 3 download

Tags:

description

Mahesh talks about the buddha-nature of Erlang/OTP, pointing out how the various features of the language tie together into one seamless Fault Tolerant whole. Mahesh emphasizes that Erlang begins and ends with Fault Tolerance. Fault Tolerance is baked into the very genes of Erlang/OTP - something that ends up being amazingly useful when building any kind of system. Mahesh Paolini-Subramanya is the V.P. of R&D at Ubiquiti Networks - a manufacturer of disruptive technology platforms for emerging markets. He has spent the recent past building out Erlang-based massively concurrent Cloud Services and VoIP platforms. Mahesh was previously the CTO of Vocalocity after its merger with Aptela, where he was a founder and CTO.

Transcript of Erlang - Because s**t Happens by Mahesh Paolini-Subramanya

{

Erlang :Because S**t happens

Mahesh Paolini-Subramanya (@dieswaytoofast)V.P. Ubiquiti Networks

My Vacation

(Actually, the day before)

A small failure…

The Horror! The Horror!

Why are my calls failing?

You better call me back!

I’m still p***ed off!

And you’re stupid Apps don’t work!

The Horror! The Horror!

Surely you Tested?

1000 year floods

Fault Tolerance

Concurrency

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency

Fault detection

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency

Fault detection

Fault identification

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency

Fault detection

Fault Identification

Error Encapsulation

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

erlang…

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Concurrency Oriented

Concurrency Oriented

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Fault Detection

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Stack Traces?

Immutable Variables

X = 1.

Immutable Variables

X = 1.

X = 2.

Immutable Variables

X = 1.

X = 2.

X = X + 1.

Fault Identification

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Let It Crash

BEAM!

Faster to create

JVM is not necessarily your friend!

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

Code Upgrade

Live!

Hot SwappingCode Upgrade

Concurrency

Fault detection

Fault Identification

Error Encapsulation

Code upgrade

Stable Storage

The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf

The Intangibles

4x – 10x less code

Code Size

Faster to create

4x – 10x less code

Faster to create

Easier to reason about

4x – 10x less code

Faster to create

Easier to reason about

Fewer bugs

4x – 10x less code

Faster to create

Easier to reason about

Fewer bugs

Speedy refactoring

4x – 10x less code

The Shell is our friend

Live Debugging

Predictability

Performance

Fault Tolerance - Systems

Romney 2012

Fault Tolerance - Systems

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Loose Coupling?

Breeds Trust

Loose Coupling

Loose Coupling

Breeds Trust

Devote more brainpower to specific areas

Loose Coupling

Loose Coupling

Breeds Trust

Devote more brainpower to specific areas

No. of bugs/line is constant

Loose Coupling

Performance

60 - 90% of all SW projects fail

10 – 25% of all SW projects get abandoned

Fault Tolerance

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Monitoring?

Dashboards

Monitoring?

Dashboards

Out of band systems

Monitoring?

Supervision

Dashboards

Out of band systems

Polyglot safety

Monitoring?

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

Concurrency

Error encapsulation

Fault detection

Fault identification

Code upgrade

Stable Storage

The Big Six - Systems

No battle plan survives contact with the enemy

Not just about Systems

Fault Tolerance

Fault Tolerance

People

Vendors

Fault Tolerance

People

Vendors

Fraud

Fault Tolerance

The BusinessBeware the Black Swan

Is It Safe?

erlang…

mahesh@dieswaytoofast.com @dieswaytoofastQuestions

Coda

Active Queue Management

Queues

Queues

Queues

Queues

Can you recover quickly?

Buffer-bloat doesn’t matter, right?

Once up, can you deal with the backlog?

Back-pressure isn’t an issue, right?

Queues

Can you recover quickly?

Buffer-bloat doesn’t matter, right?

Once up, can you deal with the backlog?

Back-pressure isn’t an issue, right?

Queues

Programmable

Behavioral

Self Managed

Something’s gotta give

Tail Drop

God(category – TCP/IP)

RED

RED

Newark Airport

FRED

RED-PD

WRED

RED – Many many more

SRED RRED ARED (and Blue!) CHOKe

Special Mention

RED in a different Light

mahesh@dieswaytoofast.com @dieswaytoofastQuestions