SlideShare a Scribd company logo
Pramod Immaneni <pramod@datatorrent.com>
PPMC Member, Architect @DataTorrent Inc
Dec 2nd, 2015
Stream Processing Architecture and Applications
Apache Apex (incubating)
© 2015 DataTorrent
Apex Platform Overview
2
© 2015 DataTorrent
Apache Malhar Library
3
© 2015 DataTorrent
Native Hadoop Integration
4
• YARN is
the
resource
manager
• HDFS used
for storing
any
persistent
state
© 2015 DataTorrent
Application Programming Model
5
 A Stream is a sequence of data tuples
 An Operator takes one or more input streams, performs computations & emits one or more output streams
• Each Operator is YOUR custom business logic in java, or built-in operator from our open source library
• Operator has many instances that run in parallel and each instance is single-threaded
 Directed Acyclic Graph (DAG) is made up of operators and streams
Directed Acyclic Graph (DAG)
Output StreamTuple Tuple
er
Operator
er
Operator
er
Operator
er
Operator
© 2015 DataTorrent
Advanced Windowing Support
6
 Application window
 Sliding window and tumbling window
 Checkpoint window
 No artificial latency
© 2015 DataTorrent
Application Specification
7
© 2015 DataTorrent
Partitioning and unification
8
© 2015 DataTorrent
Advanced Partitioning
9
© 2015 DataTorrent
Dynamic Partitioning
10
• Partitioning change while application is running
ᵒ Change number of partitions at runtime based on stats
ᵒ Determine initial number of partitions dynamically
• Kafka operators scale according to number of kafka partitions
ᵒ Supports re-distribution of state when number of partitions change
ᵒ API for custom scaler or partitioner
unifiers not shown
1a 2a
1b 2b
3
2b
1b 2c
3
2a
2d
1a 2b
1b 2c 3b
2a
2d
3a1a
© 2015 DataTorrent
How tuples are partitioned
11
• Tuple hashcode and mask used to determine destination partition
ᵒ Mask picks the last n bits of the hashcode of the tuple
ᵒ hashcode method can be overridden
• StreamCodec can be used to specify custom hashcode for tuples
ᵒ Can also be used for specifying custom serialization
tuple: {
Name,
24204842,
San Jose
}
Hashcode:
00101010001
0101
Mask
(0x11)
Partition
00 1
01 2
10 3
11 4
© 2015 DataTorrent
Custom partitioning
12
• Custom distribution of tuples
ᵒ E.g.. Broadcast
tuple:{
Name,
24204842,
San Jose
}
Hashcode:
00101010001
0101
Mask
(0x00)
Partition
00 1
00 2
00 3
00 4
© 2015 DataTorrent
Fault Tolerance
13
• Operator state is checkpointed to a persistent store
ᵒ Automatically performed by engine, no additional work needed by operator
ᵒ In case of failure operators are restarted from checkpoint state
ᵒ Frequency configurable per operator
ᵒ Asynchronous and distributed by default
ᵒ Default store is HDFS
• Automatic detection and recovery of failed operators
ᵒ Heartbeat mechanism
• Buffering mechanism to ensure replay of data from recovered point so
that there is no loss of data
• Application master state checkpointed
© 2015 DataTorrent
Processing Guarantees
14
Atleast once
• On recovery data will be replayed from a previous checkpoint
ᵒ Messages will not be lost
ᵒ Default mechanism and is suitable for most applications
• Can be used in conjunction with following to ensure data is written
once to store in case of fault recovery
ᵒ Transactions with meta information, Rewinding output, Feedback from
external entity, Idempotent operations
Atmost once
• On recovery the latest data is made available to operator
ᵒ Useful in use cases where some data loss is acceptable and latest data is
sufficient
Exactly once
• Operators checkpointed every window
ᵒ Can be combined with transactional mechanisms to ensure end-to-end
exactly once behavior
© 2015 DataTorrent
Stream Locality
15
• By default operators are deployed in containers (processes) randomly
on different nodes across the Hadoop cluster
• Custom locality for streams
ᵒ Rack local: Data does not traverse network switches
ᵒ Node local: Data is passed via loopback interface and frees up network
bandwidth
ᵒ Container local: Messages are passed via in memory queues between
operators and does not require serialization
ᵒ Thread local: Messages are passed between operators in a same thread
equivalent to calling a subsequent function on the message
© 2015 DataTorrent
Data Processing Pipeline Example
App Builder
16
© 2015 DataTorrent
Monitoring Console
Logical View
17
© 2015 DataTorrent
Monitoring Console
Physical View
18
© 2015 DataTorrent
Real-Time Dashboards
Real Time Visualization
19
© 2015 DataTorrent
Resources
20
Apache Apex Community Page - http://apex.incubator.apache.org/
© 2015 DataTorrent
We Need Your Vote (Today)
21
Introducing Apache Apex - Not Just Another Stream Processing Platform
Next Gen Big Data Analytics with Apache Apex
Enterprise-grade streaming under 2ms on Hadoop
End
22
© 2015 DataTorrent
Extra Slides
© 2015 DataTorrent
Partitioning and Scaling Out
24
• Operators can be dynamically
scaled
• Flexible Streams split
• Parallel partitioning
• MxN partitioning
• Unifiers
© 2015 DataTorrent
Fault Tolerance Overview
25
Stateful Fault Tolerance Processing Semantics Data Locality
 Supported out of the box
– Application state
– Application master state
– No data loss
 Automatic recovery
 Lunch test
 Buffer server
 At least once
 At most once
 Exactly once
 Stream locality for placement of
operators
 Rack local – Distributed
deployment
 Node local – Data does
not traverse NIC
 Container local – Data
doesn’t need to be
serialized
 Thread local – Operators
run in same thread
 Data locality
© 2015 DataTorrent
Machine Data Application
Logical View
26
© 2015 DataTorrent
Machine Data Application
Physical View
27

More Related Content

PPTX
Introduction to Apache Apex
PPTX
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
PPTX
Apache Apex Fault Tolerance and Processing Semantics
PPTX
DataTorrent Presentation @ Big Data Application Meetup
PPTX
Apache Apex Meetup at Cask
PPTX
Apache Apex: Stream Processing Architecture and Applications
PPTX
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
PPTX
Introduction to Apache Apex and writing a big data streaming application
Introduction to Apache Apex
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
Apache Apex Fault Tolerance and Processing Semantics
DataTorrent Presentation @ Big Data Application Meetup
Apache Apex Meetup at Cask
Apache Apex: Stream Processing Architecture and Applications
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Introduction to Apache Apex and writing a big data streaming application

What's hot (20)

PPTX
Smart Partitioning with Apache Apex (Webinar)
PPTX
Stream Processing with Apache Apex
PDF
Apex as yarn application
PDF
Extending The Yahoo Streaming Benchmark to Apache Apex
PPTX
Introduction to Apache Apex
PPTX
Apache Apex Introduction with PubMatic
PPTX
Intro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
PDF
Introduction to Apache Apex - CoDS 2016
PDF
Integrating Apache NiFi and Apache Apex
PPTX
Fault Tolerance and Processing Semantics in Apache Apex
PPTX
Architectual Comparison of Apache Apex and Spark Streaming
PPTX
University program - writing an apache apex application
PDF
Windowing in apex
PPTX
Introduction to Real-Time Data Processing
PPTX
Building Your First Apache Apex (Next Gen Big Data/Hadoop) Application
PDF
Building your first aplication using Apache Apex
PPTX
Intro to Apache Apex - Next Gen Native Hadoop Platform - Hackac
PPTX
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
PDF
Developing streaming applications with apache apex (strata + hadoop world)
PDF
Actionable Insights with Apache Apex at Apache Big Data 2017 by Devendra Tagare
Smart Partitioning with Apache Apex (Webinar)
Stream Processing with Apache Apex
Apex as yarn application
Extending The Yahoo Streaming Benchmark to Apache Apex
Introduction to Apache Apex
Apache Apex Introduction with PubMatic
Intro to Apache Apex (next gen Hadoop) & comparison to Spark Streaming
Introduction to Apache Apex - CoDS 2016
Integrating Apache NiFi and Apache Apex
Fault Tolerance and Processing Semantics in Apache Apex
Architectual Comparison of Apache Apex and Spark Streaming
University program - writing an apache apex application
Windowing in apex
Introduction to Real-Time Data Processing
Building Your First Apache Apex (Next Gen Big Data/Hadoop) Application
Building your first aplication using Apache Apex
Intro to Apache Apex - Next Gen Native Hadoop Platform - Hackac
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Developing streaming applications with apache apex (strata + hadoop world)
Actionable Insights with Apache Apex at Apache Big Data 2017 by Devendra Tagare
Ad

Similar to Apache Apex - Hadoop Users Group (20)

PPTX
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
PDF
IMCSummit 2015 - Day 1 IT Business Track - Designing a Big Data Analytics Pla...
PDF
Introduction to Apache Apex by Thomas Weise
PDF
Apache Big Data EU 2016: Next Gen Big Data Analytics with Apache Apex
PPSX
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
PPTX
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
PPTX
Next Gen Big Data Analytics with Apache Apex
PPTX
Big Data Berlin v8.0 Stream Processing with Apache Apex
PPTX
Thomas Weise, Apache Apex PMC Member and Architect/Co-Founder, DataTorrent - ...
PPTX
Kafka to Hadoop Ingest with Parsing, Dedup and other Big Data Transformations
PDF
Artur Borycki - Beyond Lambda - how to get from logical to physical - code.ta...
PPTX
Intro to Apache Apex @ Women in Big Data
PPTX
Hive Performance Dataworks Summit Melbourne February 2019
PDF
Fast SQL on Hadoop, Really?
PPTX
Apache Apex: Stream Processing Architecture and Applications
PDF
Real-time Stream Processing using Apache Apex
PPTX
Spark+flume seattle
ODP
Zero Downtime JEE Architectures
PPTX
The Past, Present, and Future of Apache Flink
PPTX
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
IMCSummit 2015 - Day 1 IT Business Track - Designing a Big Data Analytics Pla...
Introduction to Apache Apex by Thomas Weise
Apache Big Data EU 2016: Next Gen Big Data Analytics with Apache Apex
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Next Gen Big Data Analytics with Apache Apex
Big Data Berlin v8.0 Stream Processing with Apache Apex
Thomas Weise, Apache Apex PMC Member and Architect/Co-Founder, DataTorrent - ...
Kafka to Hadoop Ingest with Parsing, Dedup and other Big Data Transformations
Artur Borycki - Beyond Lambda - how to get from logical to physical - code.ta...
Intro to Apache Apex @ Women in Big Data
Hive Performance Dataworks Summit Melbourne February 2019
Fast SQL on Hadoop, Really?
Apache Apex: Stream Processing Architecture and Applications
Real-time Stream Processing using Apache Apex
Spark+flume seattle
Zero Downtime JEE Architectures
The Past, Present, and Future of Apache Flink
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
Ad

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
medical staffing services at VALiNTRY
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo POS Development Services by CandidRoot Solutions
Navsoft: AI-Powered Business Solutions & Custom Software Development
Reimagine Home Health with the Power of Agentic AI​
Design an Analysis of Algorithms II-SECS-1021-03
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Understanding Forklifts - TECH EHS Solution
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Why Generative AI is the Future of Content, Code & Creativity?
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
medical staffing services at VALiNTRY
Computer Software and OS of computer science of grade 11.pptx
Operating system designcfffgfgggggggvggggggggg
Upgrade and Innovation Strategies for SAP ERP Customers
Which alternative to Crystal Reports is best for small or large businesses.pdf

Apache Apex - Hadoop Users Group

  • 1. Pramod Immaneni <[email protected]> PPMC Member, Architect @DataTorrent Inc Dec 2nd, 2015 Stream Processing Architecture and Applications Apache Apex (incubating)
  • 2. © 2015 DataTorrent Apex Platform Overview 2
  • 3. © 2015 DataTorrent Apache Malhar Library 3
  • 4. © 2015 DataTorrent Native Hadoop Integration 4 • YARN is the resource manager • HDFS used for storing any persistent state
  • 5. © 2015 DataTorrent Application Programming Model 5  A Stream is a sequence of data tuples  An Operator takes one or more input streams, performs computations & emits one or more output streams • Each Operator is YOUR custom business logic in java, or built-in operator from our open source library • Operator has many instances that run in parallel and each instance is single-threaded  Directed Acyclic Graph (DAG) is made up of operators and streams Directed Acyclic Graph (DAG) Output StreamTuple Tuple er Operator er Operator er Operator er Operator
  • 6. © 2015 DataTorrent Advanced Windowing Support 6  Application window  Sliding window and tumbling window  Checkpoint window  No artificial latency
  • 10. © 2015 DataTorrent Dynamic Partitioning 10 • Partitioning change while application is running ᵒ Change number of partitions at runtime based on stats ᵒ Determine initial number of partitions dynamically • Kafka operators scale according to number of kafka partitions ᵒ Supports re-distribution of state when number of partitions change ᵒ API for custom scaler or partitioner unifiers not shown 1a 2a 1b 2b 3 2b 1b 2c 3 2a 2d 1a 2b 1b 2c 3b 2a 2d 3a1a
  • 11. © 2015 DataTorrent How tuples are partitioned 11 • Tuple hashcode and mask used to determine destination partition ᵒ Mask picks the last n bits of the hashcode of the tuple ᵒ hashcode method can be overridden • StreamCodec can be used to specify custom hashcode for tuples ᵒ Can also be used for specifying custom serialization tuple: { Name, 24204842, San Jose } Hashcode: 00101010001 0101 Mask (0x11) Partition 00 1 01 2 10 3 11 4
  • 12. © 2015 DataTorrent Custom partitioning 12 • Custom distribution of tuples ᵒ E.g.. Broadcast tuple:{ Name, 24204842, San Jose } Hashcode: 00101010001 0101 Mask (0x00) Partition 00 1 00 2 00 3 00 4
  • 13. © 2015 DataTorrent Fault Tolerance 13 • Operator state is checkpointed to a persistent store ᵒ Automatically performed by engine, no additional work needed by operator ᵒ In case of failure operators are restarted from checkpoint state ᵒ Frequency configurable per operator ᵒ Asynchronous and distributed by default ᵒ Default store is HDFS • Automatic detection and recovery of failed operators ᵒ Heartbeat mechanism • Buffering mechanism to ensure replay of data from recovered point so that there is no loss of data • Application master state checkpointed
  • 14. © 2015 DataTorrent Processing Guarantees 14 Atleast once • On recovery data will be replayed from a previous checkpoint ᵒ Messages will not be lost ᵒ Default mechanism and is suitable for most applications • Can be used in conjunction with following to ensure data is written once to store in case of fault recovery ᵒ Transactions with meta information, Rewinding output, Feedback from external entity, Idempotent operations Atmost once • On recovery the latest data is made available to operator ᵒ Useful in use cases where some data loss is acceptable and latest data is sufficient Exactly once • Operators checkpointed every window ᵒ Can be combined with transactional mechanisms to ensure end-to-end exactly once behavior
  • 15. © 2015 DataTorrent Stream Locality 15 • By default operators are deployed in containers (processes) randomly on different nodes across the Hadoop cluster • Custom locality for streams ᵒ Rack local: Data does not traverse network switches ᵒ Node local: Data is passed via loopback interface and frees up network bandwidth ᵒ Container local: Messages are passed via in memory queues between operators and does not require serialization ᵒ Thread local: Messages are passed between operators in a same thread equivalent to calling a subsequent function on the message
  • 16. © 2015 DataTorrent Data Processing Pipeline Example App Builder 16
  • 17. © 2015 DataTorrent Monitoring Console Logical View 17
  • 18. © 2015 DataTorrent Monitoring Console Physical View 18
  • 19. © 2015 DataTorrent Real-Time Dashboards Real Time Visualization 19
  • 20. © 2015 DataTorrent Resources 20 Apache Apex Community Page - http://apex.incubator.apache.org/
  • 21. © 2015 DataTorrent We Need Your Vote (Today) 21 Introducing Apache Apex - Not Just Another Stream Processing Platform Next Gen Big Data Analytics with Apache Apex Enterprise-grade streaming under 2ms on Hadoop
  • 24. © 2015 DataTorrent Partitioning and Scaling Out 24 • Operators can be dynamically scaled • Flexible Streams split • Parallel partitioning • MxN partitioning • Unifiers
  • 25. © 2015 DataTorrent Fault Tolerance Overview 25 Stateful Fault Tolerance Processing Semantics Data Locality  Supported out of the box – Application state – Application master state – No data loss  Automatic recovery  Lunch test  Buffer server  At least once  At most once  Exactly once  Stream locality for placement of operators  Rack local – Distributed deployment  Node local – Data does not traverse NIC  Container local – Data doesn’t need to be serialized  Thread local – Operators run in same thread  Data locality
  • 26. © 2015 DataTorrent Machine Data Application Logical View 26
  • 27. © 2015 DataTorrent Machine Data Application Physical View 27