hug_ireland_streaming_ted_dunning
TRANSCRIPT
®© 2014 MapR Technologies 1
®
© 2014 MapR Technologies
®© 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
®© 2014 MapR Technologies 3
3-tier Architecture
Web tier
Middle tier
Data tier
®© 2014 MapR Technologies 4
3-tier Architecture (essence)
Web tier
Middle tier
Data tier
®© 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
®© 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
®© 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
®© 2014 MapR Technologies 8
RPC layer
Logic
Disk
RPC layer
Logic
Disk
RPC layer
Logic
Disk
Start with Service Partitioning
®© 2014 MapR Technologies 9
RPC layer
Logic
Disk
RPC layer
Logic
Disk
RPC layer
Logic
Disk
Start with Service Partitioning
®© 2014 MapR Technologies 10
RPC layer
Logic
Disk
RPC layer
Logic
Disk
RPC layer
Logic
Disk
Make Services Opaque
®© 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
®© 2014 MapR Technologies 12
Thisiscalledmicro-services
®© 2014 MapR Technologies 13
Amicro-serviceis
looselycoupledwithboundedcontext
®© 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
®© 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
®© 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
®© 2014 MapR Technologies 17
Whatdoesthismean?
®© 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
®© 2014 MapR Technologies 19
What is Convergence?
Files
tokyo
Streams
User profiles
Tables
®© 2014 MapR Technologies 20
Thank You!
®© 2014 MapR Technologies 21
Streaming Architecture by Ted Dunning and Ellen Friedman © 2016 (published by O’Reilly)
http://bit.ly/mapr-ebook-streams
®© 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
®© 2014 MapR Technologies 23
Q & A
@mapr maprtech
Engage with us!
MapR
maprtech
mapr-technologies
®© 2014 MapR Technologies 24
®© 2014 MapR Technologies 25
StreamingExample
®© 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
®© 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
®© 2014 MapR Technologies 28
Upload service
Image extractor
Transcoder
Video metadata
Transition to Micro-service
®© 2014 MapR Technologies 29
Micro-service Diagram
File upload web service
Rawfiles
Thumbnail extraction
Transcoding
Video metadata
Video files
uploads
thumbs
recodes
Image files
®© 2014 MapR Technologies 30
Some Omitted Details
File upload web service
Files
Thumbnail extraction
Transcoding
uploads
thumbs
recodes
Files
®© 2014 MapR Technologies 31
More Omitted details
Thumbnail extraction
uploads
thumbs
metrics
exceptions
checkpoints
Input
Output
Monitoring
Restart
®© 2014 MapR Technologies 32
Q & A
@mapr maprtech
Engage with us!
MapR
maprtech
mapr-technologies
®© 2014 MapR Technologies 33
®© 2014 MapR Technologies 34
MigrationtoStreams
®© 2014 MapR Technologies 35
Shared state
ApplicationApplication
Application
Migration from Medieval Architectures
®© 2014 MapR Technologies 36
Shared state
ApplicationApplication
Application
Migration from Medieval Architectures
®© 2014 MapR Technologies 37
Shared state
ApplicationApplication
Applicationevents
Private state
Migration from Medieval Architectures
®© 2014 MapR Technologies 38
Q & A
@mapr maprtech
Engage with us!
MapR
maprtech
mapr-technologies