embracing the monolith in small teams: doubling down on python to move fast without breaking things

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

Upload: pydata

Post on 16-Apr-2017

279 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

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 in Small Teams: Doubling down on python to move fast without breaking things

Rise Science

Page 3: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Rise Science

Page 4: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Product Goals

• Sleep Improvement • User Enjoyment

Page 5: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Iterate Fast

Young company, timeline of weeks and days.

Page 6: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Data is core to the product

No data = 😩

Page 7: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Development Cycle

Hypothesis

Exploration

Experiment

Productizing

Evaluate & Analyze

Page 8: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Easy, right?

Page 9: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

😓

Page 10: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Obstacles

Page 11: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

• Data Silos

Page 12: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

• Data Silos • Different Tooling

Page 13: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

• Data Silos • Different Tooling • People

Page 14: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

• 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 in Small Teams: Doubling down on python to move fast without breaking things

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

Extended Product Cycles

Page 16: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

How do we start?

Descriptive, visuals, basic summaries

Page 17: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Step Back

Page 18: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

What the organization needs.

Understand problem before getting into solutions

Page 19: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Solution First

Focus is on tech trade-off

Page 20: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 21: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 22: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Solution First

Focus is on tech trade-off

Problem First

Focus is on making progress for the org

vs.

Page 23: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Business Optimality

Technical Optimality

Page 24: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things
Page 25: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

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

Page 26: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

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

You need an architecture compatible with this mindset

Page 27: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Monolithic Architecture

Page 28: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

© 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 in Small Teams: Doubling down on python to move fast without breaking things

© 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 in Small Teams: Doubling down on python to move fast without breaking things

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

Page 31: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Django. The Good Things

Page 32: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Reuse Libraries

Page 33: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

IPython Notebooks

Page 34: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Reuse your ORM when accessing data.

Page 35: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Pandas, django-pandas

Page 36: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Instrumentation

Page 37: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

People

Page 38: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

The Problem of Toil

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

Page 39: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Toil-induced negative data culture

Page 40: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Self-Serve Analytics

Page 41: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Breaking Data Silos

Page 42: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

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 in Small Teams: Doubling down on python to move fast without breaking things

Centralizing Data

Segment.com

Backend DB

RedshiftETL

Page 44: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Redshift is fast for aggregations

Page 45: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Out-of-the-box compatible with Postgres

(Mostly..)

Page 46: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Bring data to the people

Page 47: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things
Page 48: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things
Page 49: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

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 in Small Teams: Doubling down on python to move fast without breaking things

Be scrappy.

Page 51: Embracing the Monolith in Small Teams: Doubling down on python to move fast without breaking things

Thanks!