Fungus on White Bread

22
Fungus on White Bread Ashok Banerjee

description

 

Transcript of Fungus on White Bread

Page 1: Fungus on White Bread

Fungus on White Bread

Ashok Banerjee

Page 2: Fungus on White Bread

Explain Exponential

• Double life– Constant time double

dy = kydx

• Half Life– Constant time halving

1 2 3 4 50

20

40

60

80

100

120

140

160

Series1

1 2 3 4 5 6 70

20

40

60

80

100

120

Series1

Page 3: Fungus on White Bread

Word of Mouth & Exponential Growth

• Word of Mouth Driven Model dC = k1.C.f.k2 – k1

’.C.f.k2’

dT C = C0 e^(k1.f.k2 – k1

’.f.k2’)

• Net Promoter Score = (k1 – k1’) [Not =

Exponent]

Page 4: Fungus on White Bread

Exponential Growth

1 2 3 4 50

20

40

60

80

100

120

140

160

Series1

C = C0 e^(k1.f.k2 – k1’.f.k2

’)

What if non-exponential?

1. NPS = 0 ?2. k2

’ >> k2 ?

3. f=01. Lonely people2. Ashamed to share

4. Society1. findia > fuk

2. fcollege > fprofessional

3. Fwomen > fmen

Page 5: Fungus on White Bread

Facebook, Foursquare vs Twitter

• Facebook, Foursquare: Word or Mouth dC = k1.C.f.k2

dT• Kfacebook > kfoursquare

1 2 3 4 50

20

40

60

80

100

120

140

160

Series1

Page 6: Fungus on White Bread

Twitter

• Celebrity Interest Model dC = k(Celebrity) => C = KT [Linear Growth] dT• Revolution: Word of Mouth, followed by

exponential decay [ C0e^(-kt) ]• Force exponential on celebs (Difficult)• Half Life of Topic– Religion, Politics: Long half life– Calamity of scale: Long half life

Page 7: Fungus on White Bread

Model Fertility

• Trick look for phenomenon where rate is proportionate to the base

• Rabbits/Revolutionaries: dR = kR => R = R0 e^(kt)

dT• Same as Flipkart Customers• Orders is a scale of Customers, usually all needs

of a category from a customer go to 1 shop.

Page 8: Fungus on White Bread

Bacteria, Fungus, Mosquitos

• Bacteria in your mouth: dB = kB => B = B0 e^(kt) [Listerine will time shift

dT this curve]– Morning After smell is the integral– exponential – Listerine will time shift but not change k if you rinse

• Fungus growing on your bread• Mosquitos or Dust allergens with height:dM = -kM => M = M0 e^(-kh)

dh

Page 9: Fungus on White Bread

Infatuation

• 100 slices of infatuation

• New Hottie takes randomly slice

• dI = -kI • Dt• Sadness, Memory

decays exponentially

1 2 3 4 5 6 70

20

40

60

80

100

120

Series1

Page 10: Fungus on White Bread

Really Flipkart is Exponential?

Weekly Stats

Monthly Stats

Page 11: Fungus on White Bread

Consequence of a delay/Pressure

1 2 3 4 50

20

40

60

80

100

120

140

160

Series1Series2

Run rate over time is the gap between the 2 curves

Delta = ekt – ek(t –delay) = ekt [ 1 – e-delay]

If delay is constant = The gap is growing exponentially

Total financial loss = Area between the curves

Integrate and even this is exponential

Every 3 months if things double:

1 hour delay now = 16 hours a year later = 2 full days a year laterYou will never catch up the delayThe bacteria in your mouth never catch up the ListerineEffect!!

Page 12: Fungus on White Bread

Curse of Exponential Curves– Operations will grow exponentially

• Customer Support• Warehouse• Procurement• Logistics (may get second order effect of density)

– Dev Ops load will grow exponential • Databases• boxes/processes• Design the systems to be logarithmic• Self similar (love Hadoop)

– Cannot hire exponentially even if you wish to– Technology needs to do something on Cost and Operations to

spend non-exponentially

Page 13: Fungus on White Bread

Database Scaling

• Reads/Writes (# per request)• Buffering of writes • Write unstructured, Read/Filter structured• Dictionary • Workflows and State Transitions– Batch Transitions• Buffered Writes • Async Writes• Idempotent Skips

Page 14: Fungus on White Bread

Database Scaling (OLTP)

• SOA (DB partitioned by Domain, SSO, Messaging, 2pc)

• Archive (Time window only in OLTP)• Sharding – Query Decomposition, Parallel Execution,Result Recomposition

• NoSQL fine if Lookups/Range Queries • Pre-Rollup and Staleness + Overlay counter• Hadoop (OLAP)

Page 15: Fungus on White Bread

Message Bus Scaling

• Messaging on DB – Fragmentation– Insert/Select/Delete profile

• Sharding (File system, distributed, SSD)– Message Groups and Ordering (Partition or Replica)– Distributed Queues

• Node Failures, Recovery, Split Brain

– Sidelining of Messages – Can files act as queues?– Does system need to be transactional?

• Anomaly Detection and Idempotent• Delayed ack

Page 16: Fungus on White Bread

Cache Scaling

• Distributed HashTables• Consistent Hashing• Memory Mapping (Page Cache vs Row Cache)

Page 17: Fungus on White Bread

NoSQL

• Compressed objects (Memory vs CPU)– Secret of Dremel (LZO77)

• SIMD (Block Oriented Computing)• Disk Striping, compressed data • HDFS: File Triplicate• Hadoop: Job Scheduler (Fault Tolerance)

Page 18: Fungus on White Bread

Management

• As Organization doubles, the 1 pizza table communication changes to 2 tables, to 4 tables

• Communication distance (Communication needs grow combinatorially)

• Hallway chatters need move to– Structured 1-1s– Group Meetings– Emails (therefore the good/bad/ugly)– Management by 1-1s => Management by walking about,

office hours

Page 19: Fungus on White Bread

When does exponential end

• Disease Modelling [Coursera: Model Thinking]• dw = cK (w)(N-w) – r (w) = (w) [cK – r]• Dt N N N N

ck– r> 0, cK/r>1] Vaccinate = vR, immunize against competitorMeasles, Mumps

Page 20: Fungus on White Bread

Q&A

e e e e e e e e e e e e e e e e ee e

Page 21: Fungus on White Bread

Exponential World After All• It’s a small world after all. Walt Disney lied• Exponential growth

– From rabbits to revolutions– From bacteria in your mouth to fungus on white bread– To the growth of Facebook to a Flipkart– To the number of Databases to the # of pages– To the chain reaction of an atom bomb

• Exponential Decay– To the decay of your infatuation– To the decay of your sadness and bereavement– To the bites of mosquitos on your body with height– To the # of allergens in atmosphere– To the decay of radioactive material

Page 22: Fungus on White Bread

Exponential World After All

• To Flipkart’s revenue• To Flipkart’s costs• To Flipkart’s staffing in Ops and Dev Ops• To the cost of a delay by 1 hour today being

the same as 2 days 1 year later• Optimize, Analyze, Criticize, Visualize, Just

open your eyes