hug_ireland_streaming_ted_dunning

38
© 2014 MapR Technologies 1 ® © 2014 MapR Technologies

Upload: john-mulhall

Post on 19-Jan-2017

110 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 1

®

© 2014 MapR Technologies

Page 2: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 2

Evolution Beyond Massive Monolithic Systems •  In monoliths, complexity of mainframe systems led to

specialization –  Storage –  DB –  Systems analysis –  Programmers –  Operations –  Data entry

•  This made n-tier architectures a natural next step

Page 3: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 3

3-tier Architecture

Web tier

Middle tier

Data tier

Page 4: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 4

3-tier Architecture (essence)

Web tier

Middle tier

Data tier

Page 5: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 5

3-tier, in Practice, Multiple Monoliths

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Page 6: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 6

3-tier, in Practice, Multiple Monoliths

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Web tier

Middle tier

Data tier

Page 7: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 7

Summary 1 •  Tiering leads to tic-tac-toe architectures

•  ESB leads to control-heavy balls of string –  Better than balls of mud, but only just barely –  Massive amounts of coupling via shared schemas, brittle protocols

•  ESB inverts implementation hiding

•  This isn’t the answer

Page 8: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 8

RPC layer

Logic

Disk

RPC layer

Logic

Disk

RPC layer

Logic

Disk

Start with Service Partitioning

Page 9: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 9

RPC layer

Logic

Disk

RPC layer

Logic

Disk

RPC layer

Logic

Disk

Start with Service Partitioning

Page 10: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 10

RPC layer

Logic

Disk

RPC layer

Logic

Disk

RPC layer

Logic

Disk

Make Services Opaque

Page 11: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 11

Give Them a Job, and a Way to Communicate

Keep it very light-weight!

Coupling minimized by not knowing details

Flexible protocols are required

Page 12: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 12

Thisiscalledmicro-services

Page 13: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 13

Amicro-serviceis

looselycoupledwithboundedcontext

Page 14: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 14

But … •  Much of the discussion talks about RPC (call/response) services

•  This fine, but limiting

•  Key idiom is deferred processing –  Do something urgently –  Queue message to complete later

Page 15: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 15

For Message Based Services •  The message receiver may not even be running right now

–  Required by decoupling goal –  So we need a persistent queue

•  The number of messages is plausibly very high –  Total number of external requests (x 5-10) –  Total number of persistence ops (x 2-3)

•  Millions of messages, GB/s of traffic quite plausible •  Moving this to enterprise from startups adds challenges

Page 16: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 16

Summary 2 •  Micro-services requires durable, high-performance message

queues

•  These systems don’t just like durable, high performance queues •  These systems require durability. And high performance.

•  Old school queues need not apply

Page 17: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 17

Whatdoesthismean?

Page 18: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 18

Real World Implications •  Messaging must be durable and infrastructural

–  Can’t depend on sender or receiver actually running

•  Messages aren’t great for everything –  1TB message?

•  We need (scalable) files •  We need (scalable) tables •  We need (scalable) streams •  We still should isolate persistence if possible

Page 19: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 19

What is Convergence?

Files

tokyo

Streams

User profiles

Tables

Page 20: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 20

Thank You!

Page 21: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 21

Streaming Architecture by Ted Dunning and Ellen Friedman © 2016 (published by O’Reilly)

http://bit.ly/mapr-ebook-streams

Page 22: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 22

Short Books by Ted Dunning & Ellen Friedman •  Published by O’Reilly in 2014 - 2016 •  For sale from Amazon or O’Reilly •  Free e-books currently available courtesy of MapR

http://bit.ly/ebook-real-world-hadoop

http://bit.ly/mapr-tsdb-ebook

http://bit.ly/ebook-anomaly

http://bit.ly/recommendation-ebook

Page 23: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 23

Q & A

@mapr maprtech

[email protected]

Engage with us!

MapR

maprtech

mapr-technologies

Page 24: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 24

Page 25: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 25

StreamingExample

Page 26: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 26

mySQLmySQL

filesWeb-site

Auth service

Upload service

Image extractor

Transcoder

User profiles

Search

User actionlogging

Recommendationanalysis

mySQLmySQL

mySQL

Oracle

Solr

Elastic

Page 27: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 27

mySQLmySQL

filesWeb-site

Auth service

Upload service

Image extractor

Transcoder

User profiles

Search

User actionlogging

Recommendationanalysis

mySQLmySQL

mySQL

Oracle

Solr

Elastic

Page 28: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 28

Upload service

Image extractor

Transcoder

Video metadata

Transition to Micro-service

Page 29: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 29

Micro-service Diagram

File upload web service

Rawfiles

Thumbnail extraction

Transcoding

Video metadata

Video files

uploads

thumbs

recodes

Image files

Page 30: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 30

Some Omitted Details

File upload web service

Files

Thumbnail extraction

Transcoding

uploads

thumbs

recodes

Files

Page 31: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 31

More Omitted details

Thumbnail extraction

uploads

thumbs

metrics

exceptions

checkpoints

Input

Output

Monitoring

Restart

Page 32: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 32

Q & A

@mapr maprtech

[email protected]

Engage with us!

MapR

maprtech

mapr-technologies

Page 33: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 33

Page 34: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 34

MigrationtoStreams

Page 35: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 35

Shared state

ApplicationApplication

Application

Migration from Medieval Architectures

Page 36: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 36

Shared state

ApplicationApplication

Application

Migration from Medieval Architectures

Page 37: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 37

Shared state

ApplicationApplication

Applicationevents

Private state

Migration from Medieval Architectures

Page 38: HUG_Ireland_Streaming_Ted_Dunning

®© 2014 MapR Technologies 38

Q & A

@mapr maprtech

[email protected]

Engage with us!

MapR

maprtech

mapr-technologies