SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
Real-Time
Analytics
mit Spark
und Cassandra
WidasConcepts Unternehmensberatung GmbH Ÿ Maybachstraße 2 Ÿ 71299 Wimsheim Ÿ http://www.widas.de
im März 2015
OSBI – Workshop
http://www.osbi-workshop.de/
REAL-TIME
ANALYTICS?
3
© WidasConcepts
Real-Time Analytics?
4
© WidasConcepts
Real-Time Analytics mit Spark und Cassandra
CASSANDRA
6
© WidasConcepts
Cassandra
Vorteile Cassandra: massiv skalierbare verteilte Datenbank
CAP frei einstellbar, für Analytics: AP
Shared Nothing, Peer to Peer
KKV – Wide Columnar/Partitions
Zeitreihen optimierte Datenmodelle
In Memory Tabellen
Daten-Lokalität mit Wide Partitions
1
2
3
4
5
6
7
© WidasConcepts
Cassandra – Ring Struktur
Jeder Knoten in Cassandra ist äquivalent ansprechbar
Konfigurierbare Replikation (lokal, DC-weise)
1
2
34
5
Client
8
© WidasConcepts
  „Can‘t Fail, Must Scale“ –System
  Datenreplikation sichert Verfügbarkeit
  Knotenausfall wird automatisch
behandelt
Verfügbarkeit
1
2
34
5
Client
9
© WidasConcepts
Skalierbarkeit Cassandra im Vergleich
Quelle: Planet Cassandra
Anzahl Operationen (Read/Write) pro Sec – Anzahl Knoten
SPARK
11
© WidasConcepts
Spark
Kernelemente
Verarbeitung im DAG (Directed Acyclic Graph)
Resilent Distributed Datasets
Scala
lokale JVM Prozesse auf den Knoten
parallele Transformationen/Aktionen auf RDDs
Operationen: map, filter, groupBy …
Aktionen: count, collect, save …
1
2
3
4
5
6
12
© WidasConcepts
Spark - RDD
Resilent Distributed Datasets
immutable
partitioned
logical collection of records
rebuildable
materialized in memory
cached for future reuse
1
2
3
4
5
6
13
© WidasConcepts
Spark – RDD – Transformationen und Aktionen (parallel)
Transformationen
map
filter
groupByKey
join
…
Aktionen
reduce
collect
count
lookupKey
…
14
© WidasConcepts
Spark – RDD – Resilent
Resilent Distributed Datasets
speichern ihre Herkunft (Lineage)
damit kann jederzeit bei Ausfall
die entsprechende Partition der RDD neu aufgebaut werden
HdfsRDD
path: hdfs://…
FilteredRDD
func:
contains(...)
MappedRDD
func: split(…)
CachedRDD
15
© WidasConcepts
Spark Performanz im Vergleich
Logistic Regression
127	
  s	
  /	
  iteration	
  
first	
  iteration	
  174	
  s	
  
further	
  iterations	
  6	
  s	
  
Quelle: University of California, Berkeley
16
© WidasConcepts
Spark Stack
Spark	
  
Spark	
  
Streaming	
  
real-­‐time	
  
	
  
	
  
	
  
Verarbeitung	
  
von	
  Daten	
  in	
  
“micro”	
  
Batches	
  
Spark	
  
SQL	
  
	
  
	
  
	
  
	
  
	
  
HiveQL	
  
kompatibel	
  
MLLib	
  
machine	
  
learning	
  
	
  
	
  
	
  
Classification	
  
Clustering	
  
Regressing	
  
col.	
  Filtering	
  
	
  
GraphX	
  
	
  
	
  
	
  
spez.	
  RDDs	
  
Operationen	
  
PageRank	
  
SVD++	
  
Integration
Spark &
Cassandra
18
© WidasConcepts
Integration – Spark & Cassandra
mit Spark-Cassandra Connector
Cassandra Tabellen sind als RDDs verfügbar
auf jedem Cassandra Knoten wird ein Spark Executor eingesetzt
1
2
34
5
19
© WidasConcepts
Vorteile der Integration zwischen Spark und Cassandra
Daten Lokalität, Token-Aware
Spark RDDs auf In Memory C* Tabellen
SQL auf Cassandra (Joins!)
Datenbank-basierte Filter in Spark
Spark Streaming wird unterstützt
Beide Richtungen: Read and Write
1
2
3
4
5
6
Spark
Streaming
21
© WidasConcepts
Spark Streaming
Spark	
  
Spark	
  
Streaming	
  
Batches	
  
Datenstrom	
  
Ergebnisse	
  
22
© WidasConcepts
Spark Streaming
Integrierbar mit Cassandra/Spark Treiber
Micro Batches (1 Sek), Discretized Streams
Exactly Once Semantik
RDD Funktionalität
1
2
3
4
Integration diverser MQ (z.B. Kafka)5
Umfeld
24
© WidasConcepts
Weiterentwicklungen im Spark Umfeld
SparkR, PySpark
Spark Integration in R
lapply Implementierung
kann in Closures in R verwendet werden
1
2
3
4
Interaktives R mit Spark möglich5
auf Daten in Cassandra6
In Zukunft ?
26
© WidasConcepts
Trennung wirklich „noch“ notwendig ?
27
© WidasConcepts
Ist das nicht ein zu „großer“ Toolstack?
28
© WidasConcepts
Vielleicht etwas einfacher?
29
© WidasConcepts
Die Lösung für Analytics? (mit etwas HDFS)
WidasConcepts
HighEnd-Technology requires HighEnd-Competence
(Wir beraten Sie gerne
WidasConcepts GmbH
Maybachstraße 2
71299 Wimsheim
www.widas.de
30
Dieses Dokument wurde von WidasConcepts erstellt. Die Verteilung, Zitierung und Vervielfältigung – auch auszugsweise – zum Zwecke der
Weitergabe an Dritte ist nur mit vorheriger schriftlicher Zustimmung von WidasConcepts gestattet.
This presentation was created by WidasConcepts. Distribution, citation, copying - completely or in extracts – for transfer purposes, is only
permitted with prior written agreement. These abstracts and graphics were deployed by WidasConcepts within the scope of a presentation.
It is no complete documentation of this event.
Thomas Mann, Solution Architect
Telefon: +49 (7044) 95103 – 100
Mobile: +49 162 259 56 90
Mail: thomas.mann@widas.de

Weitere ähnliche Inhalte

Andere mochten auch

Big Data Bullshit Bingo
Big Data Bullshit BingoBig Data Bullshit Bingo
Big Data Bullshit BingoDanny Linden
 
Big Data User Prediction: Siegfried Stepke, e-dialog
Big Data User Prediction: Siegfried Stepke, e-dialog Big Data User Prediction: Siegfried Stepke, e-dialog
Big Data User Prediction: Siegfried Stepke, e-dialog e-dialog GmbH
 
6 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2Fabio Fumarola
 
Stanford CS347 Guest Lecture: Apache Spark
Stanford CS347 Guest Lecture: Apache SparkStanford CS347 Guest Lecture: Apache Spark
Stanford CS347 Guest Lecture: Apache SparkReynold Xin
 
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...Reynold Xin
 
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016Jisc
 
Technologie und SEO: Cloud, Big Data und Mobile First angeschaut
Technologie und SEO: Cloud, Big Data und Mobile First angeschautTechnologie und SEO: Cloud, Big Data und Mobile First angeschaut
Technologie und SEO: Cloud, Big Data und Mobile First angeschautRalf Schwoebel
 
Introduction to MapReduce | MapReduce Architecture | MapReduce Fundamentals
Introduction to MapReduce | MapReduce Architecture | MapReduce FundamentalsIntroduction to MapReduce | MapReduce Architecture | MapReduce Fundamentals
Introduction to MapReduce | MapReduce Architecture | MapReduce FundamentalsSkillspeed
 
A NoSQL Summer - The Year After
A NoSQL Summer - The Year AfterA NoSQL Summer - The Year After
A NoSQL Summer - The Year AfterMeMo News AG
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsLynn Langit
 
Big Data: SQL on Hadoop from IBM
Big Data:  SQL on Hadoop from IBM Big Data:  SQL on Hadoop from IBM
Big Data: SQL on Hadoop from IBM Cynthia Saracco
 
Apache Cassandra - Einführung
Apache Cassandra - EinführungApache Cassandra - Einführung
Apache Cassandra - EinführungAndreas Finke
 
Tech Talk Cassandra
Tech Talk CassandraTech Talk Cassandra
Tech Talk Cassandraadesso AG
 
MapReduce & Apache Hadoop
MapReduce & Apache HadoopMapReduce & Apache Hadoop
MapReduce & Apache HadoopOliver Fischer
 

Andere mochten auch (20)

Data Science and the Fourth Paradigm by Torben Bach Pedersen
Data Science and the Fourth Paradigm by Torben Bach PedersenData Science and the Fourth Paradigm by Torben Bach Pedersen
Data Science and the Fourth Paradigm by Torben Bach Pedersen
 
The Fourth Paradigm Book
The Fourth Paradigm BookThe Fourth Paradigm Book
The Fourth Paradigm Book
 
Big Data Bullshit Bingo
Big Data Bullshit BingoBig Data Bullshit Bingo
Big Data Bullshit Bingo
 
Big Data User Prediction: Siegfried Stepke, e-dialog
Big Data User Prediction: Siegfried Stepke, e-dialog Big Data User Prediction: Siegfried Stepke, e-dialog
Big Data User Prediction: Siegfried Stepke, e-dialog
 
Big Data mit Apache Hadoop
Big Data mit Apache HadoopBig Data mit Apache Hadoop
Big Data mit Apache Hadoop
 
6 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2
 
Stanford CS347 Guest Lecture: Apache Spark
Stanford CS347 Guest Lecture: Apache SparkStanford CS347 Guest Lecture: Apache Spark
Stanford CS347 Guest Lecture: Apache Spark
 
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...
(Berkeley CS186 guest lecture) Big Data Analytics Systems: What Goes Around C...
 
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016
The fourth paradigm: data intensive scientific discovery - Jisc Digifest 2016
 
Technologie und SEO: Cloud, Big Data und Mobile First angeschaut
Technologie und SEO: Cloud, Big Data und Mobile First angeschautTechnologie und SEO: Cloud, Big Data und Mobile First angeschaut
Technologie und SEO: Cloud, Big Data und Mobile First angeschaut
 
Introduction to MapReduce | MapReduce Architecture | MapReduce Fundamentals
Introduction to MapReduce | MapReduce Architecture | MapReduce FundamentalsIntroduction to MapReduce | MapReduce Architecture | MapReduce Fundamentals
Introduction to MapReduce | MapReduce Architecture | MapReduce Fundamentals
 
A NoSQL Summer - The Year After
A NoSQL Summer - The Year AfterA NoSQL Summer - The Year After
A NoSQL Summer - The Year After
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
 
Einführung Big Data
Einführung Big DataEinführung Big Data
Einführung Big Data
 
Big Data: Kunden auf der Spur
Big Data: Kunden auf der SpurBig Data: Kunden auf der Spur
Big Data: Kunden auf der Spur
 
Big Data: SQL on Hadoop from IBM
Big Data:  SQL on Hadoop from IBM Big Data:  SQL on Hadoop from IBM
Big Data: SQL on Hadoop from IBM
 
Apache Cassandra - Einführung
Apache Cassandra - EinführungApache Cassandra - Einführung
Apache Cassandra - Einführung
 
Big Data & High-Performance-Analytics
Big Data & High-Performance-AnalyticsBig Data & High-Performance-Analytics
Big Data & High-Performance-Analytics
 
Tech Talk Cassandra
Tech Talk CassandraTech Talk Cassandra
Tech Talk Cassandra
 
MapReduce & Apache Hadoop
MapReduce & Apache HadoopMapReduce & Apache Hadoop
MapReduce & Apache Hadoop
 

Ähnlich wie Real-Time-Analytics mit Spark und Cassandra

Realtime BigData Step by Step mit Lambda, Kafka, Storm und Hadoop
Realtime BigData Step by Step mit Lambda, Kafka, Storm und HadoopRealtime BigData Step by Step mit Lambda, Kafka, Storm und Hadoop
Realtime BigData Step by Step mit Lambda, Kafka, Storm und HadoopValentin Zacharias
 
Leveraging the Power of Solr with Spark
Leveraging the Power of Solr with SparkLeveraging the Power of Solr with Spark
Leveraging the Power of Solr with SparkQAware GmbH
 
A Hitchhiker's Guide to the Cloud Native Stack
A Hitchhiker's Guide to the Cloud Native StackA Hitchhiker's Guide to the Cloud Native Stack
A Hitchhiker's Guide to the Cloud Native StackQAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConfA Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConfMario-Leander Reimer
 
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud Stefan Ehrlich
 
Caching mit Spring Boot - Pain & Gain @ JCON22
Caching mit Spring Boot - Pain & Gain @ JCON22Caching mit Spring Boot - Pain & Gain @ JCON22
Caching mit Spring Boot - Pain & Gain @ JCON22QAware GmbH
 
TRANSCONNECT® cloud (SQL Projekt AG)
TRANSCONNECT® cloud (SQL Projekt AG)TRANSCONNECT® cloud (SQL Projekt AG)
TRANSCONNECT® cloud (SQL Projekt AG)SQL Projekt AG
 
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...Stefan Ehrlich
 
Bitrix Site Manager v11.0 Presentation (de)
Bitrix Site Manager v11.0 Presentation (de)Bitrix Site Manager v11.0 Presentation (de)
Bitrix Site Manager v11.0 Presentation (de)Bitrix, Inc.
 
Dataservices - Data Processing mit Microservices
Dataservices - Data Processing mit MicroservicesDataservices - Data Processing mit Microservices
Dataservices - Data Processing mit MicroservicesQAware GmbH
 
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13OPITZ CONSULTING Deutschland
 
RDBMS oder NoSQL – warum nicht beides?
RDBMS oder NoSQL – warum nicht beides?RDBMS oder NoSQL – warum nicht beides?
RDBMS oder NoSQL – warum nicht beides?Capgemini
 
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die Cloud
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die CloudSQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die Cloud
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die CloudAWS Germany
 
Einfuehrung in Apache Spark
Einfuehrung in Apache SparkEinfuehrung in Apache Spark
Einfuehrung in Apache SparkJens Albrecht
 
AWR und ASH lizenzfrei für alle Editionen der Oracle-DB
AWR und ASH lizenzfrei für alle Editionen der Oracle-DBAWR und ASH lizenzfrei für alle Editionen der Oracle-DB
AWR und ASH lizenzfrei für alle Editionen der Oracle-DBPeter Ramm
 
Data Virtualization - Supernova
Data Virtualization - SupernovaData Virtualization - Supernova
Data Virtualization - SupernovaTorsten Glunde
 
IPv6 Integration im Datacenter - wie komplex ist es wirklich?
IPv6 Integration im Datacenter - wie komplex ist es wirklich?IPv6 Integration im Datacenter - wie komplex ist es wirklich?
IPv6 Integration im Datacenter - wie komplex ist es wirklich?Swiss IPv6 Council
 
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...inovex GmbH
 
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im Überblick
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im ÜberblickEntdecken Sie SAP Datasphere: Einsatzmöglichkeiten im Überblick
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im ÜberblickIBsolution GmbH
 

Ähnlich wie Real-Time-Analytics mit Spark und Cassandra (20)

Realtime BigData Step by Step mit Lambda, Kafka, Storm und Hadoop
Realtime BigData Step by Step mit Lambda, Kafka, Storm und HadoopRealtime BigData Step by Step mit Lambda, Kafka, Storm und Hadoop
Realtime BigData Step by Step mit Lambda, Kafka, Storm und Hadoop
 
Leveraging the Power of Solr with Spark
Leveraging the Power of Solr with SparkLeveraging the Power of Solr with Spark
Leveraging the Power of Solr with Spark
 
A Hitchhiker's Guide to the Cloud Native Stack
A Hitchhiker's Guide to the Cloud Native StackA Hitchhiker's Guide to the Cloud Native Stack
A Hitchhiker's Guide to the Cloud Native Stack
 
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConfA Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
 
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud
Integration von OnSite- und Cloud-Systemen mit TransConnect® cloud
 
Caching mit Spring Boot - Pain & Gain @ JCON22
Caching mit Spring Boot - Pain & Gain @ JCON22Caching mit Spring Boot - Pain & Gain @ JCON22
Caching mit Spring Boot - Pain & Gain @ JCON22
 
TRANSCONNECT® cloud (SQL Projekt AG)
TRANSCONNECT® cloud (SQL Projekt AG)TRANSCONNECT® cloud (SQL Projekt AG)
TRANSCONNECT® cloud (SQL Projekt AG)
 
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...
Mit TransConnect® einfach die Produktion vernetzen: mit wenigen Schritten zur...
 
Bitrix Site Manager v11.0 Presentation (de)
Bitrix Site Manager v11.0 Presentation (de)Bitrix Site Manager v11.0 Presentation (de)
Bitrix Site Manager v11.0 Presentation (de)
 
Dataservices - Data Processing mit Microservices
Dataservices - Data Processing mit MicroservicesDataservices - Data Processing mit Microservices
Dataservices - Data Processing mit Microservices
 
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
 
RDBMS oder NoSQL – warum nicht beides?
RDBMS oder NoSQL – warum nicht beides?RDBMS oder NoSQL – warum nicht beides?
RDBMS oder NoSQL – warum nicht beides?
 
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die Cloud
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die CloudSQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die Cloud
SQL oder NoSQL - Die Auswahl der richtigen Datenbankplattform für die Cloud
 
Einfuehrung in Apache Spark
Einfuehrung in Apache SparkEinfuehrung in Apache Spark
Einfuehrung in Apache Spark
 
AWR und ASH lizenzfrei für alle Editionen der Oracle-DB
AWR und ASH lizenzfrei für alle Editionen der Oracle-DBAWR und ASH lizenzfrei für alle Editionen der Oracle-DB
AWR und ASH lizenzfrei für alle Editionen der Oracle-DB
 
Warum sap hana sql data warehousing
Warum sap hana sql data warehousingWarum sap hana sql data warehousing
Warum sap hana sql data warehousing
 
Data Virtualization - Supernova
Data Virtualization - SupernovaData Virtualization - Supernova
Data Virtualization - Supernova
 
IPv6 Integration im Datacenter - wie komplex ist es wirklich?
IPv6 Integration im Datacenter - wie komplex ist es wirklich?IPv6 Integration im Datacenter - wie komplex ist es wirklich?
IPv6 Integration im Datacenter - wie komplex ist es wirklich?
 
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...
Analyse und Evaluierung von Parameterabhängigkeiten anhand der Laufzeit von M...
 
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im Überblick
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im ÜberblickEntdecken Sie SAP Datasphere: Einsatzmöglichkeiten im Überblick
Entdecken Sie SAP Datasphere: Einsatzmöglichkeiten im Überblick
 

Real-Time-Analytics mit Spark und Cassandra