SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 

Dernier (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 

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