SlideShare a Scribd company logo
1 of 19
Facebook Style Notifications Using HBase and
Event Streams
github.com/regunathb RegunathB
Serving User Intent (eCommerce)
• Mass targeted
(Low relevance)
– User Intent Captured
from: Browse, Buy,
Register
• Quantified,Time-bound
(Improved relevance)
– User Intent Derived from:
Category Affinity,
Recommendations
Serving User Intent (social)
Image Source : http://allfacebook.com/
• Near real-time
– Quick updates about
friends’ actions that most
affect you
• Relevant Actions
– Likes, Comments etc
• Personalized
– Content only from social
circle
• Non-invasive
– Users therefore tolerate less
relevant content as
compared to email
Notifications on Flipkart
Search, Browse
Add to Wish List
Add to Cart
Checkout/Buy
User Intent
derived from
Price Drop Notification
iPhone 5C
Price =42K
Price =44K
Price =39K
.
.
Time.
t2
t0
t1
t2
Solution 1 : Generate Notifications
on Demand
Gather
User
Intent
Retrieve
Current,
Past
Data
Intents
Data store
• Pros
• Perceived optimal resource utilization
• Cons
• Gathering, Processing and Serving coupled
• Read path is computationally expensive
• High latency
• Need versioning support on Product data
• Repeated computations Product
Data store
Create Notifications on Visits
Solution 2 : Pre-create in Real-time,
Serve on Demand
What Leads to a Notification?
Intent (interest expressed by the user) â‹‚ Event (price changes ) => Notification
(Intersection of millions of User Intent and Product Changes)
Intent Event
Stream
Change Event
Stream
Notifications
Intent
Capturing
System
Event
Processing
System
Notification
Serving
System
Intents,
Notifications
Product
changes
append
create
update
expire
Event based Pre-processing Near real-time Serving
read
Pre-create, Serve on Demand
SEDA, Filtering using CEP
Filtered
event
processing
Intents
Product
changes
Facts,
Notifications
CEP
Engine
intermediate stages
intermediate stages
Extract
unique
interests
The Data Store
• Store large sets of data
– Products(P) 10s M
– Users(U) 10s M
– Activity(I = U X P) 100s M
– Events/day (E = P + U) 10s M
– Notifications (N = E ⋂ I) >100 M (in total)
• High write throughput
• High read throughput for sets of data
– Intents: user pivoted, Facts: product pivoted
• Low latency reads
– Notifications – user pivoted, ordered by recency
The Data Store - HBase
U:USERID_A:TIMESTAMP:PRICE_DROP:MOBDSGU2ZMDYENQ
U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDSGU2ZMDYENQ
U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDQ9VXXXX6NF8V
U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDP6W6MCUWCF
U:USERID_C:TIMESTAMP:PRICE_DROP:MOBDQ9VXXXX6NF8V
LSM Tree
Row key design for Notifications table
Image Sources : http://blog.sematext.com/,
http://dailyjs.com/
• Benefits of keeping related
data together
– Minimize disk seek for rows
read
– Rows may be returned from
Block cache, MemStore
Intent Capturing
System
Event Processing
System
Notification Serving
System
HBase
(Intents,
Notifications)
Product
changes
append
create
update
expire
Event based Pre-processing Near real-time Serving
read
Tech Stack
Trooper
Batch
W3 via
Phanto
m
Trooper SEDA
(RabbitMQ, Mule),
CEP (Esper)
Phantom Flipcast
CeryxTomcat
CDNMemcached
Tech Stack
• Phantom – Reverse proxy for latency sensitive user actions
• Trooper Batch – Cron jobs
• Trooper SEDA – Distributed, Event processing
• FlipCast – Platform agnostic multi-cast notifications
• RabbitMQ – Integration, Work distribution
• Esper – Complex Event Processing (Filtering/Matching)
• HBase – Data store
• Tomcat – REST services container for Notifications
• Ceryx – Target Group generation, User preferences
Flipkart OSS Public domain OSS Closed source
Operating Notifications
A/B framework
Phantom: Intent
Capture
Phantom: Serve
Notifications
Trooper Batch : Jobs
• Monitoring consoles
– RabbitMQ queues
– FQ service
– Graphite
– Nagios
– Omniture tracking
– Trooper SEDA & Batch
consoles
Tweeple Reactions
Recap
• Pros
– Low latency read-path, resilience to failure (ok to not show
notifications for some users)
– Scales well (LSM trees, KV store, SEDA, CDN for images)
– Immutable Facts, Change Events stored in append-only data store
provides ability to re-compute notifications
• Cons
– Consistency challenges
•HBase has strong consistency (single write master) but Notification
source data can change – leading to Eventual Consistency
– Pre-creating Notifications that may never be seen (cost of storage)
References
• HBase : The Definitive Guide (http://www.flipkart.com/hbase-definitive-
guide/p/itmd36cuhzdfq4za?pid=DGBDTYAYB3PNSGYN )
• Block cache 101(http://hortonworks.com/blog/hbase-blockcache-101/)
• Trooper (https://github.com/regunathb/Trooper)
• Flipkart Phantom (https://github.com/Flipkart/phantom)
• Facebook messages & Hbase
(http://www.slideshare.net/brizzzdotcom/facebook-messages-hbase)

More Related Content

What's hot

FOSSASIA 2016 - 7 Tips to design web centric high-performance applications
FOSSASIA 2016 - 7 Tips to design web centric high-performance applicationsFOSSASIA 2016 - 7 Tips to design web centric high-performance applications
FOSSASIA 2016 - 7 Tips to design web centric high-performance applicationsAshnikbiz
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...confluent
 
Webinar: MongoDB and Hadoop - Working Together to provide Business Insights
Webinar: MongoDB and Hadoop - Working Together to provide Business InsightsWebinar: MongoDB and Hadoop - Working Together to provide Business Insights
Webinar: MongoDB and Hadoop - Working Together to provide Business InsightsMongoDB
 
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsight
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsightHBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsight
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsightHBaseCon
 
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...HBaseCon
 
Couchbase@live person meetup july 22nd
Couchbase@live person meetup   july 22ndCouchbase@live person meetup   july 22nd
Couchbase@live person meetup july 22ndIdo Shilon
 
Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...
 Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart... Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...
Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...Ashish Tadose
 
Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Ashish Tadose
 
Ramunas Balukonis. Research DWH
Ramunas Balukonis. Research DWHRamunas Balukonis. Research DWH
Ramunas Balukonis. Research DWHVolha Banadyseva
 
Data streaming-systems
Data streaming-systemsData streaming-systems
Data streaming-systemsimcpune
 
Stream processing at Hotstar
Stream processing at HotstarStream processing at Hotstar
Stream processing at HotstarKafkaZone
 
Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines	Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines MongoDB
 
Membase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase
 
Column and hadoop
Column and hadoopColumn and hadoop
Column and hadoopAlex Jiang
 
Data Management on Hadoop at Yahoo!
Data Management on Hadoop at Yahoo!Data Management on Hadoop at Yahoo!
Data Management on Hadoop at Yahoo!Seetharam Venkatesh
 
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)MongoDB
 

What's hot (20)

FOSSASIA 2016 - 7 Tips to design web centric high-performance applications
FOSSASIA 2016 - 7 Tips to design web centric high-performance applicationsFOSSASIA 2016 - 7 Tips to design web centric high-performance applications
FOSSASIA 2016 - 7 Tips to design web centric high-performance applications
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
 
Webinar: MongoDB and Hadoop - Working Together to provide Business Insights
Webinar: MongoDB and Hadoop - Working Together to provide Business InsightsWebinar: MongoDB and Hadoop - Working Together to provide Business Insights
Webinar: MongoDB and Hadoop - Working Together to provide Business Insights
 
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsight
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsightHBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsight
HBaseCon 2015: Optimizing HBase for the Cloud in Microsoft Azure HDInsight
 
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...
HBaseCon2017 Splice Machine as a Service: Multi-tenant HBase using DCOS (Meso...
 
Couchbase@live person meetup july 22nd
Couchbase@live person meetup   july 22ndCouchbase@live person meetup   july 22nd
Couchbase@live person meetup july 22nd
 
Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...
 Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart... Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...
Distributed Query Service Powered By Presto & Alluxio Across Clouds @Walmart...
 
Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud
 
Ramunas Balukonis. Research DWH
Ramunas Balukonis. Research DWHRamunas Balukonis. Research DWH
Ramunas Balukonis. Research DWH
 
Data streaming-systems
Data streaming-systemsData streaming-systems
Data streaming-systems
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
 
Stream processing at Hotstar
Stream processing at HotstarStream processing at Hotstar
Stream processing at Hotstar
 
Google mesa
Google mesaGoogle mesa
Google mesa
 
Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines	Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines
 
RubiX
RubiXRubiX
RubiX
 
Membase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San Francisco
 
Column and hadoop
Column and hadoopColumn and hadoop
Column and hadoop
 
Data Management on Hadoop at Yahoo!
Data Management on Hadoop at Yahoo!Data Management on Hadoop at Yahoo!
Data Management on Hadoop at Yahoo!
 
Practical Use of a NoSQL
Practical Use of a NoSQLPractical Use of a NoSQL
Practical Use of a NoSQL
 
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)
Migrating from RDBMS to MongoDB Atlas - Texas American Resources Company (TARC)
 

Viewers also liked

Srikanth Nadhamuni
Srikanth NadhamuniSrikanth Nadhamuni
Srikanth Nadhamunieletseditorial
 
Aadhaar at 5th_elephant_v3
Aadhaar at 5th_elephant_v3Aadhaar at 5th_elephant_v3
Aadhaar at 5th_elephant_v3Regunath B
 
practical risks in aadhaar project and measures to overcome them
practical risks in aadhaar project and measures to overcome thempractical risks in aadhaar project and measures to overcome them
practical risks in aadhaar project and measures to overcome themsaipriyadonthula
 
Hadoop at aadhaar
Hadoop at aadhaarHadoop at aadhaar
Hadoop at aadhaarRegunath B
 
Building the Flipkart phantom
Building the Flipkart phantomBuilding the Flipkart phantom
Building the Flipkart phantomRegunath B
 
Uid
UidUid
UidTech_MX
 
What database
What databaseWhat database
What databaseRegunath B
 
Unique identification authority of india uid
Unique identification authority of india   uidUnique identification authority of india   uid
Unique identification authority of india uidAjit Dadresa
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Ali Raw
 

Viewers also liked (10)

Srikanth Nadhamuni
Srikanth NadhamuniSrikanth Nadhamuni
Srikanth Nadhamuni
 
Aadhaar
AadhaarAadhaar
Aadhaar
 
Aadhaar at 5th_elephant_v3
Aadhaar at 5th_elephant_v3Aadhaar at 5th_elephant_v3
Aadhaar at 5th_elephant_v3
 
practical risks in aadhaar project and measures to overcome them
practical risks in aadhaar project and measures to overcome thempractical risks in aadhaar project and measures to overcome them
practical risks in aadhaar project and measures to overcome them
 
Hadoop at aadhaar
Hadoop at aadhaarHadoop at aadhaar
Hadoop at aadhaar
 
Building the Flipkart phantom
Building the Flipkart phantomBuilding the Flipkart phantom
Building the Flipkart phantom
 
Uid
UidUid
Uid
 
What database
What databaseWhat database
What database
 
Unique identification authority of india uid
Unique identification authority of india   uidUnique identification authority of india   uid
Unique identification authority of india uid
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)
 

Similar to Facebook style notifications using hbase and event streams

29.4 Mb
29.4 Mb29.4 Mb
29.4 Mbguru100
 
Big Data and the Next Best Offer
Big Data and the Next Best OfferBig Data and the Next Best Offer
Big Data and the Next Best OfferMichel Bruley
 
Events & Microservices
Events & MicroservicesEvents & Microservices
Events & MicroservicesYamen Sader
 
Big Data Paris - A Modern Enterprise Architecture
Big Data Paris - A Modern Enterprise ArchitectureBig Data Paris - A Modern Enterprise Architecture
Big Data Paris - A Modern Enterprise ArchitectureMongoDB
 
IEEE.BigData.Tutorial.2.slides
IEEE.BigData.Tutorial.2.slidesIEEE.BigData.Tutorial.2.slides
IEEE.BigData.Tutorial.2.slidesNish Parikh
 
Large scale Click-streaming and tranaction log mining
Large scale Click-streaming and tranaction log miningLarge scale Click-streaming and tranaction log mining
Large scale Click-streaming and tranaction log miningitstuff
 
RedisConf17 - Redis Powers Next-gen Ambient Intelligence Platform
RedisConf17 - Redis Powers Next-gen Ambient Intelligence PlatformRedisConf17 - Redis Powers Next-gen Ambient Intelligence Platform
RedisConf17 - Redis Powers Next-gen Ambient Intelligence PlatformRedis Labs
 
Online retail a look at data consulting approach
Online retail   a look at data consulting approachOnline retail   a look at data consulting approach
Online retail a look at data consulting approachShesha R
 
Wikibon #IoT #HyperConvergence Presentation via @theCUBE
Wikibon #IoT #HyperConvergence Presentation via @theCUBE Wikibon #IoT #HyperConvergence Presentation via @theCUBE
Wikibon #IoT #HyperConvergence Presentation via @theCUBE John Furrier
 
Hyper-Convergence CrowdChat
Hyper-Convergence CrowdChatHyper-Convergence CrowdChat
Hyper-Convergence CrowdChatWikibon Community
 
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022Jim Dowling
 
WebAction In-Memory Computing Summit 2015
WebAction In-Memory Computing Summit 2015WebAction In-Memory Computing Summit 2015
WebAction In-Memory Computing Summit 2015WebAction
 
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Catch Them in the Act: CEP for Real-time Ecommerce InfluenceCatch Them in the Act: CEP for Real-time Ecommerce Influence
Catch Them in the Act: CEP for Real-time Ecommerce InfluenceWSO2
 
1 content optimization-hug-2010-07-21
1 content optimization-hug-2010-07-211 content optimization-hug-2010-07-21
1 content optimization-hug-2010-07-21Hadoop User Group
 
Recommender System at Scale Using HBase and Hadoop
Recommender System at Scale Using HBase and HadoopRecommender System at Scale Using HBase and Hadoop
Recommender System at Scale Using HBase and HadoopDataWorks Summit
 
Kafka and Stream Processing, Taking Analytics Real-time, Mike Spicer
Kafka and Stream Processing, Taking Analytics Real-time, Mike SpicerKafka and Stream Processing, Taking Analytics Real-time, Mike Spicer
Kafka and Stream Processing, Taking Analytics Real-time, Mike Spicerconfluent
 
Magento Web API Ecosystem. Imagine 2018
Magento Web API Ecosystem. Imagine 2018Magento Web API Ecosystem. Imagine 2018
Magento Web API Ecosystem. Imagine 2018Vrann Tulika
 

Similar to Facebook style notifications using hbase and event streams (20)

29.4 mb
29.4 mb29.4 mb
29.4 mb
 
29.4 Mb
29.4 Mb29.4 Mb
29.4 Mb
 
Big Data and the Next Best Offer
Big Data and the Next Best OfferBig Data and the Next Best Offer
Big Data and the Next Best Offer
 
Events & Microservices
Events & MicroservicesEvents & Microservices
Events & Microservices
 
Big Data Paris - A Modern Enterprise Architecture
Big Data Paris - A Modern Enterprise ArchitectureBig Data Paris - A Modern Enterprise Architecture
Big Data Paris - A Modern Enterprise Architecture
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
Big data technologies with Case Study Finance and Healthcare
Big data technologies with Case Study Finance and HealthcareBig data technologies with Case Study Finance and Healthcare
Big data technologies with Case Study Finance and Healthcare
 
IEEE.BigData.Tutorial.2.slides
IEEE.BigData.Tutorial.2.slidesIEEE.BigData.Tutorial.2.slides
IEEE.BigData.Tutorial.2.slides
 
Large scale Click-streaming and tranaction log mining
Large scale Click-streaming and tranaction log miningLarge scale Click-streaming and tranaction log mining
Large scale Click-streaming and tranaction log mining
 
RedisConf17 - Redis Powers Next-gen Ambient Intelligence Platform
RedisConf17 - Redis Powers Next-gen Ambient Intelligence PlatformRedisConf17 - Redis Powers Next-gen Ambient Intelligence Platform
RedisConf17 - Redis Powers Next-gen Ambient Intelligence Platform
 
Online retail a look at data consulting approach
Online retail   a look at data consulting approachOnline retail   a look at data consulting approach
Online retail a look at data consulting approach
 
Wikibon #IoT #HyperConvergence Presentation via @theCUBE
Wikibon #IoT #HyperConvergence Presentation via @theCUBE Wikibon #IoT #HyperConvergence Presentation via @theCUBE
Wikibon #IoT #HyperConvergence Presentation via @theCUBE
 
Hyper-Convergence CrowdChat
Hyper-Convergence CrowdChatHyper-Convergence CrowdChat
Hyper-Convergence CrowdChat
 
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
 
WebAction In-Memory Computing Summit 2015
WebAction In-Memory Computing Summit 2015WebAction In-Memory Computing Summit 2015
WebAction In-Memory Computing Summit 2015
 
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Catch Them in the Act: CEP for Real-time Ecommerce InfluenceCatch Them in the Act: CEP for Real-time Ecommerce Influence
Catch Them in the Act: CEP for Real-time Ecommerce Influence
 
1 content optimization-hug-2010-07-21
1 content optimization-hug-2010-07-211 content optimization-hug-2010-07-21
1 content optimization-hug-2010-07-21
 
Recommender System at Scale Using HBase and Hadoop
Recommender System at Scale Using HBase and HadoopRecommender System at Scale Using HBase and Hadoop
Recommender System at Scale Using HBase and Hadoop
 
Kafka and Stream Processing, Taking Analytics Real-time, Mike Spicer
Kafka and Stream Processing, Taking Analytics Real-time, Mike SpicerKafka and Stream Processing, Taking Analytics Real-time, Mike Spicer
Kafka and Stream Processing, Taking Analytics Real-time, Mike Spicer
 
Magento Web API Ecosystem. Imagine 2018
Magento Web API Ecosystem. Imagine 2018Magento Web API Ecosystem. Imagine 2018
Magento Web API Ecosystem. Imagine 2018
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Facebook style notifications using hbase and event streams

  • 1. Facebook Style Notifications Using HBase and Event Streams github.com/regunathb RegunathB
  • 2. Serving User Intent (eCommerce) • Mass targeted (Low relevance) – User Intent Captured from: Browse, Buy, Register • Quantified,Time-bound (Improved relevance) – User Intent Derived from: Category Affinity, Recommendations
  • 3. Serving User Intent (social) Image Source : http://allfacebook.com/ • Near real-time – Quick updates about friends’ actions that most affect you • Relevant Actions – Likes, Comments etc • Personalized – Content only from social circle • Non-invasive – Users therefore tolerate less relevant content as compared to email
  • 4. Notifications on Flipkart Search, Browse Add to Wish List Add to Cart Checkout/Buy User Intent derived from
  • 5. Price Drop Notification iPhone 5C Price =42K Price =44K Price =39K . . Time. t2 t0 t1 t2
  • 6. Solution 1 : Generate Notifications on Demand
  • 7. Gather User Intent Retrieve Current, Past Data Intents Data store • Pros • Perceived optimal resource utilization • Cons • Gathering, Processing and Serving coupled • Read path is computationally expensive • High latency • Need versioning support on Product data • Repeated computations Product Data store Create Notifications on Visits
  • 8. Solution 2 : Pre-create in Real-time, Serve on Demand
  • 9. What Leads to a Notification? Intent (interest expressed by the user) â‹‚ Event (price changes ) => Notification (Intersection of millions of User Intent and Product Changes) Intent Event Stream Change Event Stream Notifications
  • 11. SEDA, Filtering using CEP Filtered event processing Intents Product changes Facts, Notifications CEP Engine intermediate stages intermediate stages Extract unique interests
  • 12. The Data Store • Store large sets of data – Products(P) 10s M – Users(U) 10s M – Activity(I = U X P) 100s M – Events/day (E = P + U) 10s M – Notifications (N = E â‹‚ I) >100 M (in total) • High write throughput • High read throughput for sets of data – Intents: user pivoted, Facts: product pivoted • Low latency reads – Notifications – user pivoted, ordered by recency
  • 13. The Data Store - HBase U:USERID_A:TIMESTAMP:PRICE_DROP:MOBDSGU2ZMDYENQ U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDSGU2ZMDYENQ U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDQ9VXXXX6NF8V U:USERID_B:TIMESTAMP:PRICE_DROP:MOBDP6W6MCUWCF U:USERID_C:TIMESTAMP:PRICE_DROP:MOBDQ9VXXXX6NF8V LSM Tree Row key design for Notifications table Image Sources : http://blog.sematext.com/, http://dailyjs.com/ • Benefits of keeping related data together – Minimize disk seek for rows read – Rows may be returned from Block cache, MemStore
  • 14. Intent Capturing System Event Processing System Notification Serving System HBase (Intents, Notifications) Product changes append create update expire Event based Pre-processing Near real-time Serving read Tech Stack Trooper Batch W3 via Phanto m Trooper SEDA (RabbitMQ, Mule), CEP (Esper) Phantom Flipcast CeryxTomcat CDNMemcached
  • 15. Tech Stack • Phantom – Reverse proxy for latency sensitive user actions • Trooper Batch – Cron jobs • Trooper SEDA – Distributed, Event processing • FlipCast – Platform agnostic multi-cast notifications • RabbitMQ – Integration, Work distribution • Esper – Complex Event Processing (Filtering/Matching) • HBase – Data store • Tomcat – REST services container for Notifications • Ceryx – Target Group generation, User preferences Flipkart OSS Public domain OSS Closed source
  • 16. Operating Notifications A/B framework Phantom: Intent Capture Phantom: Serve Notifications Trooper Batch : Jobs • Monitoring consoles – RabbitMQ queues – FQ service – Graphite – Nagios – Omniture tracking – Trooper SEDA & Batch consoles
  • 18. Recap • Pros – Low latency read-path, resilience to failure (ok to not show notifications for some users) – Scales well (LSM trees, KV store, SEDA, CDN for images) – Immutable Facts, Change Events stored in append-only data store provides ability to re-compute notifications • Cons – Consistency challenges •HBase has strong consistency (single write master) but Notification source data can change – leading to Eventual Consistency – Pre-creating Notifications that may never be seen (cost of storage)
  • 19. References • HBase : The Definitive Guide (http://www.flipkart.com/hbase-definitive- guide/p/itmd36cuhzdfq4za?pid=DGBDTYAYB3PNSGYN ) • Block cache 101(http://hortonworks.com/blog/hbase-blockcache-101/) • Trooper (https://github.com/regunathb/Trooper) • Flipkart Phantom (https://github.com/Flipkart/phantom) • Facebook messages & Hbase (http://www.slideshare.net/brizzzdotcom/facebook-messages-hbase)