SlideShare a Scribd company logo
1 of 29
Our journey
into
scalable
Player-
engagement
platform
Idan Fridman
Idan Fridman
About me
● idan.frid@gmail.com / i.fridman@draftkings.com
● https://www.linkedin.com/in/idanfridman/
● www.idanfridman.com - Blog
Our Story
| 4
Who are we?
Blueribbon (acquired by draftkings DraftKings (NASDAQ: DKNG))
● Player engagement platform that leverage marketing tools to achieve better user engagement
Draftkings
● The biggest Daily Fantasy Sport company in the U.S
● Offer sports entertainment experience across 15 professional sports. In 8 countries
● Focus on American sports fan
| 5
Operator pains
● Diversity - All operators propose the same solution
● Loyalty - player loyalty and stickiness
● Engagement - Bonuses not making real impact.
| 6
How we solve it?
● Creating new marketing tool(s) that create better engagement platform
● The tools should not interfere the game itself
● Easy to integrate
Jackpot as a service
| 7
What is Jackpot?
1. Additional gaming tool similar to lottery but with different math algorithms
2. Placed live on top of the game where player (or multiple players) can see it
3. Accumulating until someone win and reseeding
| 8
Why Jackpots?
Attracting
● Players can win big prizes
● Winning amounts range from small prizes to very big ones
(Everyone has heard stories about people lucking out a mega
jackpot)
Additional Funnel to win
● Jackpots bring to players new ways to win prizes
● Additional “attraction” to the game-play itself
Play
Win
Marketing
● One of the strongest marketing tools for engagement and
retention players
Engage
| 9
How we leverage Jackpots
● Generic tool
● On top of all games and support diverse verticals
● High potential as a social tool for better player engagement
● Completely SaaS - easy integration (API’s, SDK, Scale)
Challenges
| 11
Our Challenges
Low Latency
• Fast responses
Scale
• Concurrency
• Availability
Persistency
• No data loss
• Transaction must be
completed
Atomicity
• All or Nothing (Distributed)
| 12
Platform Team mission
- Microservices - High
complexity and different data
sources
- Workflow - We have
sequence of events per
transaction that must occur
linearly
- Asynchronous
communication - Using
queues to enable persistency
and atomicity per one
component to another
Queuing
Consideration
s
| 14
Message Queue vs Streaming Broker
Characteristic Message Queue Streaming Broker
Granularity ● Queue delivers single message and ack is
per message
● Acknowledge granularity is per group of message
● Manual commit is for braves only
Retry management ● Retry is managed out of the box per
message
● Able to define number of attempts
● Can define DLQ
● No manage retry
Message re-consumed ability ● Once Acked, Queue message is deleted ● All messages are persisted and can be re-consumed
Horizontal scalability ● Not out of the box ● Scaling is out of the box
Popular Vendors ● RabbitMQ, SQS, ActiveMQ ● Kafka, Kinesis, Pulsar
Hybrid Pulsar / Infinitic
| 15
Kafka/Kinesis
• On Kineses - cant get multiple
consumers topics out of the box
with the SDK
RabbitMQ/ActiveMQ
• High maintenance on big clusters
• Performances implications when
enabling backups
SQS/SNS
• SaaS
• Not for low latency
• Client SDK
• High costs
Nice to know (By provider impl)
| 16
Decisions
Which road shall we take to meet our challenges
1. Mini-teams to benchmark different solutions
2. POC
3. Conclusions
| 17
The missing part(s)
Granularit
y
Work on group of
messages
Not available
Retry
manage
ment
Ability to stop
(limited by consumer)
Back
pressure
Kafka looks like the the only remaining choice for our problem but the default solution is not
sufficient for the overall requirements
Ways to solve with Kafka
| 19
How to solve with Kafka
Manage Retry:
Solution:
● Create additional Queue(s) for retry per original topic
● Consumers will re-dispatch to retry queue
Drawbacks:
● Duplicating topics can introduce additional load - adding costs
● Not able to backoff with Kafka
● You can't really create delay between one retry to another
● Not able to separate the retry mechanism from the actual service
Externalize
queue state
| 21
Extern Queue message state
To keep continue Kafka with it’s default configuration we need to think on another way to maintain the state outside
We need to choose data-source that can apply the following:
1. It has to be reliable
2. It has to be super-fast
3. It should be simple as a key-value store
4. Horizontal scale
Guess who?:)
| 22
Redis as queue state manager
● Fast write-> Redis has the ability to store and query values within ms’s which is required.
● Memory -> Leverage Redis zset(sortedSet) to store events in high efficiency (avoiding key’s
memory)
● Fast Query -> Using Redis sorted sets we can fast-query “old” entries.
Retry Set Tier 1
Score(TS) Event
213834863555 {...}
213834863545 {...}
Using zset we can “query”
values by score
E.g: get all records that are
between Score X to Score Y
| 23
Poll
messages
from kafka
Kafka
The crime scene (by steps)
Insert each
message to
zset
Redi
s
processing
logic work
Servi
ce
zrem from
zset
Redi
s
1. Retrieve “old” entries
2. Clone message &
Modify metadata
(counter, ts, etc)
3. Re-dispatch to same
topic
Adding
Messages to
local queue
Queu
e
Retrieve
from queue
(Diff thread
pool)
Servi
ce
Step 1: Poll messages from kafka to dedicated pool
Step 2: Using Auto-commit and insert each message to redis.
Step 3: Add messages to local queue(If full - backoff)
Step 4: Retrieve messages from local queue
Step 5: Process internal logic
Step 6: On success delete from redis
Step 7: Poll for old messages and apply retry logic
Step 1 Step 2 Step 3 Step 5
Step 4 Step 6
Step 7
Outcomes
| 25
Outcomes
● Retry -> We get retry out of the box as each message being monitored and cloned into new
one without the overhead of maintaining additional topics
● DLQ -> Can track messages counter and forward into DLQ once exhausted
● Backoff - Messages wont redispatch immediately
● We chose technologies we were already familiar with
| 26
Downsides
● Abstract work that has to be implemented and tested roughly
● Yet another datasource
● Not polyglot unless porting
| 27
“SDK” the logic
● Apply this logic on a common-level as SDK or shared-lib
● Make the data abstract as possible to allow generic messaging metadata (counter, source,
tracking, id’s)
● Testable and abstract for future maintenance
| 28
Moving forward
● Extend into custom back-pressure by adding more zset(s) handling
● Scale out redis to route zsets by event key(s)
THANK YOU
i.fridman@draftking
s.com
For any questions or to
join our journey :)
careers.draftkings.com

More Related Content

What's hot

Unit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and ReplicationUnit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and ReplicationDhivyaa C.R
 
Hhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityHhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityPete Siddall
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systemsmridul mishra
 
How to make data available for analytics ASAP
How to make data available for analytics ASAPHow to make data available for analytics ASAP
How to make data available for analytics ASAPMariaDB plc
 
InterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQInterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQDavid Ware
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryMarkTaylorIBM
 
High-Speed Reactive Microservices - trials and tribulations
High-Speed Reactive Microservices - trials and tribulationsHigh-Speed Reactive Microservices - trials and tribulations
High-Speed Reactive Microservices - trials and tribulationsRick Hightower
 
Distributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaDistributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaMax Alexejev
 
Using all of the high availability options in MariaDB
Using all of the high availability options in MariaDBUsing all of the high availability options in MariaDB
Using all of the high availability options in MariaDBMariaDB plc
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
IBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkIBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkDavid Ware
 
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersDavid Ware
 

What's hot (15)

Unit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and ReplicationUnit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and Replication
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Hhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityHhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availability
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
 
How to make data available for analytics ASAP
How to make data available for analytics ASAPHow to make data available for analytics ASAP
How to make data available for analytics ASAP
 
InterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQInterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQ
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster Recovery
 
High-Speed Reactive Microservices - trials and tribulations
High-Speed Reactive Microservices - trials and tribulationsHigh-Speed Reactive Microservices - trials and tribulations
High-Speed Reactive Microservices - trials and tribulations
 
Pileus
PileusPileus
Pileus
 
Distributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaDistributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and Scala
 
Using all of the high availability options in MariaDB
Using all of the high availability options in MariaDBUsing all of the high availability options in MariaDB
Using all of the high availability options in MariaDB
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
IBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkIBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ Network
 
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 

Similar to Our journey into scalable player engagement platform

Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...CodeScience
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka ServerlessKnoldus Inc.
 
Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016Peter Lawrey
 
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ Jitendra Bafna
 
Event driven architectures with Kinesis
Event driven architectures with KinesisEvent driven architectures with Kinesis
Event driven architectures with KinesisMark Harrison
 
Refactoring Applications for the XK7 and Future Hybrid Architectures
Refactoring Applications for the XK7 and Future Hybrid ArchitecturesRefactoring Applications for the XK7 and Future Hybrid Architectures
Refactoring Applications for the XK7 and Future Hybrid ArchitecturesJeff Larkin
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uberconfluent
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahujacamunda services GmbH
 
From prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioMáté Lang
 
High-Speed Reactive Microservices
High-Speed Reactive MicroservicesHigh-Speed Reactive Microservices
High-Speed Reactive MicroservicesRick Hightower
 
Manging scalability of distributed system
Manging scalability of distributed systemManging scalability of distributed system
Manging scalability of distributed systemAtin Mukherjee
 
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support Perspective
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support PerspectiveApache Kafka's Common Pitfalls & Intricacies: A Customer Support Perspective
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support PerspectiveHostedbyConfluent
 
Megastore: Providing scalable and highly available storage
Megastore: Providing scalable and highly available storageMegastore: Providing scalable and highly available storage
Megastore: Providing scalable and highly available storageNiels Claeys
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafkaconfluent
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explainedconfluent
 
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker Discovery
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker DiscoverytranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker Discovery
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker DiscoveryDavid Peyruc
 
BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesSrinath Perera
 
Bootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkBootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkDataWorks Summit
 

Similar to Our journey into scalable player engagement platform (20)

Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka Serverless
 
Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016
 
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
 
Event driven architectures with Kinesis
Event driven architectures with KinesisEvent driven architectures with Kinesis
Event driven architectures with Kinesis
 
Refactoring Applications for the XK7 and Future Hybrid Architectures
Refactoring Applications for the XK7 and Future Hybrid ArchitecturesRefactoring Applications for the XK7 and Future Hybrid Architectures
Refactoring Applications for the XK7 and Future Hybrid Architectures
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja
 
From prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.io
 
High-Speed Reactive Microservices
High-Speed Reactive MicroservicesHigh-Speed Reactive Microservices
High-Speed Reactive Microservices
 
Manging scalability of distributed system
Manging scalability of distributed systemManging scalability of distributed system
Manging scalability of distributed system
 
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support Perspective
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support PerspectiveApache Kafka's Common Pitfalls & Intricacies: A Customer Support Perspective
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support Perspective
 
SVCC-2014
SVCC-2014SVCC-2014
SVCC-2014
 
Megastore: Providing scalable and highly available storage
Megastore: Providing scalable and highly available storageMegastore: Providing scalable and highly available storage
Megastore: Providing scalable and highly available storage
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
 
Apache KAfka
Apache KAfkaApache KAfka
Apache KAfka
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker Discovery
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker DiscoverytranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker Discovery
tranSMART Community Meeting 5-7 Nov 13 - Session 3: Clinical Biomarker Discovery
 
BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple Spaces
 
Bootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkBootstrapping state in Apache Flink
Bootstrapping state in Apache Flink
 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Our journey into scalable player engagement platform

  • 2. Idan Fridman About me ● idan.frid@gmail.com / i.fridman@draftkings.com ● https://www.linkedin.com/in/idanfridman/ ● www.idanfridman.com - Blog
  • 4. | 4 Who are we? Blueribbon (acquired by draftkings DraftKings (NASDAQ: DKNG)) ● Player engagement platform that leverage marketing tools to achieve better user engagement Draftkings ● The biggest Daily Fantasy Sport company in the U.S ● Offer sports entertainment experience across 15 professional sports. In 8 countries ● Focus on American sports fan
  • 5. | 5 Operator pains ● Diversity - All operators propose the same solution ● Loyalty - player loyalty and stickiness ● Engagement - Bonuses not making real impact.
  • 6. | 6 How we solve it? ● Creating new marketing tool(s) that create better engagement platform ● The tools should not interfere the game itself ● Easy to integrate Jackpot as a service
  • 7. | 7 What is Jackpot? 1. Additional gaming tool similar to lottery but with different math algorithms 2. Placed live on top of the game where player (or multiple players) can see it 3. Accumulating until someone win and reseeding
  • 8. | 8 Why Jackpots? Attracting ● Players can win big prizes ● Winning amounts range from small prizes to very big ones (Everyone has heard stories about people lucking out a mega jackpot) Additional Funnel to win ● Jackpots bring to players new ways to win prizes ● Additional “attraction” to the game-play itself Play Win Marketing ● One of the strongest marketing tools for engagement and retention players Engage
  • 9. | 9 How we leverage Jackpots ● Generic tool ● On top of all games and support diverse verticals ● High potential as a social tool for better player engagement ● Completely SaaS - easy integration (API’s, SDK, Scale)
  • 11. | 11 Our Challenges Low Latency • Fast responses Scale • Concurrency • Availability Persistency • No data loss • Transaction must be completed Atomicity • All or Nothing (Distributed)
  • 12. | 12 Platform Team mission - Microservices - High complexity and different data sources - Workflow - We have sequence of events per transaction that must occur linearly - Asynchronous communication - Using queues to enable persistency and atomicity per one component to another
  • 14. | 14 Message Queue vs Streaming Broker Characteristic Message Queue Streaming Broker Granularity ● Queue delivers single message and ack is per message ● Acknowledge granularity is per group of message ● Manual commit is for braves only Retry management ● Retry is managed out of the box per message ● Able to define number of attempts ● Can define DLQ ● No manage retry Message re-consumed ability ● Once Acked, Queue message is deleted ● All messages are persisted and can be re-consumed Horizontal scalability ● Not out of the box ● Scaling is out of the box Popular Vendors ● RabbitMQ, SQS, ActiveMQ ● Kafka, Kinesis, Pulsar Hybrid Pulsar / Infinitic
  • 15. | 15 Kafka/Kinesis • On Kineses - cant get multiple consumers topics out of the box with the SDK RabbitMQ/ActiveMQ • High maintenance on big clusters • Performances implications when enabling backups SQS/SNS • SaaS • Not for low latency • Client SDK • High costs Nice to know (By provider impl)
  • 16. | 16 Decisions Which road shall we take to meet our challenges 1. Mini-teams to benchmark different solutions 2. POC 3. Conclusions
  • 17. | 17 The missing part(s) Granularit y Work on group of messages Not available Retry manage ment Ability to stop (limited by consumer) Back pressure Kafka looks like the the only remaining choice for our problem but the default solution is not sufficient for the overall requirements
  • 18. Ways to solve with Kafka
  • 19. | 19 How to solve with Kafka Manage Retry: Solution: ● Create additional Queue(s) for retry per original topic ● Consumers will re-dispatch to retry queue Drawbacks: ● Duplicating topics can introduce additional load - adding costs ● Not able to backoff with Kafka ● You can't really create delay between one retry to another ● Not able to separate the retry mechanism from the actual service
  • 21. | 21 Extern Queue message state To keep continue Kafka with it’s default configuration we need to think on another way to maintain the state outside We need to choose data-source that can apply the following: 1. It has to be reliable 2. It has to be super-fast 3. It should be simple as a key-value store 4. Horizontal scale Guess who?:)
  • 22. | 22 Redis as queue state manager ● Fast write-> Redis has the ability to store and query values within ms’s which is required. ● Memory -> Leverage Redis zset(sortedSet) to store events in high efficiency (avoiding key’s memory) ● Fast Query -> Using Redis sorted sets we can fast-query “old” entries. Retry Set Tier 1 Score(TS) Event 213834863555 {...} 213834863545 {...} Using zset we can “query” values by score E.g: get all records that are between Score X to Score Y
  • 23. | 23 Poll messages from kafka Kafka The crime scene (by steps) Insert each message to zset Redi s processing logic work Servi ce zrem from zset Redi s 1. Retrieve “old” entries 2. Clone message & Modify metadata (counter, ts, etc) 3. Re-dispatch to same topic Adding Messages to local queue Queu e Retrieve from queue (Diff thread pool) Servi ce Step 1: Poll messages from kafka to dedicated pool Step 2: Using Auto-commit and insert each message to redis. Step 3: Add messages to local queue(If full - backoff) Step 4: Retrieve messages from local queue Step 5: Process internal logic Step 6: On success delete from redis Step 7: Poll for old messages and apply retry logic Step 1 Step 2 Step 3 Step 5 Step 4 Step 6 Step 7
  • 25. | 25 Outcomes ● Retry -> We get retry out of the box as each message being monitored and cloned into new one without the overhead of maintaining additional topics ● DLQ -> Can track messages counter and forward into DLQ once exhausted ● Backoff - Messages wont redispatch immediately ● We chose technologies we were already familiar with
  • 26. | 26 Downsides ● Abstract work that has to be implemented and tested roughly ● Yet another datasource ● Not polyglot unless porting
  • 27. | 27 “SDK” the logic ● Apply this logic on a common-level as SDK or shared-lib ● Make the data abstract as possible to allow generic messaging metadata (counter, source, tracking, id’s) ● Testable and abstract for future maintenance
  • 28. | 28 Moving forward ● Extend into custom back-pressure by adding more zset(s) handling ● Scale out redis to route zsets by event key(s)
  • 29. THANK YOU i.fridman@draftking s.com For any questions or to join our journey :) careers.draftkings.com