SlideShare a Scribd company logo
1 of 33
Download to read offline
How Big Fish Games Developed Real-Time Analytics Using
Kafka Streams and Elastic Search
2 Big Fish Confidential
Big Fish Games
o Leading producer and distributor of casual
games.
o 2.5 billion games distributed to customers in
150 countries
o 450 unique mobile games
o 3500 unique PC games
3 Big Fish Confidential
Cooking Craze
4 Big Fish Confidential
Live Operations Real Time Dashboard
Let’s Dish
5 Big Fish Confidential
Live Ops and Free to Play Games
o Monetization through “in app” purchases
o Games evolve and are extended indefinitely
o Live Operations
o Games which allow real-time updates to
improve the game or align to audiences
needs
6 Big Fish Confidential
Monitoring a Forced Update
7 Big Fish Confidential
Monitoring New Content
8 Big Fish Confidential
Monitoring Event Participation
9 Big Fish Confidential
Kafka at Big Fish
10 Big Fish Confidential
Let’s Dish Dashboards
Data Sources
o Game Telemetry Events from a Kafka Topic
o restaurant leave , restaurant join
o session start, session foreground, session
background, session heartbeat
o recipe complete, recipe burn
o Hive Data
o Install Date
o bookings , bookings Last30
o channel Type
o bfgudid
11 Big Fish Confidential
Elastic Search Document{
"_index": "letsdish-2018-19",
"_type": "recipes",
"_id": "f4858a61-cf4e-400c-952e-6e940774e1ef",
"_score": 1,
"_source": {
"count": 1,
"restaurantScheduleId": "french",
"restaurantsAvailable": 5,
"installDate": "2018-05-09",
"bookingsBin": "No Monetization",
"bookingsBinLast30": "No Monetization",
"channelType": "Organic",
"environment": "prod",
"appName": "LetsDish",
"bfgudid": "f8e1d52b7a5edb26aafed418e2a25c6879766f9c",
"platform": "android",
"customUtc": 1526078368,
"countryCode": "US",
"appVersion": "42",
"guid": "f4858a61-cf4e-400c-952e-6e940774e1ef“
(…)
},
"fields": {
"customUtc": [
"2018-05-11T22:39:28.000Z"
],
"installDate": [
"2018-05-09T00:00:00.000Z"
]
}
}
12 Big Fish Confidential
Two Streams APIs
o Streams DSL
o Abstraction of Processor API
o Used for Let’s Dish Dashboards
o Streams Processor API
o More flexible
o Finer control of stream processing
13 Big Fish Confidential
Let’s Dish Streaming Transformation
Topology
14 Big Fish Confidential
Mapping, Filtering and
Branching
15 Big Fish Confidential
Map Function
KeyValueMapper<String, String,
<String,GtEvent>>
Maps JSON String Value to Game
Telemetry Pojo: GtEvent
16 Big Fish Confidential
Java 8 Lambda Function
Map Function
public static KeyValueMapper<String, String,
KeyValue<String, GtEvent>>
mapStringToGtEvent = (k, v) ->
{
GtEvent gtEvent;
try {
gtEvent = new Gson().fromJson(v,GtEvent.class);
} catch (Exception e) {
gtEvent = new CustomEvent();
} return
new KeyValue<String, GtEvent>(k, gtEvent);
};
17 Big Fish Confidential
Filter Predicates
KStreams filter and branch methods
take a Predicate interface
KStream.filter(Predicate)
KStream.branch(Predicate[])
18 Big Fish Confidential
Java 8 Lambda Functions
Filter Predicates
public static Predicate<String, GtEvent>
isRecipeComplete = (k, v) ->
"recipe_complete".equals(
v.data.eventName.toLowerCase());
public static Predicate<String, GtEvent>
isSession = (k, v) ->
Arrays.asList("session_start",
"session_foreground",
"session_background",
"session_heartbeat")
.contains(v.data.eventName.toLowerCase());
19 Big Fish Confidential
Map and Filters Combined
public static KStream<String, GtEvent>[] createBranchedStreams(
KStream<String, String> source) {
return source
.map(Mappers.mapStringToGtEvent)
.branch(
FilterPredicates.isRecipeComplete,
FilterPredicates.isRecipeBurn,
FilterPredicates.isSession,
FilterPredicates.isRestaurant);
}
20 Big Fish Confidential
Four KStreams
o Recipe Burn
o Recipe Complete
o Restaurant Unlocked
o Restaurant Names
21 Big Fish Confidential
Aggregated Player Purchases Table
Enhance KStreams with
Hive Table
ID FIRST
INSTALL
DATE
BOOKINGS
BIN
BOOKINGS LAST
30 DAYS
CHANNEL TYPE
1 9/12/2018 $1 <= $5 $1 <= $5 paid
2 9/12/2018 $5 <= $20 $5 <= $20 organic
3 9/12/2018 $1 <= $5 $1 <= $5 paid
22 Big Fish Confidential
Kafka Topic
23 Big Fish Confidential
Joining Streams
24 Big Fish Confidential
Types of Joins
o Windowed Join (No State)
o KStream->KStream
o Non-Windowed Joins (State Maintained )
o KStream->KTable
o KTable->KTable
25 Big Fish Confidential
Using Group By Key
Creating a KTable from Kstream
.groupByKey(Serialized.with(stringSerde,longSerde))
.reduce((oldValue, newValue) ->
Math.max(oldValue, newValue),
Materialized.<String, Long,
KeyValueStore<Bytes, byte[]>>
as("restaurants-unlocked-store")
.withKeySerde(stringSerde)
.withValueSerde(longSerde));
26 Big Fish Confidential
Recipe Burn Stream to Restaurant Unlocked KTable
Steps to Joining
recipeBurnKStream.leftJoin(
restaurantUnlockedKTable,
RecipeValueJoiners.joinRecipeToRestaurantUnlocked,
Joined.with(
stringSerde,enrichedEventSerde,longSerde)
);
27 Big Fish Confidential
Where are the join conditions?
Join Keys
KStream<String, EnrichedEvent> recipeBurnKStream
Joined with
KTable<String, Long> restaurantUnlockedKTable
on the Keys.
28 Big Fish Confidential
Value Joiner
public static ValueJoiner<EnrichedEvent, Long, EnrichedEvent>
joinRecipeToRestaurantUnlocked =
(e, restaurantsUnlocked) -> {
e.enrichedRecipeEvent.restaurantsUnlocked =
(restaurantsUnlocked == null) ?
-1L : restaurantsUnlocked;
return e;
};
29 Big Fish Confidential
• EnrichedEventSerde
• org.apache.kafka.common.serialization
interfaces
Custom Serialization
Joined.with(stringSerde,enrichedEventSerde
,longSerde)
30 Big Fish Confidential
Join Recap
o Keys are used for joining
o KStream<String, EnrichedEvent>
o KTable<String, Long>
o Value Joiners
o Return the number of restaurants
unlocked
o If null return -1
o Custom Serde for EnrichedEvent
31 Big Fish Confidential
Elastic Search Document
{
"_index": "letsdish-2018-19",
"_type": "recipes",
"_id": "f4858a61-cf4e-400c-
952e-6e940774e1ef",
"_score": 1,
"_source": {
"count": 1,
"restaurantScheduleId": "fr
ench",
"restaurantsAvailable": 5,
"installDate": "2018-05-
09",
"bookingsBin": "No
Monetization",
"bookingsBinLast30": "No
Monetization",
…
32 Big Fish Confidential
Elastic Search Bulk API
o Bulk Processing Greatly Increases the Index
Speed
o Two possible implementations of the Bulk
API
o Direct calls to the REST service
o Elastic Search Libraries
o BulkProcessor and RestClientBuilder
o Wrap lower level work
33 Big Fish Confidential
Continue to Build Real Time
Dashboards for Games

More Related Content

Similar to How Big Fish Games Developed Real-Time Analytics Using Kafka Streams and Elasticsearch

Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load BalancingOld version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load BalancingNAVER D2
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationVengata Guruswamy
 
Elastic stack upgrade
Elastic stack upgradeElastic stack upgrade
Elastic stack upgradeAnna Ossowski
 
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017Mike Nakhimovich
 
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...HostedbyConfluent
 
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.info
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.infoChunlei Wu BD2K 201601 MyGene.info and MyVariant.info
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.infoChunlei Wu
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJohn Anderson
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!C2B2 Consulting
 
JSR107 Come, Code, Cache, Compute!
JSR107 Come, Code, Cache, Compute! JSR107 Come, Code, Cache, Compute!
JSR107 Come, Code, Cache, Compute! Payara
 
Taming WebSocket with Scarlet
Taming WebSocket with ScarletTaming WebSocket with Scarlet
Taming WebSocket with ScarletZhixuan Lai
 
Refatorando com a API funcional do Java
Refatorando com a API funcional do JavaRefatorando com a API funcional do Java
Refatorando com a API funcional do JavaGiovane Liberato
 
Docker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and BittersDocker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and Bitterssmalltown
 
Building a Streaming Platform with Kafka
Building a Streaming Platform with KafkaBuilding a Streaming Platform with Kafka
Building a Streaming Platform with Kafkaconfluent
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXDocker, Inc.
 
Application Monitoring using Open Source: VictoriaMetrics - ClickHouse
Application Monitoring using Open Source: VictoriaMetrics - ClickHouseApplication Monitoring using Open Source: VictoriaMetrics - ClickHouse
Application Monitoring using Open Source: VictoriaMetrics - ClickHouseVictoriaMetrics
 
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Altinity Ltd
 
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKFastly
 
Building Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache KafkaBuilding Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache KafkaGuido Schmutz
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWSSungmin Kim
 
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Amazon Web Services
 

Similar to How Big Fish Games Developed Real-Time Analytics Using Kafka Streams and Elasticsearch (20)

Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load BalancingOld version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub Implementation
 
Elastic stack upgrade
Elastic stack upgradeElastic stack upgrade
Elastic stack upgrade
 
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
 
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
 
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.info
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.infoChunlei Wu BD2K 201601 MyGene.info and MyVariant.info
Chunlei Wu BD2K 201601 MyGene.info and MyVariant.info
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your Life
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!
 
JSR107 Come, Code, Cache, Compute!
JSR107 Come, Code, Cache, Compute! JSR107 Come, Code, Cache, Compute!
JSR107 Come, Code, Cache, Compute!
 
Taming WebSocket with Scarlet
Taming WebSocket with ScarletTaming WebSocket with Scarlet
Taming WebSocket with Scarlet
 
Refatorando com a API funcional do Java
Refatorando com a API funcional do JavaRefatorando com a API funcional do Java
Refatorando com a API funcional do Java
 
Docker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and BittersDocker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and Bitters
 
Building a Streaming Platform with Kafka
Building a Streaming Platform with KafkaBuilding a Streaming Platform with Kafka
Building a Streaming Platform with Kafka
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
Application Monitoring using Open Source: VictoriaMetrics - ClickHouse
Application Monitoring using Open Source: VictoriaMetrics - ClickHouseApplication Monitoring using Open Source: VictoriaMetrics - ClickHouse
Application Monitoring using Open Source: VictoriaMetrics - ClickHouse
 
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
 
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
 
Building Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache KafkaBuilding Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache Kafka
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWS
 
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
 

More from confluent

Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flinkconfluent
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flinkconfluent
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...confluent
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluentconfluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkconfluent
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloudconfluent
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Diveconfluent
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluentconfluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Meshconfluent
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservicesconfluent
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3confluent
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernizationconfluent
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataconfluent
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2confluent
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023confluent
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesisconfluent
 

More from confluent (20)

Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 

Recently uploaded (20)

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 

How Big Fish Games Developed Real-Time Analytics Using Kafka Streams and Elasticsearch

  • 1. How Big Fish Games Developed Real-Time Analytics Using Kafka Streams and Elastic Search
  • 2. 2 Big Fish Confidential Big Fish Games o Leading producer and distributor of casual games. o 2.5 billion games distributed to customers in 150 countries o 450 unique mobile games o 3500 unique PC games
  • 3. 3 Big Fish Confidential Cooking Craze
  • 4. 4 Big Fish Confidential Live Operations Real Time Dashboard Let’s Dish
  • 5. 5 Big Fish Confidential Live Ops and Free to Play Games o Monetization through “in app” purchases o Games evolve and are extended indefinitely o Live Operations o Games which allow real-time updates to improve the game or align to audiences needs
  • 6. 6 Big Fish Confidential Monitoring a Forced Update
  • 7. 7 Big Fish Confidential Monitoring New Content
  • 8. 8 Big Fish Confidential Monitoring Event Participation
  • 9. 9 Big Fish Confidential Kafka at Big Fish
  • 10. 10 Big Fish Confidential Let’s Dish Dashboards Data Sources o Game Telemetry Events from a Kafka Topic o restaurant leave , restaurant join o session start, session foreground, session background, session heartbeat o recipe complete, recipe burn o Hive Data o Install Date o bookings , bookings Last30 o channel Type o bfgudid
  • 11. 11 Big Fish Confidential Elastic Search Document{ "_index": "letsdish-2018-19", "_type": "recipes", "_id": "f4858a61-cf4e-400c-952e-6e940774e1ef", "_score": 1, "_source": { "count": 1, "restaurantScheduleId": "french", "restaurantsAvailable": 5, "installDate": "2018-05-09", "bookingsBin": "No Monetization", "bookingsBinLast30": "No Monetization", "channelType": "Organic", "environment": "prod", "appName": "LetsDish", "bfgudid": "f8e1d52b7a5edb26aafed418e2a25c6879766f9c", "platform": "android", "customUtc": 1526078368, "countryCode": "US", "appVersion": "42", "guid": "f4858a61-cf4e-400c-952e-6e940774e1ef“ (…) }, "fields": { "customUtc": [ "2018-05-11T22:39:28.000Z" ], "installDate": [ "2018-05-09T00:00:00.000Z" ] } }
  • 12. 12 Big Fish Confidential Two Streams APIs o Streams DSL o Abstraction of Processor API o Used for Let’s Dish Dashboards o Streams Processor API o More flexible o Finer control of stream processing
  • 13. 13 Big Fish Confidential Let’s Dish Streaming Transformation Topology
  • 14. 14 Big Fish Confidential Mapping, Filtering and Branching
  • 15. 15 Big Fish Confidential Map Function KeyValueMapper<String, String, <String,GtEvent>> Maps JSON String Value to Game Telemetry Pojo: GtEvent
  • 16. 16 Big Fish Confidential Java 8 Lambda Function Map Function public static KeyValueMapper<String, String, KeyValue<String, GtEvent>> mapStringToGtEvent = (k, v) -> { GtEvent gtEvent; try { gtEvent = new Gson().fromJson(v,GtEvent.class); } catch (Exception e) { gtEvent = new CustomEvent(); } return new KeyValue<String, GtEvent>(k, gtEvent); };
  • 17. 17 Big Fish Confidential Filter Predicates KStreams filter and branch methods take a Predicate interface KStream.filter(Predicate) KStream.branch(Predicate[])
  • 18. 18 Big Fish Confidential Java 8 Lambda Functions Filter Predicates public static Predicate<String, GtEvent> isRecipeComplete = (k, v) -> "recipe_complete".equals( v.data.eventName.toLowerCase()); public static Predicate<String, GtEvent> isSession = (k, v) -> Arrays.asList("session_start", "session_foreground", "session_background", "session_heartbeat") .contains(v.data.eventName.toLowerCase());
  • 19. 19 Big Fish Confidential Map and Filters Combined public static KStream<String, GtEvent>[] createBranchedStreams( KStream<String, String> source) { return source .map(Mappers.mapStringToGtEvent) .branch( FilterPredicates.isRecipeComplete, FilterPredicates.isRecipeBurn, FilterPredicates.isSession, FilterPredicates.isRestaurant); }
  • 20. 20 Big Fish Confidential Four KStreams o Recipe Burn o Recipe Complete o Restaurant Unlocked o Restaurant Names
  • 21. 21 Big Fish Confidential Aggregated Player Purchases Table Enhance KStreams with Hive Table ID FIRST INSTALL DATE BOOKINGS BIN BOOKINGS LAST 30 DAYS CHANNEL TYPE 1 9/12/2018 $1 <= $5 $1 <= $5 paid 2 9/12/2018 $5 <= $20 $5 <= $20 organic 3 9/12/2018 $1 <= $5 $1 <= $5 paid
  • 22. 22 Big Fish Confidential Kafka Topic
  • 23. 23 Big Fish Confidential Joining Streams
  • 24. 24 Big Fish Confidential Types of Joins o Windowed Join (No State) o KStream->KStream o Non-Windowed Joins (State Maintained ) o KStream->KTable o KTable->KTable
  • 25. 25 Big Fish Confidential Using Group By Key Creating a KTable from Kstream .groupByKey(Serialized.with(stringSerde,longSerde)) .reduce((oldValue, newValue) -> Math.max(oldValue, newValue), Materialized.<String, Long, KeyValueStore<Bytes, byte[]>> as("restaurants-unlocked-store") .withKeySerde(stringSerde) .withValueSerde(longSerde));
  • 26. 26 Big Fish Confidential Recipe Burn Stream to Restaurant Unlocked KTable Steps to Joining recipeBurnKStream.leftJoin( restaurantUnlockedKTable, RecipeValueJoiners.joinRecipeToRestaurantUnlocked, Joined.with( stringSerde,enrichedEventSerde,longSerde) );
  • 27. 27 Big Fish Confidential Where are the join conditions? Join Keys KStream<String, EnrichedEvent> recipeBurnKStream Joined with KTable<String, Long> restaurantUnlockedKTable on the Keys.
  • 28. 28 Big Fish Confidential Value Joiner public static ValueJoiner<EnrichedEvent, Long, EnrichedEvent> joinRecipeToRestaurantUnlocked = (e, restaurantsUnlocked) -> { e.enrichedRecipeEvent.restaurantsUnlocked = (restaurantsUnlocked == null) ? -1L : restaurantsUnlocked; return e; };
  • 29. 29 Big Fish Confidential • EnrichedEventSerde • org.apache.kafka.common.serialization interfaces Custom Serialization Joined.with(stringSerde,enrichedEventSerde ,longSerde)
  • 30. 30 Big Fish Confidential Join Recap o Keys are used for joining o KStream<String, EnrichedEvent> o KTable<String, Long> o Value Joiners o Return the number of restaurants unlocked o If null return -1 o Custom Serde for EnrichedEvent
  • 31. 31 Big Fish Confidential Elastic Search Document { "_index": "letsdish-2018-19", "_type": "recipes", "_id": "f4858a61-cf4e-400c- 952e-6e940774e1ef", "_score": 1, "_source": { "count": 1, "restaurantScheduleId": "fr ench", "restaurantsAvailable": 5, "installDate": "2018-05- 09", "bookingsBin": "No Monetization", "bookingsBinLast30": "No Monetization", …
  • 32. 32 Big Fish Confidential Elastic Search Bulk API o Bulk Processing Greatly Increases the Index Speed o Two possible implementations of the Bulk API o Direct calls to the REST service o Elastic Search Libraries o BulkProcessor and RestClientBuilder o Wrap lower level work
  • 33. 33 Big Fish Confidential Continue to Build Real Time Dashboards for Games