Top Banner
Kappa Architecture: IoT of the cars Juantomás García
23

Librecon 2016 bilbao: kappa architecture IoT of the cars

Apr 13, 2017

Download

Data & Analytics

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Kappa Architecture: IoT of the cars

Juantomás García

Page 2: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Who am I• Data Solutions Manager at Open Sistemas

• Co-author of the first spanish book about free software “La pastilla roja”

• Former president of Hispalinux (Spanish Linux User Group).

• Co-organizer of Machine Learning Spain Meetup

Page 3: Librecon 2016 bilbao:   kappa architecture IoT of the cars

What’s Kappa ArchitectureJuly 2, 2014 Jay Kreps coined the term Kappa Architecture in an article for O’reilly Radar

Page 4: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Who is Jay KrepsJay has been involved in lots of projects:

Author of the essay:

The Log: What every software engineer should know about real-time data's unifying abstraction (12/16/2013)

https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying

Page 5: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Who is Jay KrepsAuthor of the book: I ♥ Logs

Page 6: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Who is Jay KrepsInvolved with projects as:

Apache Kafka

Apache Samza

Voldemort

Azkaban

Ex-Linkedin

Now co-founder and CEO of Confluent

Page 7: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Usual data flow

Page 8: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Kappa Architecture Way

Page 9: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Tools we use to implement Kappa Architecture

Page 10: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Tools we use to implement Kappa Architecture

Page 11: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Tools we use to implement Kappa Architecture

• Our favorite kafka features.

• Easy to use

• Robust & Resilient

• Kafka connectors

• Kafka streams

• Compact logs

• Very fast writes and reads

Page 12: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Tools we use to implement Kappa Architecture

Page 13: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Some favorite Spark features • If you have an schema spark SQL is

perfect.

• Spark streaming work very fine with spark and almost all streaming sources.

• Structured queries will be a huge advance.

• We love scala and scala is the spirit of spark.

Page 14: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Some favorite Spark features • We love code like this:

Page 15: Librecon 2016 bilbao:   kappa architecture IoT of the cars

A real case• One of our clients want to monitor all the

cars informations via OBD II

• OBD II is a car interface with the car electronics.

• Client develop an app to read all the car information throw a ODB II with bluetooth

Page 16: Librecon 2016 bilbao:   kappa architecture IoT of the cars

A real case

Page 17: Librecon 2016 bilbao:   kappa architecture IoT of the cars

First Problems• We need to scale the rest interfaces too

many requests.

• MySQL don’t scale

• Client wants to make realtime expensive queries.

Page 18: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Some Numbers

Page 19: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Architecture V2

Page 20: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Architecture KappaV3

Page 21: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Now we’re more flexible• We can have queries like:

• What are the drivers that are not client of the X gas brand, has a few gas and are near of gas station of the brand X and if true, send a notification with a discount coupon and a link with the route.

Page 22: Librecon 2016 bilbao:   kappa architecture IoT of the cars

Takeaways• Kappa architecture is not a silver bullet but

helps in a lot of solutions.

• Kafka + spark streaming is our favorite tools

• There a lots of improvements:

• OLAP like Apache Druid

• Graph databases like neo4j

• Kafka streams and compacts logs

Page 23: Librecon 2016 bilbao:   kappa architecture IoT of the cars

¿Questions?• My contact info:

• Juantomás García

[email protected]

• @juantomas