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

Making Sense of Sensors with SQL Streaming @ Ma...

Making Sense of Sensors with SQL Streaming @ Make IT 2019

We are living in a data streaming era, yet until recently it has been particularly hard to leverage existing stream processing technologies. On the one hand, because dealing with data in motion has its inherent challenges.

On the other hand, most frameworks and APIs which are allowing for stream processing are typically very hard to employ and/or operate - NOT so for KSQL, the newest kid in Apache Kafka's ecosystem. Based on a simplified version of an IoT use case this session gives a gentle introduction into KSQL - Kafka's SQL streaming engine for the masses.

Join this whirlwind tour during which we are discussing a fully-fledged streaming IoT architecture. Concretely, we are going to:

* ingest smart home energy data into Apache Kafka,
* use KSQL for flexible, powerful and scalable SQL-only stream processing,
* send raw data, as well as pre-processed results to an operational NoSQL data store,
* reactively, serve data to clients in near real-time and
* finally build informative live charts.

Note: None of the sessions were recorded here so no video link this time...

Hans-Peter Grahsl

October 14, 2019
Tweet

More Decks by Hans-Peter Grahsl

Other Decks in Programming

Transcript

  1. Making Sense of Sensors with SQL Streaming @hpgrahsl | Make

    IT Conference, 14th October 2019, Portorož, Slovenia
  2. $ whoami ✓ name: Hans-Peter Grahsl ✓ location: Graz, Austria

    what I do: ✓ technical trainer @ NETCONOMY ✓ independent consultant & engineer ✓ associate lecturer @ CAMPUS 02 ✓ irregular conference speaker @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 2
  3. "... data processing that is designed with infinite data sets

    in mind." — Tyler Akidau @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 4
  4. Streaming alleviates Pain ✓ built for data-in-motion ✓ event-centric &

    stream-oriented ✓ fast and accurate answers @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 8
  5. Apache Kafka ✓ pub / sub to event streams ✓

    (permanently) store event streams ✓ process streams in real-time ➔ horizontal scalability ➔ high fault-tolerance @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 13
  6. unleash streaming for the masses @hpgrahsl | Make IT Conference,

    14th October 2019, Portorož, Slovenia 20
  7. KSQL in a Nutshell ✓ built on top of Kafka

    Streams ✓ NO(!) coding skills required ✓ SQL only ➔ not embedded ✓ extremely low entry barrier ✓ familiar syntax & semantics ✓ concise & expressive @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 21
  8. KSQL in a Nutshell the usual suspects OOTB: ✓ projections,

    filters ✓ joins, aggregations ✓ windowing something is missing? roll your own: ✓ UDF & UDAF ✓ UDTF pending @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 22
  9. KSQL Queries ✓ per-record streaming with ms latency ✓ compiled

    into Kafka Streams apps ✓ distributed execution on KSQL servers ✓ 2 modes: interactive vs. headless @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 29
  10. KSQL Interactive Mode ✓ KSQL servers accessed via REST API

    ✓ offers ad-hoc stream analytics ✓ share streams & tables across users ✓ used for exploration and during development @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 30
  11. KSQL Headless Mode ✓ application == SQL file ✓ KSQL

    servers run streaming queries ✓ use case specific isolation ✓ "locked-down" ➡ NO REST API access ✓ used for production deployments @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 35
  12. "You think that's a database table you are querying now?"

    — Morpheus @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 45
  13. "Instead, only try to realize the truth... there is no

    database table." — Spoon Boy @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 46
  14. KSQL Wrap-Up ✓ SQL... and nothing but SQL ✓ provides

    exactly-once semantics ✓ deployable anywhere in any way ✓ no additional infrastructure ✓ use cases of any size (XS ... XXXL) ✓ scalable & fault-tolerant @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 48
  15. Your obsession tells you to do batching. I tell you

    to walk away and stream with KSQL The choice is yours folks! @hpgrahsl | Make IT Conference, 14th October 2019, Portorož, Slovenia 49
  16. reach out to me @hpgrahsl @hpgrahsl | Make IT Conference,

    14th October 2019, Portorož, Slovenia 50
  17. THANK YOU Q & A ? @hpgrahsl | Make IT

    Conference, 14th October 2019, Portorož, Slovenia 51