SlideShare a Scribd company logo
Real Time Big Data With Storm,
Cassandra, and In-Memory Computing
Nati Shalom @natishalom
DeWayne Filppi @dfilppi
Introduction to Real Time Analytics
Homeland Security
Real Time Search
Social
eCommerce
User Tracking &
Engagement
Financial Services
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved2
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved3
The Two Vs of Big Data
Velocity Volume
The Flavors of Big Data Analytics
Counting Correlating Research
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved4
It’s All about Timing
• Event driven / stream processing
• High resolution – every tweet gets counted
• Ad-hoc querying
• Medium resolution (aggregations)
• Long running batch jobs (ETL, map/reduce)
• Low resolution (trends & patterns)
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved5
This is what
we’re here
to discuss 
Facebook & Twitter Real Time Analytics
FACEBOOK REAL-TIME
ANALYTICS SYSTEM
(LOGGING CENTRIC APPROACH)
7
The actual analytics..
 Like button analytics
 Comments box analytics
8
® Copyright 2011 Gigaspaces Ltd. All Rights
PTail
Scribe
Puma
Hbase
FACEBOOK
Log
FACEBOOK
Log
FACEBOOK
Log
HDFS
Real Time Long Term
Batch
1.5 Sec
Facebook architecture..
10,000
write/sec
per server
TWITTER REAL-TIME
ANALYTICS SYSTEM
(EVENT DRIVEN APPROACH)
10
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved11
URL Mentions – Here’s One Use Case
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved12
Twitter Real Time Analytics based on Storm
Comparing the two approaches..
Facebook
 Rely on Hadoop for Real
Time and Batch
 RT = 10’s Sec
 Suits for Simple processing
 Low parallelization
Twitter
 Use Hadoop for Batch and
Storm for real time
 RT = Msec, Sec
 Suits for Complex
processing
 Extremely parallel
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved13
This is what
we’re here
to discuss 
Introduction
to Storm
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved14
 Popular open source, real time, in-memory, streaming
computation platform.
 Includes distributed runtime and intuitive API for defining
distributed processing flows.
 Scalable and fault tolerant.
 Developed at BackType,
and open sourced by Twitter
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved15
Storm Background
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved16
Storm Cluster
 Streams
 Unbounded sequence of tuples
 Spouts
 Source of streams (Queues)
 Bolts
 Functions, Filters, Joins, Aggregations
 Topologies
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved17
Storm Concepts
Spouts
Bolt
Topologies
Challenge – Word Count
Word:Count
Tweets
Count
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved18
• Hottest topics
• URL mentions
• etc.
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved19
Streaming word count with Storm
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved20
Computing Reach with Event Streams
But where is my
Big
Data?
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved21
Bolt
Bolt
Spout
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved22
The Big Picture …
Twitter
feed
Twitter
Feed
Twiter
Feed
Web
Activity
Web
Activity
Web
Activity
Analytics Data
Research
Data
Counters
Reference
Data
StormData feeds (Kafka, Twitter,..) Cassandra, MongoDB, Hbase,..
End to End Latency
 Storm performance and reliability
 Assumes success is normal
 Uses batching and pipelining for performance
 Storm plug-ins has significant effect on performance and
reliability
 Spout must be able to replay tuples on demand in case of error.
 Storm uses topology semantics for ensuring consistency
through event ordering
 Can be tedious for handling counters
 Doesn’t ensure the state of the counters
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved23
Your as as strong as your weakest link
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved24
Typical user experience…
Now, Kafka is *fast*. When running the Kafka
Spout by itself, I easily reproduced Kafka's claim
that you can consume "hundreds of thousands
of messages per second".
When I first fired up the topology, things went
well for the first minute, but then quickly
crashedas the Kafka spout emitted too
fast for the Cassandra Bolt to keep up. Even
though Cassandra is fast as well, it is still
orders of magnitude slower
than Kafka
Source: A Big Data Trifecta: Storm, Kafka and Cassandra. Brian Oniells Blog
What if we could put
everything In Memory?
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved25
An Alternative Approach
Did you know?
Facebook keeps 80%
of its data in
Memory
(Stanford research)
RAM is 100-1000x
faster than Disk
(Random seek)
• Disk: 5 -10ms
• RAM: ~0.001msec
 RAM is the new disk
 Data partitioned across a cluster
 Large “virtual” memory space
 Transactional
 Highly available
 Code with Data
In Memory Data Grid Review
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved27
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved28
Integrating with Storm
Bolt
Bolt
Spout
Web
Activity
Web
Activity
Web
Activity
Analytics Data
Research
Data
Counters
Reference
Data
In Memory Data Grid
(via Storm Trident State plug-in)
In Memory Data Stream
(Via Storm Spout Plugin)
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved29
In Memory Streaming Word Count with Storm
Storm has a simple builder
interface to creating
stream processing
topologies
Storm delegates
persistence to external
providers
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved30
Integrating with Hadoop, NoSQL DB..
Bolt
Bolt
Spout
Web
Activity
Web
Activity
Web
Activity
Analytics Data
Research
Data
Counters
Reference
Data
In Memory Data GridIn Memory Data Stream Storm Plugin
Hadoop, NoSQL, RDBMS,…
Write Behind
LRU based Policy
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved31
Live Demo – Word Count At In Memory Speed
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved32
Recent Benchmarks..
Gresham Computing plc, achieved over 50,000
equity trade transactions per second of load and match into
a database.
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved33
® Copyright 2013 Gigaspaces Ltd. All Rights Reserved34
References
 Try the Cloudify recipe
 Download Cloudify : http://www.cloudifysource.org/
 Download the Recipe (apps/xapstream, services/xapstream):
– https://github.com/CloudifySource/cloudify-recipes
 XAP – Cassandra Interface Details;
 http://wiki.gigaspaces.com/wiki/display/XAP95/Cassandra+Space+Persistency
 Check out the source for the XAP Spout and a sample state
implementation backed by XAP, and a Storm friendly streaming
implemention on github:
 https://github.com/Gigaspaces/storm-integration
 For more background on the effort, check out my recent blog posts at
http://blog.gigaspaces.com/
 http://blog.gigaspaces.com/gigaspaces-and-storm-part-1-storm-clouds/
 http://blog.gigaspaces.com/gigaspaces-and-storm-part-2-xap-integration/
 Part 3 coming soon.

More Related Content

What's hot (20)

PDF
Apache Storm Concepts
André Dias
 
PDF
Storm: distributed and fault-tolerant realtime computation
nathanmarz
 
PPTX
Yahoo compares Storm and Spark
Chicago Hadoop Users Group
 
PPS
Storm presentation
Shyam Raj
 
PDF
Real-time streams and logs with Storm and Kafka
Andrew Montalenti
 
PPTX
Scaling Apache Storm (Hadoop Summit 2015)
Robert Evans
 
PPTX
Multi-Tenant Storm Service on Hadoop Grid
DataWorks Summit
 
PPTX
Apache Storm 0.9 basic training - Verisign
Michael Noll
 
PDF
Realtime Analytics with Storm and Hadoop
DataWorks Summit
 
PDF
Storm: The Real-Time Layer - GlueCon 2012
Dan Lynn
 
PPTX
Cassandra and Storm at Health Market Sceince
P. Taylor Goetz
 
PDF
Introduction to Twitter Storm
Uwe Printz
 
PDF
Scaling Apache Storm - Strata + Hadoop World 2014
P. Taylor Goetz
 
PPTX
Apache Storm Internals
Humoyun Ahmedov
 
PPTX
Storm-on-YARN: Convergence of Low-Latency and Big-Data
DataWorks Summit
 
PPTX
Slide #1:Introduction to Apache Storm
Md. Shamsur Rahim
 
PDF
Storm Real Time Computation
Sonal Raj
 
PPT
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Folio3 Software
 
PDF
Storm: Distributed and fault tolerant realtime computation
Ferran Galí Reniu
 
PDF
Real-Time Analytics with Kafka, Cassandra and Storm
John Georgiadis
 
Apache Storm Concepts
André Dias
 
Storm: distributed and fault-tolerant realtime computation
nathanmarz
 
Yahoo compares Storm and Spark
Chicago Hadoop Users Group
 
Storm presentation
Shyam Raj
 
Real-time streams and logs with Storm and Kafka
Andrew Montalenti
 
Scaling Apache Storm (Hadoop Summit 2015)
Robert Evans
 
Multi-Tenant Storm Service on Hadoop Grid
DataWorks Summit
 
Apache Storm 0.9 basic training - Verisign
Michael Noll
 
Realtime Analytics with Storm and Hadoop
DataWorks Summit
 
Storm: The Real-Time Layer - GlueCon 2012
Dan Lynn
 
Cassandra and Storm at Health Market Sceince
P. Taylor Goetz
 
Introduction to Twitter Storm
Uwe Printz
 
Scaling Apache Storm - Strata + Hadoop World 2014
P. Taylor Goetz
 
Apache Storm Internals
Humoyun Ahmedov
 
Storm-on-YARN: Convergence of Low-Latency and Big-Data
DataWorks Summit
 
Slide #1:Introduction to Apache Storm
Md. Shamsur Rahim
 
Storm Real Time Computation
Sonal Raj
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Folio3 Software
 
Storm: Distributed and fault tolerant realtime computation
Ferran Galí Reniu
 
Real-Time Analytics with Kafka, Cassandra and Storm
John Georgiadis
 

Viewers also liked (20)

PDF
Customer value analysis of big data products
Vikas Sardana
 
PDF
Storm Persistence and Real-Time Analytics
Aerospike, Inc.
 
PDF
Stream processing using Apache Storm - Big Data Meetup Athens 2016
Adrianos Dadis
 
PDF
How to create intelligent Business Processes thanks to Big Data (BPM, Apache ...
Kai Wähner
 
PDF
Big Data Real Time Applications
DataWorks Summit
 
PDF
Next-Generation BPM - How to create intelligent Business Processes thanks to ...
Kai Wähner
 
PPTX
A taste of Snowplow Analytics data
Robert Kingston
 
PPTX
Why use big data tools to do web analytics? And how to do it using Snowplow a...
yalisassoon
 
PDF
Brand strategy
Zaid Sarhan, MBA
 
PPTX
Enterprise Analytics: Serving Big Data Projects for Healthcare
DATA360US
 
PDF
Service Blueprinting / Service Design Drinks Berlin
Service Design Berlin
 
PPT
Big Data Real Time Analytics - A Facebook Case Study
Nati Shalom
 
PDF
Lambda architecture for real time big data
Trieu Nguyen
 
KEY
Big Data in Real-Time at Twitter
nkallen
 
PDF
Big Data Architecture
Guido Schmutz
 
PDF
Real Time Data Streaming using Kafka & Storm
Ran Silberman
 
PDF
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
Anand Bagmar
 
PPT
Standardization and customization
YASHADA, Pune
 
DOCX
Project titles for mba research project
Ezhil Arasan
 
PPTX
Big data architectures and the data lake
James Serra
 
Customer value analysis of big data products
Vikas Sardana
 
Storm Persistence and Real-Time Analytics
Aerospike, Inc.
 
Stream processing using Apache Storm - Big Data Meetup Athens 2016
Adrianos Dadis
 
How to create intelligent Business Processes thanks to Big Data (BPM, Apache ...
Kai Wähner
 
Big Data Real Time Applications
DataWorks Summit
 
Next-Generation BPM - How to create intelligent Business Processes thanks to ...
Kai Wähner
 
A taste of Snowplow Analytics data
Robert Kingston
 
Why use big data tools to do web analytics? And how to do it using Snowplow a...
yalisassoon
 
Brand strategy
Zaid Sarhan, MBA
 
Enterprise Analytics: Serving Big Data Projects for Healthcare
DATA360US
 
Service Blueprinting / Service Design Drinks Berlin
Service Design Berlin
 
Big Data Real Time Analytics - A Facebook Case Study
Nati Shalom
 
Lambda architecture for real time big data
Trieu Nguyen
 
Big Data in Real-Time at Twitter
nkallen
 
Big Data Architecture
Guido Schmutz
 
Real Time Data Streaming using Kafka & Storm
Ran Silberman
 
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
Anand Bagmar
 
Standardization and customization
YASHADA, Pune
 
Project titles for mba research project
Ezhil Arasan
 
Big data architectures and the data lake
James Serra
 
Ad

Similar to Real-Time Big Data at In-Memory Speed, Using Storm (20)

PPTX
Cassandra summit-2013
dfilppi
 
PPT
Real Time Analytics for Big Data a Twitter Case Study
Nati Shalom
 
PPTX
Bigdata analytics-twitter
dfilppi
 
PDF
Designing the Next Generation Data Lake
Robert Chong
 
PPTX
Sysmech The Zen of Consolidated Network Performance Management
SystemsMechanics
 
PPTX
S2DS London 2015 - Hadoop Real World
Sean Roberts
 
PDF
Big Data - A Real Life Revolution
Capgemini
 
KEY
Big data and APIs for PHP developers - SXSW 2011
Eli White
 
PDF
Big Data & Machine Learning Pipelines: A Tale of Lambdas, Kappas and Pancakes
Osama Khan
 
PDF
Towards A Reference Architecture for BIG DATA.pdf
Gary Mazzaferro
 
PDF
Big Data and OSS at IBM
Boulder Java User's Group
 
PPT
Big Data
TUSHAR GARG
 
PPT
Big data use cases in the cloud presentation
TUSHAR GARG
 
PPTX
Big and Fast Data - Building Infinitely Scalable Systems
Fred Melo
 
PDF
Big Data Analytics for Real Time Systems
Kamalika Dutta
 
PDF
What to Expect for Big Data and Apache Spark in 2017
Databricks
 
PDF
CS-Op Analytics
Cloudera, Inc.
 
PDF
Big Data Architectures @ JAX / BigDataCon 2016
Guido Schmutz
 
PPTX
Big data oracle_introduccion
Fran Navarro
 
PPTX
Simplifying Real-Time Architectures for IoT with Apache Kudu
Cloudera, Inc.
 
Cassandra summit-2013
dfilppi
 
Real Time Analytics for Big Data a Twitter Case Study
Nati Shalom
 
Bigdata analytics-twitter
dfilppi
 
Designing the Next Generation Data Lake
Robert Chong
 
Sysmech The Zen of Consolidated Network Performance Management
SystemsMechanics
 
S2DS London 2015 - Hadoop Real World
Sean Roberts
 
Big Data - A Real Life Revolution
Capgemini
 
Big data and APIs for PHP developers - SXSW 2011
Eli White
 
Big Data & Machine Learning Pipelines: A Tale of Lambdas, Kappas and Pancakes
Osama Khan
 
Towards A Reference Architecture for BIG DATA.pdf
Gary Mazzaferro
 
Big Data and OSS at IBM
Boulder Java User's Group
 
Big Data
TUSHAR GARG
 
Big data use cases in the cloud presentation
TUSHAR GARG
 
Big and Fast Data - Building Infinitely Scalable Systems
Fred Melo
 
Big Data Analytics for Real Time Systems
Kamalika Dutta
 
What to Expect for Big Data and Apache Spark in 2017
Databricks
 
CS-Op Analytics
Cloudera, Inc.
 
Big Data Architectures @ JAX / BigDataCon 2016
Guido Schmutz
 
Big data oracle_introduccion
Fran Navarro
 
Simplifying Real-Time Architectures for IoT with Apache Kudu
Cloudera, Inc.
 
Ad

More from Nati Shalom (20)

PDF
Cloudify and terraform integration
Nati Shalom
 
PDF
Why NFV and Digital Transformation Projects Fail!
Nati Shalom
 
PDF
Cloudify and terraform integration
Nati Shalom
 
PDF
1 cloud, 2 clouds, 3 clouds, tons...
Nati Shalom
 
PDF
Open Stack Days israel Keynote 2017
Nati Shalom
 
PDF
What A No Compromises Hybrid Cloud Looks Like
Nati Shalom
 
PDF
Running OpenStack in Production
Nati Shalom
 
PPTX
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
PPTX
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Nati Shalom
 
PPTX
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Nati Shalom
 
PPTX
OpenStack Juno The Complete Lowdown and Tales from the Summit
Nati Shalom
 
PPTX
Application and Network Orchestration using Heat & Tosca
Nati Shalom
 
PPTX
Introduction to Cloudify for OpenStack users
Nati Shalom
 
PPTX
Software Defined Operator
Nati Shalom
 
PPTX
Complex Analytics with NoSQL Data Store in Real Time
Nati Shalom
 
PPTX
Is Orchestration the Next Big Thing in DevOps
Nati Shalom
 
PPTX
When networks meets apps (open stack atlanta)
Nati Shalom
 
PPTX
Application Centric Approach to Devops
Nati Shalom
 
PPTX
Case Studies for moving apps to the cloud - DLD 2013
Nati Shalom
 
PPTX
Application Centric DevOps
Nati Shalom
 
Cloudify and terraform integration
Nati Shalom
 
Why NFV and Digital Transformation Projects Fail!
Nati Shalom
 
Cloudify and terraform integration
Nati Shalom
 
1 cloud, 2 clouds, 3 clouds, tons...
Nati Shalom
 
Open Stack Days israel Keynote 2017
Nati Shalom
 
What A No Compromises Hybrid Cloud Looks Like
Nati Shalom
 
Running OpenStack in Production
Nati Shalom
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Nati Shalom
 
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Nati Shalom
 
OpenStack Juno The Complete Lowdown and Tales from the Summit
Nati Shalom
 
Application and Network Orchestration using Heat & Tosca
Nati Shalom
 
Introduction to Cloudify for OpenStack users
Nati Shalom
 
Software Defined Operator
Nati Shalom
 
Complex Analytics with NoSQL Data Store in Real Time
Nati Shalom
 
Is Orchestration the Next Big Thing in DevOps
Nati Shalom
 
When networks meets apps (open stack atlanta)
Nati Shalom
 
Application Centric Approach to Devops
Nati Shalom
 
Case Studies for moving apps to the cloud - DLD 2013
Nati Shalom
 
Application Centric DevOps
Nati Shalom
 

Recently uploaded (20)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
July Patch Tuesday
Ivanti
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 

Real-Time Big Data at In-Memory Speed, Using Storm

  • 1. Real Time Big Data With Storm, Cassandra, and In-Memory Computing Nati Shalom @natishalom DeWayne Filppi @dfilppi
  • 2. Introduction to Real Time Analytics Homeland Security Real Time Search Social eCommerce User Tracking & Engagement Financial Services ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved2
  • 3. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved3 The Two Vs of Big Data Velocity Volume
  • 4. The Flavors of Big Data Analytics Counting Correlating Research ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved4
  • 5. It’s All about Timing • Event driven / stream processing • High resolution – every tweet gets counted • Ad-hoc querying • Medium resolution (aggregations) • Long running batch jobs (ETL, map/reduce) • Low resolution (trends & patterns) ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved5 This is what we’re here to discuss 
  • 6. Facebook & Twitter Real Time Analytics
  • 8. The actual analytics..  Like button analytics  Comments box analytics 8 ® Copyright 2011 Gigaspaces Ltd. All Rights
  • 9. PTail Scribe Puma Hbase FACEBOOK Log FACEBOOK Log FACEBOOK Log HDFS Real Time Long Term Batch 1.5 Sec Facebook architecture.. 10,000 write/sec per server
  • 11. ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved11 URL Mentions – Here’s One Use Case
  • 12. ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved12 Twitter Real Time Analytics based on Storm
  • 13. Comparing the two approaches.. Facebook  Rely on Hadoop for Real Time and Batch  RT = 10’s Sec  Suits for Simple processing  Low parallelization Twitter  Use Hadoop for Batch and Storm for real time  RT = Msec, Sec  Suits for Complex processing  Extremely parallel ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved13 This is what we’re here to discuss 
  • 14. Introduction to Storm ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved14
  • 15.  Popular open source, real time, in-memory, streaming computation platform.  Includes distributed runtime and intuitive API for defining distributed processing flows.  Scalable and fault tolerant.  Developed at BackType, and open sourced by Twitter ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved15 Storm Background
  • 16. ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved16 Storm Cluster
  • 17.  Streams  Unbounded sequence of tuples  Spouts  Source of streams (Queues)  Bolts  Functions, Filters, Joins, Aggregations  Topologies ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved17 Storm Concepts Spouts Bolt Topologies
  • 18. Challenge – Word Count Word:Count Tweets Count ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved18 • Hottest topics • URL mentions • etc.
  • 19. ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved19 Streaming word count with Storm
  • 20. ® Copyright 2011 Gigaspaces Ltd. All Rights Reserved20 Computing Reach with Event Streams
  • 21. But where is my Big Data? ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved21
  • 22. Bolt Bolt Spout ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved22 The Big Picture … Twitter feed Twitter Feed Twiter Feed Web Activity Web Activity Web Activity Analytics Data Research Data Counters Reference Data StormData feeds (Kafka, Twitter,..) Cassandra, MongoDB, Hbase,.. End to End Latency
  • 23.  Storm performance and reliability  Assumes success is normal  Uses batching and pipelining for performance  Storm plug-ins has significant effect on performance and reliability  Spout must be able to replay tuples on demand in case of error.  Storm uses topology semantics for ensuring consistency through event ordering  Can be tedious for handling counters  Doesn’t ensure the state of the counters ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved23 Your as as strong as your weakest link
  • 24. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved24 Typical user experience… Now, Kafka is *fast*. When running the Kafka Spout by itself, I easily reproduced Kafka's claim that you can consume "hundreds of thousands of messages per second". When I first fired up the topology, things went well for the first minute, but then quickly crashedas the Kafka spout emitted too fast for the Cassandra Bolt to keep up. Even though Cassandra is fast as well, it is still orders of magnitude slower than Kafka Source: A Big Data Trifecta: Storm, Kafka and Cassandra. Brian Oniells Blog
  • 25. What if we could put everything In Memory? ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved25 An Alternative Approach
  • 26. Did you know? Facebook keeps 80% of its data in Memory (Stanford research) RAM is 100-1000x faster than Disk (Random seek) • Disk: 5 -10ms • RAM: ~0.001msec
  • 27.  RAM is the new disk  Data partitioned across a cluster  Large “virtual” memory space  Transactional  Highly available  Code with Data In Memory Data Grid Review ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved27
  • 28. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved28 Integrating with Storm Bolt Bolt Spout Web Activity Web Activity Web Activity Analytics Data Research Data Counters Reference Data In Memory Data Grid (via Storm Trident State plug-in) In Memory Data Stream (Via Storm Spout Plugin)
  • 29. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved29 In Memory Streaming Word Count with Storm Storm has a simple builder interface to creating stream processing topologies Storm delegates persistence to external providers
  • 30. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved30 Integrating with Hadoop, NoSQL DB.. Bolt Bolt Spout Web Activity Web Activity Web Activity Analytics Data Research Data Counters Reference Data In Memory Data GridIn Memory Data Stream Storm Plugin Hadoop, NoSQL, RDBMS,… Write Behind LRU based Policy
  • 31. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved31 Live Demo – Word Count At In Memory Speed
  • 32. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved32 Recent Benchmarks.. Gresham Computing plc, achieved over 50,000 equity trade transactions per second of load and match into a database.
  • 33. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved33
  • 34. ® Copyright 2013 Gigaspaces Ltd. All Rights Reserved34 References  Try the Cloudify recipe  Download Cloudify : http://www.cloudifysource.org/  Download the Recipe (apps/xapstream, services/xapstream): – https://github.com/CloudifySource/cloudify-recipes  XAP – Cassandra Interface Details;  http://wiki.gigaspaces.com/wiki/display/XAP95/Cassandra+Space+Persistency  Check out the source for the XAP Spout and a sample state implementation backed by XAP, and a Storm friendly streaming implemention on github:  https://github.com/Gigaspaces/storm-integration  For more background on the effort, check out my recent blog posts at http://blog.gigaspaces.com/  http://blog.gigaspaces.com/gigaspaces-and-storm-part-1-storm-clouds/  http://blog.gigaspaces.com/gigaspaces-and-storm-part-2-xap-integration/  Part 3 coming soon.

Editor's Notes

  • #3: ActiveInsight
  • #7: ActiveInsight
  • #9: http://developers.facebook.com/blog/post/476/
  • #10: http://highscalability.com/blog/2011/3/22/facebooks-new-realtime-analytics-system-hbase-to-process-20.htmlThe Winner: HBase + Scribe + Ptail + PumaAt a high level:HBase stores data across distributed machines.Use a tailing architecture, new events are stored in log files, and the logs are tailed.A system rolls the events up and writes them into storage.A UI pulls the data out and displays it to users.Data FlowUser clicks Like on a web page.Fires AJAX request to Facebook.Request is written to a log file using Scribe. Scribe handles issues like file roll over.Scribe is built on the same HTFS file store Hadoop is built on.Write extremely lean log lines. The more compact the log lines the more can be stored in memory.PtailData is read from the log files using Ptail. Ptail is an internal tool built to aggregate data from multiple Scribe stores. It tails the log files and pulls data out.Ptail data is separated out into three streams so they can eventually be sent to their own clusters in different datacenters.Plugin impressionNews feed impressionsActions (plugin + news feed)PumaBatch data to lessen the impact of hot keys. Even though HBase can handle a lot of writes per second they still want to batch data. A hot article will generate a lot of impressions and news feed impressions which will cause huge data skews which will cause IO issues. The more batching the better.Batch for 1.5 seconds on average. Would like to batch longer but they have so many URLs that they run out of memory when creating a hashtable.Wait for last flush to complete for starting new batch to avoid lock contention issues.UI  Renders DataFrontends are all written in PHP.The backend is written in Java and Thrift is used as the messaging format so PHP programs can query Java services.Caching solutions are used to make the web pages display more quickly.Performance varies by the statistic. A counter can come back quickly. Find the top URL in a domain can take longer. Range from .5 to a few seconds. The more and longer data is cached the less realtime it is.Set different caching TTLs in memcache.MapReduceThe data is then sent to MapReduce servers so it can be queried via Hive.This also serves as a backup plan as the data can be recovered from Hive.Raw logs are removed after a period of time.HBase is a distribute column store. Database interface to Hadoop. Facebook has people working internally on HBase. Unlike a relational database you don't create mappings between tables.You don't create indexes. The only index you have a primary row key.From the row key you can have millions of sparse columns of storage. It's very flexible. You don't have to specify the schema. You define column families to which you can add keys at anytime.Key feature to scalability and reliability is the WAL, write ahead log, which is a log of the operations that are supposed to occur. Based on the key, data is sharded to a region server. Written to WAL first.Data is put into memory. At some point in time or if enough data has been accumulated the data is flushed to disk.If the machine goes down you can recreate the data from the WAL. So there's no permanent data loss.Use a combination of the log and in-memory storage they can handle an extremely high rate of IO reliably. HBase handles failure detection and automatically routes across failures.Currently HBaseresharding is done manually.Automatic hot spot detection and resharding is on the roadmap for HBase, but it's not there yet.Every Tuesday someone looks at the keys and decides what changes to make in the sharding plan.Schema Store on a per URL basis a bunch of counters.A row key, which is the only lookup key, is the MD5 hash of the reverse domainSelecting the proper key structure helps with scanning and sharding.A problem they have is sharding data properly onto different machines. Using a MD5 hash makes it easier to say this range goes here and that range goes there. For URLs they do something similar, plus they add an ID on top of that. Every URL in Facebook is represented by a unique ID, which is used to help with sharding.A reverse domain, com.facebook/ for example, is used so that the data is clustered together. HBase is really good at scanning clustered data, so if they store the data so it's clustered together they can efficiently calculate stats across domains. Think of every row a URL and every cell as a counter, you are able to set different TTLs (time to live) for each cell. So if keeping an hourly count there's no reason to keep that around for every URL forever, so they set a TTL of two weeks. Typically set TTLs on a per column family basis. Per server they can handle 10,000 writes per second. Checkpointing is used to prevent data loss when reading data from log files. Tailers save log stream check points  in HBase.Replayed on startup so won't lose data.Useful for detecting click fraud, but it doesn't have fraud detection built in.Tailer Hot SpotsIn a distributed system there's a chance one part of the system can be hotter than another.One example are region servers that can be hot because more keys are being directed that way.One tailer can be lag behind another too.If one tailer is an hour behind and the others are up to date, what numbers do you display in the UI?For example, impressions have a way higher volume than actions, so CTR rates were way higher in the last hour.Solution is to figure out the least up to date tailer and use that when querying metrics.
  • #24: Storm (quite rationally) assumes success is normalStorm uses batching and pipelining for performanceTherefore the spout must be able to replay tuples on demand in case of error.Any kind of quasi-queue like data source can be fashioned into a spout.No persistence is ever required, and speed attained by minimizing network hops during topology processing.
  • #33: http://www.gigaspaces.com/greshams-ctc-reconciles-transactions-orders-magnitude-faster-competitive-offerings-intel-benchmarkinhttp://natishalom.typepad.com/nati_shaloms_blog/2013/01/in-memory-computing-data-grid-for-big-data.html