Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rethinking Stream Processing with Apache Kafka: Applications vs. Clusters, Streams vs. Databases

Rethinking Stream Processing with Apache Kafka: Applications vs. Clusters, Streams vs. Databases

My talk at Strata Data Conference, London, May 2017.

https://conferences.oreilly.com/strata/strata-eu/public/schedule/detail/57619

Abstract:
Modern businesses have data at their core, but this data is changing continuously. How can you harness this torrent of information in real time? The answer: stream processing.

The core platform for streaming data is Apache Kafka, and thousands of companies are using Kafka to transform and reshape their industries, including Netflix, Uber, PayPal, Airbnb, Goldman Sachs, Cisco, and Oracle. Unfortunately, today’s common architectures for real-time data processing at scale suffer from complexity: to succeed, many technologies need to be stitched and operated together, and each individual technology is often complex by itself. This has led to a strong discrepancy between how we engineers would like to work and how we actually end up working in practice.

Michael Noll explains how Apache Kafka helps you radically simplify your data processing architectures by building normal applications to serve your real-time processing needs rather than building clusters or similar special-purpose infrastructure—while still benefiting from properties typically associated exclusively with cluster technologies, like high scalability, distributed computing, and fault tolerance. Michael also covers Kafka’s Streams API, its abstractions for streams and tables, and its recently introduced interactive queries functionality. Along the way, Michael shares common use cases that demonstrate that stream processing in practice often requires database-like functionality and how Kafka allows you to bridge the worlds of streams and databases when implementing your own core business applications (for example, in the form of event-driven, containerized microservices). As you’ll see, Kafka makes such architectures equally viable for small-, medium-, and large-scale use cases.

Michael G. Noll

May 23, 2017
Tweet

More Decks by Michael G. Noll

Other Decks in Programming

Transcript

  1. 1 Rethinking Stream Processing with Apache Kafka: Applications vs. Clusters,

    Streams vs. Databases Michael G. Noll Confluent Strata Data Conference, London, May 2017
  2. 2 0.11* Exactly-once semantics 0.10 Data processing (Streams API) 0.9

    Data integration (Connect API) Intra-cluster replication 0.8 2012 2014 2015 2016 2017 Cluster mirroring 0.7 2013 Apache Kafka: birthed as a messaging system, now a streaming platform
  3. 3

  4. 4

  5. 5

  6. 6

  7. 7

  8. 8

  9. 9 ,

  10. 11

  11. 12

  12. 13

  13. 16

  14. 18

  15. 21 KStream<Integer, Integer> input = builder.stream("numbers-topic"); // Stateless computation KStream<Integer,

    Integer> doubled = input.mapValues(v -> v * 2); // Stateful computation KTable<Integer, Integer> sumOfOdds = input .filter((k,v) -> v % 2 != 0) .selectKey((k, v) -> 1) .groupByKey() .reduce((v1, v2) -> v1 + v2, "sum-of-odds"); class PrintToConsoleProcessor implements Processor<K, V> { @Override public void init(ProcessorContext context) {} @Override void process(K key, V value) { System.out.println("Got value " + value); } @Override void punctuate(long timestamp) {} @Override void close() {} }
  16. 22

  17. 23

  18. 25

  19. 26

  20. 27

  21. 28

  22. 29

  23. 31

  24. 32

  25. 33

  26. 34

  27. 35

  28. 36

  29. 37

  30. 38

  31. 39

  32. 40

  33. 41

  34. 43

  35. 44

  36. 46

  37. 47 2016 2017 First release of Kafka’s Streams API (0.10.0.0)

    today Kafka Streams API in the wild Kafka 0.10.2.1 In production at LINE Corp., Japan 220+ million active users, processing millions of msg/s “Applying Kafka Streams for internal message delivery pipeline” https://engineering.linecorp.com/en/blog/detail/80
  38. 48

  39. 49

  40. 51

  41. 52

  42. 54

  43. 55

  44. 56

  45. 57

  46. 58

  47. 59

  48. 60

  49. 61 $ curl -sXGET http://localhost:7070/kafka-music/charts/top-five [ { "artist": "Subhumans", "album":

    "Live In A Dive", "name": "All Gone Dead", "plays": 126 }, { "artist": "Wheres The Pope?", "album": "PSI", "name": "Fear Of God", "plays": 115 }, ... ]
  50. 63

  51. 64

  52. 65

  53. 67 Kafka Summit San Francisco August 28, 2017 www.kafka-summit.org Discount

    code: kafcom17 Use the Apache Kafka community discount code to get $50 off Presented by Questions? We’re at booth #317 in the Exhibition Hall.