Continuous Intelligence Through Computation Sharing With Arcon - - PowerPoint PPT Presentation

continuous intelligence
SMART_READER_LITE
LIVE PREVIEW

Continuous Intelligence Through Computation Sharing With Arcon - - PowerPoint PPT Presentation

Continuous Intelligence Through Computation Sharing With Arcon Paris Carbone Senior Researcher @ RISE Committer @ Apache Flink <paris.carbone@ri.se> Castor Software Days E n Data g i n Science e e r i n g Tech Business A


slide-1
SLIDE 1

Continuous Intelligence

Through Computation Sharing With Arcon

Paris Carbone Senior Researcher @ RISE Committer @ Apache Flink <paris.carbone@ri.se> Castor Software Days

slide-2
SLIDE 2

Business

Tech

A Lot is going on in Tech (Deep Learning, Scalable Processing etc.) Little contribution to critical real-time decision making

Data Science E n g i n e e r i n g

slide-3
SLIDE 3

3

Continuous Intelligence

A design pattern in which real-time analytics are integrated within a business operation, processing current and historical data to prescribe actions in response to events.

Business

Tech

https://www.gartner.com/en/newsroom/press-releases/2019-02-18-gartner-identifies-top-10-data-and-analytics-technolo

events actions

slide-4
SLIDE 4

4

What we think of data

vs actual data….

slide-5
SLIDE 5

The Paradigm Shift Some Missed

Data

Queries retrospective answers

Query

lots of Data real-time answers

  • Data Stream Processing as a 24/7 execution paradigm

paradigm shift

5

Stream SQL, CEP… Kafka, Pub/Sub, Kinesis, Pravega… Flink, Beam, Kafka-Streams, Apex, Storm

Storage Compute High Level Models

The Stream Analytics Stack

slide-6
SLIDE 6

Similar Technologies

service

24/7 applications/services have always been event-driven e.g., using actor programming events

01110011100001001000100010010001 000100110010 000100110010 000100110

logic

6

net socket

slide-7
SLIDE 7

Actors vs Streams

vs

Data Stream Computing Actor Programming

  • Declarative Programming
  • State Managed by the system
  • Robust: Built-in Fault Tolerance
  • Scalable Deployments

service

logic

service

logic state logi logi logi logi logi logic logic logic logi logic state

  • Low-Level Event-Based Programming
  • Manual/External State
  • Not Robust: Manual Fault Tolerance
  • Not flexible scaling

Declarative Program

service

slide-8
SLIDE 8

Stream SQL, CEP… Kafka, Pub/Sub, Kinesis, Pravega… Flink, Beam, Kafka-Streams, Apex, Storm, Spark Streaming… Storage Compute High Level Models

8

The Real-Time Analytics Stack

slide-9
SLIDE 9

9

Apache Flink Foundations

commercial deployments

  • Top-level Apache Project
  • #1 stream processor (2019)
  • Production-Proof
  • > 400 contributors
  • 100s of deployments

Data Streams,Fault Tolerance, Window Aggregation

Calcite stream-SQL

influenced

slide-10
SLIDE 10

Structure of a 24/7 Stream Application

Event Logs Historic Data Event Logs Files Applications/Services Stream Processing

State

slide-11
SLIDE 11

Programming Abstractions in Flink

11

Dataflow Engine

  • Fault Tolerance
  • Scalability
  • Monitoring/IO Management
  • Dynamic program state
  • Operations on out-of-order streams

Event Processing API

f(input, state, time)

DataStream API

window,map,filter etc.

  • Higher-Order Streaming Functions
  • Event Windowing (sessions, time etc.)

SQL, CEP, Tables, ML

  • Fully Declarative Programming
  • Event Patterns, Relations etc.

Automates

Domain-Specific APIs

Data Scientists Data Engineers

slide-12
SLIDE 12

12

Declarative Streaming Examples

Average Tip per Hour with Stream SQL Completed Taxi Rides within 120min with Complex Event Processing

SELECT HOUR(r.rideTime) AS hourOfDay, AVG(f.tip) AS avgTip FROM Rides r, Fares f WHERE r.rideId = f.rideId AND NOT r.isStart AND f.payTime BETWEEN r.rideTime - INTERVAL '5' MINUTE AND r.rideTime GROUP BY HOUR(r.rideTime);

val completedRides = Pattern .begin[TaxiRide]("start").where(_.isStart) .next(“end").where(!_.isStart) CEP.pattern[TaxiRide](allRides, completedRides.within(Time.minutes(120)))

slide-13
SLIDE 13

Case Study Car Sharing

https://www.flink-forward.org/

Source:

slide-14
SLIDE 14

14

AthenaX - An Online Warehousing Platform (2017)

AthenaX UberEats UberEats UberEats Restaurants Users real-time estimations

  • earnings
  • user satisfaction

estimated delivery? https://eng.uber.com/athenax/ A stream SQL query optimiser and executor based on Flink https://github.com/uber/AthenaX

AthenaX was released and open sourced by Uber Technologies. It is capable of scaling across hundreds of machines and processing hundreds of billions of real-time events daily.

event streams

slide-15
SLIDE 15

15

Marketplace - Dynamic Ride Pricing with Apache Flink (2018)

https://marketplace.uber.com/

Flink Forward 2018

  • supply
  • demand (taxi orders)
  • Trips
  • Traffic

Compute Location-Sensitive Trends in Rider Demand and Driver Availability Prices

  • Pricing
  • Dispatch
  • Promotions
  • Driver Positioning

Geo-Sensitive Time-based Aggregations million events per sec Input Streams Output Decisions

slide-16
SLIDE 16

16

Dynamic Pricing - A Data Stream-Powered Standard

  • Dynamic Pricing
  • more profitable
  • best deals for users
  • competition had to adapt
slide-17
SLIDE 17

17

Dynamic Pricing (2019)

  • PrimeTime Real-Time Service
  • Price Multiplier per geog. cell
  • 3M Geohashes/min

too many too few

Flink Pipeline

slide-18
SLIDE 18

? ? ? ?

The Bigger Picture

18

Data Processing

  • scalable, fault tolerant analytics
  • event-based business logic
  • out-of-order computation
  • dynamic relational tables (SQL)
  • event pattern-matching (CEP)

Data Streams

  • tensors
  • graph algorithms
  • deep learning
  • feature learning
  • reinforcement learning
  • ….

but what about deeper analytics…

slide-19
SLIDE 19

Data Pipelines Today

  • Many Frameworks/Frontends for different needs
  • (ML Training & Serving, SQL, Streams, Tensors, Graphs)

19

⋈ ⋈ ⋈ σθ σθ σθ σθ π π

Streams

Feature Learning Tensor Programming Dynamic Graphs

AI ML RL

Simulation tasks Reasoning Feature Engineering Model Serving

slide-20
SLIDE 20

Fundamental Problems

20

Event Logic

live data

ML Historic Model

historic data

  • nline/

streaming

  • ffline/

batch

Framework/Library Silos Fragmented Codebases/Runtimes Unshared Hardware Over-materialization of results Ridiculously Unoptimised Programs No continuous intelligence

features, aggregates,ETL model serving

slide-21
SLIDE 21

Next paradigm shift?

21

Event Logic

live data

ML Historic Model

historic data

  • nline/

streaming

  • ffline/

batch

?

critical decision making

Live Model

features, aggregates,ETL model serving

slide-22
SLIDE 22

22

“A revolutionary technology that does NOT require you to throw tons of data to your problem to be able to solve it”

The Compiler

  • Instead, compilers can understand instructions…
  • explained by humans in a high-level declarative language
  • and then optimise them
  • and translate to primitive machines to execute them reliably

Secret Sauce?

slide-23
SLIDE 23

Arcon Arcon Arcon

23

The Arcon Vision

Tensors DataFrames DataStreams Graphs Optimise and Generate Code Cross-Compile

Unified Declarative Programming Shared Native Execution

slide-24
SLIDE 24

The Arcon Architecture

24

Unified Analytics DSL Arcon Runtime Arc IR (Intermediate Representation)

slide-25
SLIDE 25

Unified Analytics DSL

25

Arc IR

Translation Core DSL …

  • Host language-agnostic core
  • Compositional
  • First-class citizen support for:
  • streams, tensors, relations

Data Streams Linear Algebra Relational Algebra

σθ σθ π

slide-26
SLIDE 26

IR Intuition

26

#Frameworks Performance

f1 f2 f3

  • No cross-optimisation

is possible, e.g. resource sharing

  • Data movement


costs ( )

f1 f2 f3

IR IR IR

f1 + f2 + f3

IR

slide-27
SLIDE 27

27

Arcon Arc (High Level IR) Unified Analytics DSL Logical Dataflow IR Physical Dataflow IR Binaries

Arcon Compiler Pipeline

slide-28
SLIDE 28

Arc IR

28

Read More

[Paper] Arc: An IR for Batch and Stream Programming @ DBPL19 [Code] https://github.com/cda-group/arc

  • A minimal yet feature-complete set of read/write-only types and expressions
slide-29
SLIDE 29

Arc Optimisations

  • Arc supports both compiler and dataflow optimisations
  • Compiler: Loop unrolling, partial evaluation,
  • Dataflow: Operator fusion, fission, reordering,

predicate pushdown, specialisation, ...

29

slide-30
SLIDE 30

Unlocking Speed

30

ne k)

  • n
  • n

T a In In 100 101 102 103 Execution Time (seconds)

x2 orders of magnitude faster

  • 1. Unoptimised
  • 4. Partially Evaluated
  • 2. Fused
  • 3. Inlined

10M elements 50 map operations

  • n Apache Flink

Arc (High Level IR) Logical Dataflow IR Physical Dataflow IR Binaries

Arc can boost even existing frameworks

slide-31
SLIDE 31

A Runtime Capable for Unified Analytics

31

Neptune: Scheduling Suspendable Tasks for Unified Stream/Batch Applications SOCC 2019 Garefalakis, Karanasos, Pietzuch

IO - Channels / State IO - Channels / State Dynamic Scheduler Dynamic Scheduler

Appmaster Statemaster

dataflow deployment

Static Dynamic

control data snapshots …

Operational Plane Execution Plane workers

Hadoop Spark Flink Arcon Neptune Ray Storm

Flexible State Backends (external/shared, embedded)

slide-32
SLIDE 32

Performance Matters

  • Arc Optimiser : ~10x Speedup
  • Shared Hardware Acceleration : ~102x Speedup
  • Data Parallel Execution : ~103x Speedup

32

slide-33
SLIDE 33

Learn More

33

https://cda-group.github.io https://github.com/cda-group/arcon https://github.com/cda-group/arc Code: Project:

https://twitter.com/SenorCarbone