+ All Categories
Home > Documents > Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s...

Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s...

Date post: 16-Oct-2020
Category:
Upload: others
View: 8 times
Download: 0 times
Share this document with a friend
108
Dynamic, partially-stateful data-flow for high-performance Web applications Jon Gjengset Jonathan Behrens Lara Timbó Araújo Martin Ek Eddie Kohler M. Frans Kaashoek Robert Morris Malte Schwarzkopf Noria
Transcript
Page 1: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Dynamic, partially-stateful data-flow forhigh-performance Web applications

Jon Gjengset

Jonathan Behrens Lara Timbó Araújo Martin Ek

Eddie Kohler M. Frans Kaashoek Robert Morris

Malte Schwarzkopf

Noria

Page 2: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!2

Page 3: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend!2

Page 4: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

🌎 Frontend!2

Page 5: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

🌎 Frontend!2

Page 6: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!3

Page 7: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!3

Stories Votes

Page 8: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!4

Stories Votes

JOIN

COUNT

FILTERQuery

Page 9: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!4

Stories Votes

JOIN

COUNT

FILTERQuery

Page 10: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!4

Stories Votes

90% reads10% writes

JOIN

COUNT

FILTERQuery

Page 11: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Backend

Frontend

!4

Stories Votes

Slow reads, repeated work!

☹90% reads

10% writesJOIN

COUNT

FILTERQuery

Page 12: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!5

Stories Votes

Precomputed results

22

JOIN

COUNT

FILTERQuery

Page 13: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!5

Stories Votes

Precomputed results

22

READ

JOIN

COUNT

FILTERQuery

Page 14: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!5

Stories Votes

Precomputed results

22

READ

JOIN

COUNT

FILTERQuery

Store in base table?— manual, slow.

Page 15: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!5

Stories Votes

Precomputed results

22

READ

JOIN

COUNT

FILTERQuery

Store in base table?— manual, slow.

memcached?— complex [Facebook NSDI’13].

Page 16: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!5

Stories Votes

JOIN

COUNT

FILTER

22

Streamingdata-flow?

Store in base table?— manual, slow.

memcached?— complex [Facebook NSDI’13].

Page 17: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!6

Stories Votes

JOIN

COUNT

FILTER

22

Streamingdata-flow?

INSERT

Page 18: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!6

Stories Votes

JOIN

COUNT

FILTER

22

Streamingdata-flow?

3

Page 19: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!6

Stories Votes

JOIN

COUNT

FILTER

Materializedview

22

Streamingdata-flow?

3

Page 20: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!6

Stories Votes

JOIN

COUNT

FILTER

Materializedview

22

Fast reads. Efficient writes. Parallelizes well.

Streamingdata-flow?

3

Page 21: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!7

Stories VotesChallenges

JOIN

COUNT

FILTER

23

13

2

Page 22: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!7

Stories Votes

‣Change queries? Restart!

ChallengesState-of-the-artdata-flow systems:

JOIN

COUNT

FILTER

23

13

2

Page 23: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!7

Stories Votes

‣Change queries? Restart!

ChallengesState-of-the-artdata-flow systems:

JOIN

COUNT

FILTERSUM 4

2#

$

42

#

$

23

2

31

Page 24: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!7

Stories Votes

‣Change queries? Restart!‣Memory footprint? Grows!

ChallengesState-of-the-artdata-flow systems:

JOIN

COUNT

FILTERSUM 4

2#

$

42

#

$

23

2

31

Page 25: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories VotesNoria

Page 26: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

32

Noria

3

21

Page 27: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

32

‣Change queries? Live.

Noria

3

21

Page 28: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

32

‣Change queries? Live.

Noria

42

#

$

42

#

$

SUM

3

21

Page 29: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

32

‣Change queries? Live.‣Memory footprint? Bounded.

Noria

42

#

$

42

#

$

SUM

3

21

Page 30: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

3

‣Change queries? Live.‣Memory footprint? Bounded.

Noria

42

#

$

42

#

$

SUM

3

Page 31: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!8

Stories Votes

JOIN

COUNT

FILTER

3

‣Change queries? Live.‣Memory footprint? Bounded.‣No global coordination.

Noria

42

#

$

42

#

$

SUM

3

Page 32: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

New model: Partially-stateful data-flow

!9

Page 33: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

13

2

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Frontend

Page 34: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

13

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Frontend

Page 35: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Frontend

Page 36: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Lower memory footprint.

Frontend

Page 37: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Lower memory footprint.No need to update absent entries.

Frontend

Page 38: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!10

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow

Data-flow state is partial: entries for some keys are absent ( ).

Lower memory footprint.No need to update absent entries.Enables live data-flow changes.

Frontend

Page 39: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!11

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow: upqueries

READ

Frontend

Page 40: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!11

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow: upqueries

??? Need to fill absent entry!READ

Frontend

Page 41: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!11

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow: upqueries

??? Need to fill absent entry!READ

Solution: upquery through data-flow.• Compute missing entry from

upstream state

Frontend

Page 42: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!12

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow: upqueries

Solution: upquery through data-flow.• Compute missing entry from

upstream state • Response fills missing entry

READ

Page 43: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Frontend

!12

Stories Votes

JOIN

COUNT

FILTER

3

3

2

Partially-stateful data-flow: upqueries

Solution: upquery through data-flow.• Compute missing entry from

upstream state • Response fills missing entry

2

READ

Page 44: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!13

Start new views and operator state empty, fill via upqueries.

Partial state enables live data-flow changes

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

Page 45: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!13

#

$

SUM

#

$

Start new views and operator state empty, fill via upqueries.

Partial state enables live data-flow changes

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

Page 46: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!13

#

$

SUM

#

$

Start new views and operator state empty, fill via upqueries.

Partial state enables live data-flow changes

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

READ #

Page 47: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!13

#

$

SUM

#

$

Start new views and operator state empty, fill via upqueries.

Partial state enables live data-flow changes

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

READ #

Page 48: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!13

#

$

SUM

#

$

Start new views and operator state empty, fill via upqueries.

4

4

Partial state enables live data-flow changes

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

READ #

Page 49: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!14

#

$

SUM

#

$

4

4

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

High performance requires concurrency

Page 50: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!14

#

$

SUM

#

$

4

4

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

High performance requires concurrency

Process operators concurrently.Read from views concurrently.Process shards concurrently.

Without global coordination!

Page 51: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!14

#

$

SUM

#

$

4

4

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

High performance requires concurrency

Process operators concurrently.Read from views concurrently.Process shards concurrently.

Without global coordination!

Page 52: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!14

#

$

SUM

#

$

4

4

Stories Votes

JOIN

COUNT

FILTER

32

3

21

Frontend

High performance requires concurrency

Process operators concurrently.Read from views concurrently.Process shards concurrently.

Without global coordination!

Page 53: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!15

Page 54: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!15

1. Concurrent upqueries and forward processing — races!

Must maintain correctness under concurrency!

Page 55: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!15

1. Concurrent upqueries and forward processing — races!

Must maintain correctness under concurrency!

Page 56: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

Page 57: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

COUNT2

Page 58: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

COUNT2

Page 59: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

COUNT2

Page 60: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

COUNT2

Page 61: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

Upquery response is a snapshot of state

COUNT2

2

Page 62: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

Upquery response is a snapshot of state

COUNT2

2

includes 12

does not include33

Page 63: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Correctness under concurrency

!16

Goal: upquery restores state as if present all along.

12

Upquery response is a snapshot of state

COUNT2

2

includes 12

does not include

Solution: Maintain order of upquery response and surroundingupdates, despite lack of global coordination.

33

Page 64: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Upquery responses in total order with updates

!17

Goal: upquery restores state as if present all along.

Page 65: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Upquery responses in total order with updates

!17

Goal: upquery restores state as if present all along.

223

3

1

resulting staterespects total order

Page 66: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Upquery responses in total order with updates

!17

Goal: upquery restores state as if present all along.

223

3

1

resulting staterespects total order

232

2

1

resulting stateviolates total order

Page 67: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Upquery responses in total order with updates

!17

Goal: upquery restores state as if present all along.

223

3

1

resulting staterespects total order

232

2

1

resulting stateviolates total order

More complex cases: merged upquery responses, evictions (Paper).

Page 68: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!18

1. Concurrent upqueries and forward processing — races!

2. Update processing may require absent state

Must maintain correctness under concurrency!

Page 69: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!18

1. Concurrent upqueries and forward processing — races!

2. Update processing may require absent state

COUNT

3

2

absent

Must maintain correctness under concurrency!

Page 70: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!18

1. Concurrent upqueries and forward processing — races!

2. Update processing may require absent state

COUNT

3

2

absent

Must maintain correctness under concurrency!

Drop updates that touch absent state, future upquery repeats them.

Page 71: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

Challenges implementing partially-stateful data-flow

!18

1. Concurrent upqueries and forward processing — races!

2. Update processing may require absent state

COUNT

3

2

absent

Must maintain correctness under concurrency!

Drop updates that touch absent state, future upquery repeats them.

(see Paper)

Page 72: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

Page 73: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

Page 74: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

MySQL adapter

Page 75: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

Data-flow graph

MySQL adapter

Transform

Page 76: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

Data-flow graph

MySQL adapter

Transform

Page 77: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!19

Noria implementation

Data-flow graph

MySQL adapter

• 45k lines of Rust + 15k libraries• RocksDB for base table storage• ZooKeeper for leader election

Transform

Page 78: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

1. Can Noria improve a real web application’s performance?

2. How does Noria compare to alternative approaches?

3. Can Noria change queries without downtime?

!20

Evaluation

Page 79: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

1. Can Noria improve a real web application’s performance?

2. How does Noria compare to alternative approaches?

3. Can Noria change queries without downtime?

!20

Evaluation

Amazon EC2 c5.4xlarge instance (16 vCPUs)Open-loop clients, measuring latency & throughput

Setup

Page 80: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

1. Can Noria improve a real web application’s performance?

2. How does Noria compare to alternative approaches?

3. Can Noria change queries without downtime?

!20

Evaluation

Amazon EC2 c5.4xlarge instance (16 vCPUs)Open-loop clients, measuring latency & throughput

Setup

multi-machine experimentscomparison with differential dataflow } see Paper

Page 81: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!21

Case study: Lobsters (http://lobste.rs)

Page 82: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!21

Case study: Lobsters (http://lobste.rs)

‣Ruby-on-Rails applicationwith MySQL backend

Page 83: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!21

Case study: Lobsters (http://lobste.rs)

‣Ruby-on-Rails applicationwith MySQL backend‣Hand-optimized by

developers to pre-compute aggregations

Page 84: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!21

Case study: Lobsters (http://lobste.rs)

‣Ruby-on-Rails applicationwith MySQL backend‣Hand-optimized by

developers to pre-compute aggregations‣Noria data-flow with

235 operators, 35 views

Page 85: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!21

Case study: Lobsters (http://lobste.rs)

‣Ruby-on-Rails applicationwith MySQL backend‣Hand-optimized by

developers to pre-compute aggregations‣Noria data-flow with

235 operators, 35 views‣Emulate production load

Page 86: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!22

Can Noria improve Lobsters’ performance?

Page 87: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!22

Can Noria improve Lobsters’ performance?Be

tter

Better

Page 88: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!22

Can Noria improve Lobsters’ performance?Be

tter

Better

Page 89: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!22

Can Noria improve Lobsters’ performance?Be

tter

Better

Page 90: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!22

Noria with natural queries supports 5x MySQL’s throughput.

Can Noria improve Lobsters’ performance?Be

tter

Better

Page 91: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!23

How does Noria compare to alternatives?Be

tter

Better

Page 92: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!23

How does Noria compare to alternatives?

‣Zipf-distributed story ID,95% reads, 5% writes ‣No TX, all in-memory

Bette

r

Better

Page 93: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!23

How does Noria compare to alternatives?

‣Zipf-distributed story ID,95% reads, 5% writes ‣No TX, all in-memory

Bette

r

Better

Page 94: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!24

How does Noria compare to alternatives?Be

tter

Better

‣Zipf-distributed story ID,95% reads, 5% writes ‣No TX, all in-memory

Page 95: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!24

How does Noria compare to alternatives?Be

tter

Better

‣Zipf-distributed story ID,95% reads, 5% writes ‣No TX, all in-memory

Page 96: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!24

How does Noria compare to alternatives?

Noria outperforms an in-memory key-value store and simplifies its interface.

Bette

r

Better

‣Zipf-distributed story ID,95% reads, 5% writes ‣No TX, all in-memory

Page 97: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

32

!25

Can Noria change queries without downtime?

JOIN

COUNT

FILTER

StoriesVotes

Page 98: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

32

!25

Can Noria change queries without downtime?

JOIN

COUNT

FILTER

StoriesVotes

3 ⭐

1.5 ⭐

AVG

JOIN

COUNT

Ratings⭐⭐⭐

⭐⭐

Page 99: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!26

Can Noria change queries without downtime?Be

tter

Page 100: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!26

Can Noria change queries without downtime?

new table & query added

Bette

r

Page 101: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!26

Can Noria change queries without downtime?

new table & query added

Bette

r

Page 102: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!26

Can Noria change queries without downtime?

new table & query added

Bette

r

‣Zipf-distributed story ID, 95% reads; 2M existing votes at transition

Page 103: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!27

Can Noria change queries without downtime?Be

tter

‣Zipf-distributed story ID, 95% reads; 2M existing votes at transition‣Old view reads are live throughout

Page 104: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!27

Can Noria change queries without downtime?

instantaneous transition,no downtime for writes

Bette

r

‣Zipf-distributed story ID, 95% reads; 2M existing votes at transition‣Old view reads are live throughout

Page 105: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!27

Can Noria change queries without downtime?

instantaneous transition,no downtime for writes

80% of reads from new view proceedwithout upquery after 1 second

Bette

r

‣Zipf-distributed story ID, 95% reads; 2M existing votes at transition‣Old view reads are live throughout

Page 106: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

!27

Can Noria change queries without downtime?

instantaneous transition,no downtime for writes

80% of reads from new view proceedwithout upquery after 1 second

Noria achieves downtime-free query change with partial state.

Bette

r

‣Zipf-distributed story ID, 95% reads; 2M existing votes at transition‣Old view reads are live throughout

Page 107: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

• New partially-stateful data-flow model.

• Noria: new web application backend based on data-flow.

• Partial state saves space and allows live change.

• Supports high throughput on one or more machines.

• Open source, try it out!

!28

Noria — Summary

Page 108: Noria - Distributed Operating Systemosdi18-slides.pdf1. Can Noria improve a real web application’s performance? 2. How does Noria compare to alternative approaches? 3. Can Noria

• New partially-stateful data-flow model.

• Noria: new web application backend based on data-flow.

• Partial state saves space and allows live change.

• Supports high throughput on one or more machines.

• Open source, try it out!

!28

https://pdos.csail.mit.edu/noria

Noria — Summary

(see our demo at poster #37 today!)


Recommended