embracing the monolith

51
Doubling down on python to move fast without breaking things. Embracing the Monolith in Small Teams Leon Sasson @leonsasson PyData Chicago 2016

Upload: leon-sasson

Post on 23-Feb-2017

64 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Embracing the Monolith

Doubling down on python to move fast without breaking things.

Embracing the Monolith in Small Teams

Leon Sasson @leonsasson

PyData Chicago 2016

Page 2: Embracing the Monolith

Rise Science

Page 3: Embracing the Monolith

Rise Science

Page 4: Embracing the Monolith

Product Goals

• Sleep Improvement • User Enjoyment

Page 5: Embracing the Monolith

Iterate Fast

Young company, timeline of weeks and days.

Page 6: Embracing the Monolith

Data is core to the product

No data = 😩

Page 7: Embracing the Monolith

Development Cycle

Hypothesis

Exploration

Experiment

Productizing

Evaluate & Analyze

Page 8: Embracing the Monolith

Easy, right?

Page 9: Embracing the Monolith

😓

Page 10: Embracing the Monolith

Obstacles

Page 11: Embracing the Monolith

• Data Silos

Page 12: Embracing the Monolith

• Data Silos • Different Tooling

Page 13: Embracing the Monolith

• Data Silos • Different Tooling • People

Page 14: Embracing the Monolith

• Data Silos • Moving from phase requires different tools • People • "It works on staging"

• Testing data products is hard • Garbage in → Garbage out • Capacity problems

Page 15: Embracing the Monolith

• Data Silos • Moving from phase requires different tools • People • "It works on staging"

Extended Product Cycles

Page 16: Embracing the Monolith

How do we start?

Descriptive, visuals, basic summaries

Page 17: Embracing the Monolith

Step Back

Page 18: Embracing the Monolith

What the organization needs.

Understand problem before getting into solutions

Page 19: Embracing the Monolith

Solution First

Focus is on tech trade-off

Page 20: Embracing the Monolith

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 21: Embracing the Monolith

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 22: Embracing the Monolith

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 23: Embracing the Monolith

Business Optimality

Technical Optimality

Page 24: Embracing the Monolith
Page 25: Embracing the Monolith

What's the least I can do to solve the problem?

Page 26: Embracing the Monolith

What's the least I can do to solve the problem?

You need an architecture compatible with this mindset

Page 27: Embracing the Monolith

Monolithic Architecture

Page 28: Embracing the Monolith

© Martin Fowler: http://martinfowler.com/articles/microservices.html

A monolithic application puts all its functionality into a singles process..

... and scales by replicating the monolith

on multiple servers

Page 29: Embracing the Monolith

© Martin Fowler: http://martinfowler.com/articles/microservices.html

A microservices architecture puts each

element of functionality into a separate service..

... and scales by distributing these services across servers, replicating as

needed

Page 30: Embracing the Monolith

© Martin Fowler: http://martinfowler.com/articles/microservices.html© Martin Fowler: http://martinfowler.com/articles/microservices.html

Page 31: Embracing the Monolith

Django. The Good Things

Page 32: Embracing the Monolith

Reuse Libraries

Page 33: Embracing the Monolith

IPython Notebooks

Page 34: Embracing the Monolith

Reuse your ORM when accessing data.

Page 35: Embracing the Monolith

Pandas, django-pandas

Page 36: Embracing the Monolith

Instrumentation

Page 37: Embracing the Monolith

People

Page 38: Embracing the Monolith

The Problem of Toil

".. manual, repetitive, automatable, tactical, devoid of enduring value, and scales linearly as a service grows.."

Page 39: Embracing the Monolith

Toil-induced negative data culture

Page 40: Embracing the Monolith

Self-Serve Analytics

Page 41: Embracing the Monolith

Breaking Data Silos

Page 42: Embracing the Monolith

Why do Data Silos Happen?

person id date duration

1 2016-08-01 450

2 2016-08-01 426

1 2016-08-02 438

Row

person id date duration

1

2

1

2016-08-01

2016-08-01

2016-08-02

450

426

438

Columnar

Page 43: Embracing the Monolith

Centralizing Data

Segment.com

Backend DB

RedshiftETL

Page 44: Embracing the Monolith

Redshift is fast for aggregations

Page 45: Embracing the Monolith

Out-of-the-box compatible with Postgres

(Mostly..)

Page 46: Embracing the Monolith

Bring data to the people

Page 47: Embracing the Monolith
Page 48: Embracing the Monolith
Page 49: Embracing the Monolith

Positive Feedback Loop on Data Culture

Non tech can access data whenever Data team can focus on bigger problems and act as enablers

Page 50: Embracing the Monolith

Be scrappy.

Page 51: Embracing the Monolith

Thanks!