SIMILARITIES
THE FIRST IMPRESSION COUNTS
The moment the customer enters
the shop or the player plays his first
session is crucial
HALO EFFECT
When one trait of a person or
thing is used to make an overall
judgment of that person or
thing
Slide 19
Slide 19 text
IN ORDER TO MAKE A
POSITIVE IMPACT
A RESPONSE NEEDS TO HAPPEN
QUICKLY
Slide 20
Slide 20 text
TIME-VALUE
OF
INFORMATION
Slide 21
Slide 21 text
REAL-TIME USER REPORTS
TRAFFIC
GAS PRICE
SPEED TRAPS
Slide 22
Slide 22 text
RESPOND TO
LIFE
AS IT
HAPPENS
Slide 23
Slide 23 text
STREAM PROCESSING
STREAMS OF DATA
GPS DATA WEB INTERACTION SENSOR DATA
Slide 24
Slide 24 text
STREAM PROCESSING
PROCESSING DATA IN MOTION
Slide 25
Slide 25 text
STREAM PROCESSING
YOUR
CODE
SOURCE SINK
OPERATOR
Slide 26
Slide 26 text
STREAM PROCESSING LAKE
Slide 27
Slide 27 text
STREAM PROCESSING LAKE
Slide 28
Slide 28 text
APACHE FLINK
Slide 29
Slide 29 text
APACHE FLINK
Framework and distributed
process engine for stateful
computations on unbounded
and bounded data streams
Slide 30
Slide 30 text
STREAMS
TIME
WINDOWS
Slide 31
Slide 31 text
EVERYTHING IS A STREAM
UNBOUNDED STREAMS
BOUNDED STREAMS
Slide 32
Slide 32 text
EVERYTHING IS A STREAM
UNBOUNDED STREAMS
BOUNDED STREAMS
AKA BATCH PROCESSING
Slide 33
Slide 33 text
TIME IN STREAMING
EPISODE I EPISODE II EPISODE III EPISODE IV EPISODE V EPISODE VI EPISODE VII EPISODE VIII EPISODE IX
1999 2002 2005 1977 1980 1983 2015 2017 2019
The
Phantom
Menace
Attack of
the Clones
Revenge of
the Sith
A New
Hope
The Empire
Strikes Back
Return of
the Jedi
The Force
Awakens
The Last
Jedi
?
ORDERED BY EVENT TIME
PROCESSING TIME
Slide 34
Slide 34 text
TIME IN STREAMING
EPISODE I EPISODE II EPISODE III
EPISODE IV EPISODE V EPISODE VI EPISODE VII EPISODE VIII EPISODE IX
1999 2002 2005
1977 1980 1983 2015 2017 2019
The
Phantom
Menace
Attack of
the Clones
Revenge of
the Sith
A New
Hope
The Empire
Strikes Back
Return of
the Jedi
The Force
Awakens
The Last
Jedi
?
EVENT TIME
ORDERED BY PROCESSING TIME
BUILDING BLOCKS
DATA SOURCE TRANSFORMATION DATA SINK
Slide 38
Slide 38 text
API
BUILDING BLOCKS
DATA SOURCE TRANSFORMATION DATA SINK
Slide 39
Slide 39 text
BUILDING BLOCKS
SQL / TABLE API
DataStream API
ProcessFunction
APIs
(dynamic tables)
(streams, windows)
(events, state, time)
HIGH LEVEL
ANALYTICS API
STREAM AND BATCH
DATA PROCESSING
STATEFUL EVENT-
DRIVEN APPLICATIONS
CONCISENESS
EXPRESSIVENESS
Slide 40
Slide 40 text
LET‘S HAVE A CLOSER LOOK
Slide 41
Slide 41 text
LET‘S HAVE A CLOSER LOOK
final StreamExecutionEnvironment env = getExecutionEnvironment();
final DataStreamSource stream = env.fromElements(1, 2, 3, 4);
stream
.map((MapFunction) i -> i + 2)
.filter((FilterFunction) i -> i % 2 == 0)
.print();
env.execute();
DATA SOURCE
TRANSFORMATION
DATA SINK
Slide 42
Slide 42 text
RUNTIME
YOUR FLINK APP
FLINK RUNTIME
D E P LOY
Slide 43
Slide 43 text
RUNTIME
Slide 44
Slide 44 text
BIG DATA AND STREAMING
AT
INNOGAMES
Slide 45
Slide 45 text
TEAM
Slide 46
Slide 46 text
TEAM
BUSINESS INTELLIGENCE DATA ENGINEERING DATA SCIENCE OPERATIONS
Slide 47
Slide 47 text
EVENT TRACKING
quest
build
fight invite
Slide 48
Slide 48 text
EVENT TRACKING
1.500.000.000
EVENTS PER DAY
Slide 49
Slide 49 text
DATA ARCHITECTURE
DATA PIPELINE DATA PLATFORM
milliseconds, seconds, minutes hours, days, years
Slide 50
Slide 50 text
DATA ARCHITECTURE
SQUIRREL ELEPHANT
Slide 51
Slide 51 text
DATA ARCHITECTURE
EVENT
CLIENT
EVENT
CLIENT
EVENT
CLIENT
EVENT GATEWAY
EVENT BUS
STREAM
PROCESSING
DISTRIBUTED DATA STORE
DISTRIBUTED BATCH PROCESSING
BUSINESS
INTELLIGENCE
Slide 52
Slide 52 text
DATA ARCHITECTURE
EVENT
CLIENT
EVENT
CLIENT
EVENT
CLIENT
EVENT GATEWAY
EVENT BUS
STREAM
PROCESSING
DISTRIBUTED DATA STORE
DISTRIBUTED BATCH PROCESSING
BUSINESS
INTELLIGENCE
Slide 53
Slide 53 text
No content
Slide 54
Slide 54 text
DATA ARCHITECTURE
EVENT
CLIENT
EVENT
CLIENT
EVENT
CLIENT
EVENT GATEWAY
EVENT BUS
STREAM
PROCESSING
DISTRIBUTED DATA STORE
DISTRIBUTED BATCH PROCESSING
BUSINESS
INTELLIGENCE
STREAM
PROCESSING
USE CASE NTCRM
EVENT BUS
EVENT
CLIENT
EVENT GATEWAY
PLAYER DATA
NTCRM
React to events with interstitials in less than 10 seconds
Slide 65
Slide 65 text
USE CASE NTCRM
Elvenar has a trading feature that sometimes
causes confusion. With NTCRM we can react to
this and show more details within interstitials
exactly when the player needs it.
Slide 66
Slide 66 text
JUST DO IT
DEMO TIME
Check it out on Github: https://github.com/prenomenon/codetalks-flinkdemo
Slide 67
Slide 67 text
GET IN TOUCH
InnoGames GmbH
Friesenstrasse 13
20097 Hamburg
https://www.innogames.com
Volker Janz
Senior Software Developer
Corporate Systems - Analytics
Slide 68
Slide 68 text
GET IN TOUCH
@prenomenon
feedback appreciated
Slide 69
Slide 69 text
LIFE
DOESN’T
HAPPEN
IN BATCHES
Slide 70
Slide 70 text
EAT ICE CREAM
AND
STREAM ON
Great Flink training: http://training.data-artisans.com
Slide 71
Slide 71 text
NEXT UP
EVENT
CLIENT
EVENT
CLIENT
EVENT
CLIENT
EVENT GATEWAY
EVENT BUS
STREAM
PROCESSING
DISTRIBUTED DATA STORE
DISTRIBUTED BATCH PROCESSING
BI
BUSINESS
INTELLIGENCE
Slide 72
Slide 72 text
THAT’S IT FOR NOW…
Slide 73
Slide 73 text
BACKUP / DETAILS
The following slides are not part of my talk but
might give the reader more insights later
Slide 74
Slide 74 text
COMPANY SNAPSHOT
More than
400 employees
Founded 2007
in Germany
Headquarter in
Hamburg
+160m EUR revenue
made in 2017
7 live games
>30 language versions
Slide 75
Slide 75 text
I AM LEGEND
OUR PORTFOLIO
Simulation Strategy RPG Browser Multi-device Mobile
RUNTIME
SOURCE MAP
PRINT
FILTER
OPERATOR CHAIN OPERATOR
OPERATOR
SUBTASK SUBTASK
TASK
SOURCE MAP FILTER
OPERATOR CHAIN OPERATOR
SUBTASK SUBTASK
STREAM
PARTITIONS
STREAMING DATAFLOW
(PARALLELIZED VIEW)
A Flink cluster has a JOB MANAGER and multiple
TASK MANAGERS. Each of those is a JVM.
CHECKPOINTING
checkpoint
barrier n
checkpoint
barrier n-1
checkpoint n+1 checkpoint n checkpoint n-1
Consistent, incremental snapshots of distributed data stream and operator state
Based on a paper from 1985, inspired by the Chandy-Lamport-Algorithm
Slide 84
Slide 84 text
STATE
OPERATOR STATE KEYED STATE
Bound only to
an operator
Bound to an
operator and key
PLUGGABLE BACKEND
MULTIPLE PRIMITIVES SUPPORTED
GUARANTEED CONSISTENCY IN CASE OF A FAILURE