big data architectures @ jax / bigdatacon 2016

49
Guido Schmutz | Trivadis Architektur von Big Data Lösungen

Upload: guido-schmutz

Post on 16-Apr-2017

811 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Guido Schmutz | Trivadis

Architektur von Big Data Lösungen

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH

Architektur von Big Data Lösungen

Guido Schmutz

Guido Schmutz

Working for Trivadis for more than 19 yearsOracle ACE Director for Fusion Middleware and SOACo-Author of different booksConsultant, Trainer Software Architect for Java, Oracle, SOA and Big Data / Fast DataMember of Trivadis Architecture BoardTechnology Manager @ Trivadis

More than 25 years of software development experience

Contact: [email protected]: http://guidoschmutz.wordpress.comTwitter: gschmutz

Agenda

1. Introduction2. Traditional Architecture for Big Data3. Streaming Analytics Architecture for Fast Data4. Lambda/Kappa/Unifed Architecture for Big Data5. Summary

Introduction

How to do Big Data?

Big Data is still “work in progress”

Choosing the right architecture is key for any (big data) project

Big Data is still quite a young field and therefore there are no standard architectures available which have been used for years

In the past few years, a few architectures have evolved and have been discussed online

Know the use cases before choosing your architecture

To have one/a few reference architectures can help in choosing the right components

Building Blocks for (Big) Data ProcessingData

Acquisition

FormatFile System

Stream Processing

Batch SQL

Graph DBMS

Document DBMS

Relational DBMS

Visualization

IoT

Messaging

Analytics

OLAP DBMS

Query Federation

Table-Style DBMS

Key Value DBMS

Batch Processing

In-Memory

Big Data Ecosystem – many choices ….

Important Properties to choose a Big Data Architecture

Latency

Keep raw and un-interpreted data “forever” ?

Volume, Velocity, Variety, Veracity

Ad-Hoc Query Capabilities needed ?

Robustness & Fault Tolerance

Scalability

From Volume and Variety to Velocity

Big Data has evolved …

and the Hadoop Ecosystem as well ….

Past

BigData =Volume&Variety

Present

BigData =Volume&Variety&Velocity

Past

BatchProcessing

TimetoinsightofHours

Present

Batch &StreamProcessing

Timetoinsight inSeconds

Adapted fromClouderablogarticle

Traditional Architecture for Big Data

“Traditional Architecture” for Big Data

DataCollection (Analytical)DataProcessing ResultStoreData

Sources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

Batchcompute

Stage

ResultStore

QueryEngine

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Use Case 1) – Log File Analysis (Audit, Compliance, Root Cause Analysis)

DataCollection

(Analytical)DataProcessing ResultStoreDataSources

DataConsumer

ChannelBatch

compute

ComputedInformation

RawData(Reservoir)

ResultStore

QueryEngine

Reports

AnalyticTools

Logfiles

Use Case 1a) – Log File Analysis (Audit, Compliance, Root Cause Analysis)

DataCollection

(Analytical)DataProcessing ResultStoreDataSources

DataConsumer

ChannelBatch

compute

ComputedInformation

RawData(Reservoir)

ResultStore

QueryEngine

Reports

AnalyticTools

Logfiles

Use Case 2) – Customer Data Hub (360 degree view of customer)

DataCollection

(Analytical)DataProcessing ResultStoreDataSources

DataConsumer

RDBMSBatch

compute

ComputedInformation

RawData(Reservoir)

ResultStore

QueryEngine

Reports

Service

AnalyticTools

AlertingTools

Use Case 2a) – Customer Data Hub (360 degree view of customer)

DataCollection

(Analytical)DataProcessing ResultStoreDataSources

DataConsumer

RDBMS(CDC) Batch

compute

ComputedInformation

RawData(Reservoir)

ResultStore

QueryEngine

Reports

Service

AnalyticTools

AlertingTools

Channel

“Hadoop Ecosystem” Technology Mapping

DataCollection (Analytical)DataProcessing ResultStoreData

Sources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

Batchcompute

StagingResultStore

QueryEngine

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Apache Spark – the new kid on the block

Apache Spark is a fast and general engine for large-scale data processing• The hot trend in Big Data!• Originally developed 2009 in UC Berkley’s AMPLab• Can run programs up to 100x faster than Hadoop MapReduce in memory, or 10x

faster on disk• One of the largest OSS communities in big data with over 200 contributors in 50+

organizations• Open Sourced in 2010 – since 2014 part of Apache Software foundation• Supported by many vendors

Motivation – Why Apache Spark?

Apache Hadoop MapReduce: Data Sharing on Disk

Apache Spark: Speed up processing by using Memory instead of Disks

map reduce . . .Input

HDFSread

HDFSwrite

HDFSread

HDFSwrite

op1 op2 . . .Input

Output

Output

Apache Spark “Ecosystem”

SparkSQL(BatchProcessing)

BlinkDB(ApproximateQuerying)

SparkStreaming(Real-Time)

MLlib,SparkR(MachineLearning)

GraphX(GraphProcessing)

SparkCoreAPIandExecutionModel

SparkStandalone MESOS YARN HDFS Elastic

SearchNoSQL S3

Libraries

CoreRuntime

ClusterResourceManagers Data/DataStores

“Spark Ecosystem” Technology Mapping

DataCollection (Analytical)DataProcessing ResultStoreData

Sources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

Batchcompute

StageResultStore

QueryEngine

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Use Case 3) – (Batch) Recommendations on Historic Data

DataCollection

(Analytical)DataProcessing ResultStoreDataSources

DataConsumer

MachineBatch

compute

ComputedInformation

RawData(Reservoir)

ResultStore

QueryEngine

Reports

Service

AnalyticTools

AlertingTools

DB

StagingFile

Channel

Traditional Architecture for Big Data

• Batch Processing

• Not for low latency use cases

• Spark can speed up, but if positioned as alternative to Hadoop Map/Reduce, it’s still Batch Processing

• Spark Ecosystems offers a lot of additional advanced analytic capabilities (machine learning, graph processing, …)

Streaming Analytics Architecturefor Big Data

Streaming Analytics Architecture for Big Dataaka. (Complex) Event Processing)

DataCollection

Batchcompute

DataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

Logfiles

Sensor

RDBMS

ERP

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

=DatainMotion =DataatRest

Use Case 4) Algorithmic Trading

DataCollection

Batchcompute

DataSources

Channel

DataConsumer

AnalyticTools

AlertingTools

Sensor

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

Use Case 5) Real-Time Analytics / Dashboard

DataCollection

Batchcompute

DataSources

Channel

DataConsumer

AnalyticTools

Sensor

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

Native Streaming vs. Micro-Batching

Native Streaming• Events processed as they

arrive• + low-latency• - throughput• - fault tolerance is expensive

Micro-Batching• Splits incoming stream in

small batches• + high(er) throughput• + easier fault tolerance• - lower latency

Source: Distributed Real-TimeStreamProcessing:WhyandHowbyPetrZapletal

Unified Log (Event) Processing

Stream processing allows for computing feeds off of other feeds

Derived feeds are no different than original feedsthey are computed off

Single deployment of “Unified Log” but logically different feeds

MeterReadings

Collector

Enrich/Transform

AggregatebyMinute

RawMeterReadings

MeterwithCustomer

Meterby CustomerbyMinute

Customer AggregatebyMinute

MeterbyMinute

Persist

MeterbyMinute

Persist

RawMeterReadings

Streaming Analytics Technology Mapping

DataCollection

Batchcompute

DataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

Logfiles

Sensor

RDBMS

ERP

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

=DatainMotion =DataatRest

Streaming Analytics Architecture for Big Data

The solution for low latency use cases

Process each event separately => low latency

Process events in micro-batches => increases latency but offers better reliability

Previously known as “Complex Event Processing”

Keep the data moving / Data in Motion instead of Data at Rest => raw events were not stored

Keep raw event data

DataCollection

Batchcompute

DataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

Logfiles

Sensor

RDBMS

ERP

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

=DatainMotion =DataatRest

(Analytical)BatchDataProcessing

RawData(Reservoir)

Lambda Architecture for Big Data

“Lambda Architecture” for Big Data

DataCollection

(Analytical)BatchDataProcessing

Batchcompute

ResultStoreDataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

Batchcompute

Messaging

ResultStore

QueryEngine

ResultStore

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Use Case 6) Social Media Analysis

DataCollection

(Analytical)BatchDataProcessing

Batchcompute

ResultStoreDataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

Batchcompute

Messaging

ResultStore

QueryEngine

ResultStore

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Use Case 7) Customer Event Hub

DataCollection

(Analytical)BatchDataProcessing

Batchcompute

ResultStoreDataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

Batchcompute

Messaging

ResultStore

QueryEngine

ResultStore

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

Social

RDBMS(CDC)

Sensor

ERP

Logfiles

Lambda Architecture for Big Data

Combines (Big) Data at Rest with (Fast) Data in Motion

Closes the gap from high-latency batch processing

Keeps the raw information forever

Makes it possible to rerun analytics operations on whole data set if necessary => because the old run had an error or => because we have found a better algorithm we want to apply

Have to implement functionality twice• Once for batch• Once for real-time streaming

„Kappa“ Architecture for Big Data

“Kappa Architecture” for Big Data

DataCollection

“RawDataReservoir”

Batchcompute

DataSources

Messaging

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

Logfiles

Sensor

RDBMS

ERP

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

RawData(Reservoir)

=DatainMotion =DataatRest

ComputedInformation

Use Case 8) Social Network Analysis

DataCollection

“RawDataReservoir”

Batchcompute

DataSources

Messaging

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

Logfiles

Sensor

RDBMS

ERP

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

ResultStore

Messaging

ResultStore

RawData(Reservoir)

=DatainMotion =DataatRest

ComputedInformation

Kappa Architecture for Big Data

Today the stream processing infrastructure are as scalable as Big Data processing architectures• Some using the same base infrastructure, i.e. Hadoop YARN

Only implement processing / analytics logic once

Can Replay historical events out of an historical (raw) event store• Provided by either the Messaging or Raw Data (Reservoir) component

Updates of processing logic / Event replay are handled by deploying new version of logic in parallel to old one• New logic will reprocess events until it caught up with the current events and then

the old version can be de-commissioned.

„Unified“ Architecture for Big Data

“Unified Architecture” for Big Data

DataCollection

(Analytical)BatchDataProcessing(CalculateModelsofincomingdata)

Batchcompute

ResultStoreDataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

Social

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

Batchcompute

Messaging

ResultStore

QueryEngine

ResultStore

ComputedInformation

RawData(Reservoir)

=DatainMotion =DataatRest

PredictionModels

Use Case 8) Industry 4.0 => Predictive Maintainance

DataCollection

(Analytical)BatchDataProcessing(CalculateModelsofincomingdata)

Batchcompute

ResultStoreDataSources

Channel

DataConsumer

Reports

Service

AnalyticTools

AlertingTools

RDBMS

Sensor

ERP

Logfiles

Mobile

Machine

(Analytical)Real-TimeDataProcessing

Stream/EventProcessing

Batchcompute

Messaging

ResultStore

QueryEngine

ResultStore

ComputedInformation

RawData(Reservoir)

PredictionModels

J-PMML

Summary

Summary

Know your use cases and then choose your architecture and the relevant components/products/frameworks

You don’t have to use all the components of the Hadoop Ecosystem to be successful

Big Data is still quite a young field and therefore there are no standard architectures available which have been used for years

Lambda, Kappa Architecture & Unified Architecture are best practices architectures which you have to adapt to your environment=> Combination of traditional Big Data Batch & Complex Event Processing (CEP)

Guido SchmutzTechnology Manager

[email protected]