simple software is hard...don't give up!

46
Simple Software is Hard Tales from the Trenches Bertrand Delacrétaz @bdelacretaz, grep.codeconsult.ch Principal Scientist, CQ/AEM R&D group, Adobe Basel Apache Software Foundation Member and Director November 2014 slides revision 2014-11-14

Upload: bertrand-delacretaz

Post on 22-Jan-2018

81 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Simple software is hard...don't give up!

Simple Software is Hard Tales from the Trenches

Bertrand Delacrétaz@bdelacretaz, grep.codeconsult.ch

Principal Scientist, CQ/AEM R&D group, Adobe BaselApache Software Foundation Member and Director

November 2014slides revision 2014-11-14

Page 2: Simple software is hard...don't give up!

looking for answers? wrong place! I’m more about questions today…

Page 3: Simple software is hard...don't give up!

picture: dhester on morguefile.com

could we invent this today?

Page 4: Simple software is hard...don't give up!

beautiful simplicityas simple as possible, but not simpler

(to be precise, it’s a Victorinox skipper knife)

Page 5: Simple software is hard...don't give up!

astory

of simplicity

(two stories, actually)

Page 6: Simple software is hard...don't give up!

s = UDP socket While(s is open) { Wait for packet Packet matches our filter? If not -> continue If yes: Compute storage path from T Append packet to storage file }

26 lines of code 3 months of

work (happily chugging along since 1999)

Page 7: Simple software is hard...don't give up!

record digital audio

continuously cannot lose morethan 15 seconds

(remember - 1999)

Page 8: Simple software is hard...don't give up!

options?BigCo#1 BigCo#2

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

Page 9: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

N-dimensional maze

pict

ure:

psc

hube

rt on

mor

guefi

le.c

om

Page 10: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

and

yk o

n m

orgu

efile

.com

5127 prototypes

Page 11: Simple software is hard...don't give up!

overnight? no - 8 years

WIRED April 2011

Page 12: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

N-dimensional maze

pict

ure:

psc

hube

rt on

mor

guefi

le.c

om

Page 13: Simple software is hard...don't give up!

that’s your options…BigCo#1 BigCo#2

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

Page 14: Simple software is hard...don't give up!

simpler?

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

Page 15: Simple software is hard...don't give up!

yes!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

RTPpacket

recorder

Page 16: Simple software is hard...don't give up!

26 lines of code3 months

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

RTPpacket

recorders = UDP socket While(s is open) { Wait for packet Packet matches our filter? If not -> continue If yes: Compute storage path from T Append packet to storage file }

Page 17: Simple software is hard...don't give up!

if it’s not simple enough yet

do not give up

Page 18: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

RTPpacket

recorder

storage?

Page 19: Simple software is hard...don't give up!

RTPpacket

recorder

storage?

continuous storage seek by timestamp

variable speed replay 100% robust

Page 20: Simple software is hard...don't give up!

enterprise DB!

pict

ure:

jusb

en o

n m

orgu

efile

.com

Page 21: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

psc

hube

rt on

mor

guefi

le.c

om

N-dimensional maze

Page 22: Simple software is hard...don't give up!

RTPpacket

recorder

2014/06/25/1402.rtp

chronological hierarchy oftimestamp-addressed files

stores 15 seconds of RTP packetsunbreakable

storage!

Page 23: Simple software is hard...don't give up!

pict

ure:

Rog

anJo

sh o

n m

orgu

efile

.com

pict

ure:

MrM

agic

on

mor

guefi

le.c

om

RTPpacket

recorder

storage

2014/06/25/1402.rtp

continuous recording continuous storage seek by timestamp

variable speed replay

s = UDP socket While(s is open) { Wait for packet Packet matches our filter? If not -> continue If yes: Compute storage path from T Append packet to storage file }

Page 24: Simple software is hard...don't give up!

beautiful simplicityas simple as possible, but not simpler

Page 25: Simple software is hard...don't give up!

A powerful metaphor

cat sortgrep awk stdout

stderr

pipeline metaphor simple modules

simple assembly model transparent, robust, powerful

Page 26: Simple software is hard...don't give up!

A simple universe

“There are just three abstractions in Apache Storm: spouts, bolts, and topologies.”

Picture from Apache Storm: distributed stream processing

Page 27: Simple software is hard...don't give up!

A simple modelpicture from http://de.wikipedia.org/wiki/MapReduce

Page 28: Simple software is hard...don't give up!

Sling Health Checks

Page 29: Simple software is hard...don't give up!

do not reinvent the metaphor!

what does my problem look like?

Page 30: Simple software is hard...don't give up!

ok, but

high-end CMS?

Page 31: Simple software is hard...don't give up!

HTTP request

CC

CC

CCCC

C

processor

dispatcher

it’s just aWebserver…

Page 32: Simple software is hard...don't give up!

HTTP 0.9 (start simple)

GET /hello.txt

<html>hello!</html>

client server

Page 33: Simple software is hard...don't give up!

HTTP requests

CC

CC

CCCC

C

dispatcher

even if itgets busy…

processorprocessor

processor

processor

processorprocessor

processor

processor

processor

Page 34: Simple software is hard...don't give up!

inspired by nature…multiple workers with specific roles

pict

ure:

kak

isky

on

mor

guefi

le.c

om

Page 35: Simple software is hard...don't give up!

so,

how?

Page 36: Simple software is hard...don't give up!

put the bar

highdo not accept extra complexity

Page 37: Simple software is hard...don't give up!

investin simplicity

can be expensive…and worth it

Page 38: Simple software is hard...don't give up!

chase the right

metaphor“a network packets recorder and player”

Page 39: Simple software is hard...don't give up!

simplicity is a

processyou usually know when you’re there

Page 40: Simple software is hard...don't give up!

beautiful simplicityas simple as possible, but not simpler

Page 41: Simple software is hard...don't give up!

what are the

enablers?

Page 42: Simple software is hard...don't give up!

modularityenablers

Page 43: Simple software is hard...don't give up!

opendevelopmen

tenablers

Page 44: Simple software is hard...don't give up!

JCR’s big tree with low couplingpromotes “local” simplicty

enablers

Page 45: Simple software is hard...don't give up!

Apache Slingenablers

Page 46: Simple software is hard...don't give up!

not simple enough?

don’t give up!

BTW...we are hiring!