Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apache Flink's Approach to It

490 views

Published on

Stream Processing is emerging as a popular paradigm for data processing architectures, because it handles the continuous nature of most data and computation and gets rid of artificial boundaries and delays.

The fact that stream processing is gaining rapid adoption is also due to more powerful and maturing technology (much of it open source at the ASF) that has solved many of the hard technical challenges.

We discuss Apache Flink's approach to high performance stream processing with state, strong consistency, low latency, and sophisticated handling of time. With such building blocks, Apache Flink can handle classes of problems previously considered out of reach for stream processing. We also take a sneak preview at the next steps for Flink.

Published in: Data & Analytics
  • Be the first to comment

Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apache Flink's Approach to It

  1. 1. Stream Processing as a Foundational Paradigm and Apache Flink's approach to it Stephan Ewen, Apache Flink PMC, CTO @ data Artisans
  2. 2. Streaming technology is enabling the obvious: continuous processing on data that is continuously produced Hint: you already have streaming data 4
  3. 3. Streaming Subsumes Batch 5 2016-3-1 12:00 am 2016-3-1 1:00 am 2016-3-1 2:00 am 2016-3-11 11:00pm 2016-3-12 12:00am 2016-3-12 1:00am 2016-3-11 10:00pm 2016-3-12 2:00am 2016-3-12 3:00am… partition partition
  4. 4. Streaming Subsumes Batch 6 2016-3-1 12:00 am 2016-3-1 1:00 am 2016-3-1 2:00 am 2016-3-11 11:00pm 2016-3-12 12:00am 2016-3-12 1:00am 2016-3-11 10:00pm 2016-3-12 2:00am 2016-3-12 3:00am… partition partition Stream (low latency) Stream (high latency)
  5. 5. Streaming Subsumes Batch 7 2016-3-1 12:00 am 2016-3-1 1:00 am 2016-3-1 2:00 am 2016-3-11 11:00pm 2016-3-12 12:00am 2016-3-12 1:00am 2016-3-11 10:00pm 2016-3-12 2:00am 2016-3-12 3:00am… partition partition Stream (low latency) Batch (bounded stream) Stream (high latency)
  6. 6. Stream Processing Decouples 8 Database (State) App a App b App c App a App b App c Applications build their own stateState managed centralized
  7. 7. Time Travel 9 Process a period of historic data partition partition Process latest data with low latency (tail of the log) Reprocess stream (historic data first, catches up with realtime data)
  8. 8. 10 But why has it started so recently? Stream Processing is taking off. (just look at this year's talks)
  9. 9. 11 Latency Volume/ Throughput State & Accuracy The combination is what makes steaming powerful Only recently available together
  10. 10. 12 Latency Volume/ Throughput State & Accuracy Exactly-once semantics Event time processing 10s of millions evts/sec for stateful applications Latency down to the milliseconds Apache Flink was the first open-source system to eliminate these tradeoffs
  11. 11. Flink's Approach 13 Stateful Steam Processing Fluent API, Windows, Event Time Table API Stream SQL Core API Declarative DSL High-level Language Building Block
  12. 12. Stateful Steam Processing 14 Source Filter / Transform State read/write Sink
  13. 13. Stateful Steam Processing 15 Scalable embedded state Access at memory speed & scales with parallel operators
  14. 14. Stateful Steam Processing 16 Re-load state Reset positions in input streams Rolling back computation Re-processing
  15. 15. Stateful Steam Processing 17 Restore to different programs Bugfixes, Upgrades, A/B testing, etc
  16. 16. Versioning the state of applications 18 Savepoint Savepoint Savepoint App. A App. B App. C Time Savepoint
  17. 17. Flink's Approach 19 Stateful Steam Processing Fluent API, Windows, Event Time Table API Stream SQL Core API Declarative DSL High-level Language Building Block
  18. 18. Event Time / Out-of-Order 20 1977 1980 1983 1999 2002 2005 2015 Processing Time Episode IV Episode V Episode VI Episode I Episode II Episode III Episode VII Event Time
  19. 19. (Stream) SQL & Table API 21 Table API // convert stream into Table val sensorTable: Table = sensorData .toTable(tableEnv, 'location, 'time, 'tempF) // define query on Table val avgTempCTable: Table = sensorTable .groupBy('location) .window(Tumble over 1.days on 'rowtime as 'w) .select('w.start as 'day, 'location, (('tempF.avg - 32) * 0.556) as 'avgTempC) .where('location like "room%") SQL sensorTable.sql(""" SELECT day, location, avg((tempF - 32) * 0.556) AS avgTempC FROM sensorData WHERE location LIKE 'room%' GROUP BY day, location """)
  20. 20. What can you do with that? 22 10 billion events (2TB) processed daily across multiple Flink jobs for the telco network control center. Ad-hoc realtime queries, > 30 operators, processing 30 billion events daily, maintaining state of 100s of GB inside Flink with exactly-once guarantees Jobs with > 20 operators, runs on > 5000 vCores in 1000-node cluster, processes millions of events per second
  21. 21. Flink's Streams playing at Batch 23 TeraSort Relational Join Classic Batch Jobs Graph Processing Linear Algebra
  22. 22. 24 Streaming Technology is already awesome, but what are the next steps? A.k.a, what can we expect in the "next gen" ? A lot of things are "next gen" when looking at the program, so here is my take on it…
  23. 23. "Next Gen" 25 Queryable State
  24. 24. "Next Gen" 26 Elastic Parallelism Maintaining exactly-once state consistency No extra effort for the user No need to carefully plan partitions
  25. 25. "Next Gen" 27 Terabytes of state inside the stream processor Maintaining fast checkpoints and recovery E.g., long histories of windows, large join tables State at local memory speed
  26. 26. "Next Gen" 28 Full SQL on Streams Continuous queries, incremental results Windows, event time, processing time Consistent with SQL on bounded data
  27. 27. 29 Thank you!
  28. 28. Appendix 30
  29. 29. 31
  30. 30. We are hiring! data-artisans.com/careers

×