SlideShare a Scribd company logo
1 of 55
Stream-Based
Mobile and Web Event Tracking
An introduction into Alchemist
About me
• Sebastian Schleicher, Director of Engineering @Blinkist

https://about.me/sebastian.schleicher
2
A book’s key insights distilled into
bite-sized, 15-minute reads
15-minute book summaries
A library of 2,500+ bite-sized 

insights for reading and listening
Text and audio
Blinkist – Big Ideas in Small Packages
What’s in it for you?
• Innovative solutions for in-house web and mobile event tracking
• A stream-based approach to event tracking with AWS
• An Open Source framework that helps you wire all this together
4
What is Event Tracking?
• User behavior in your apps
• Click behavior / Page visits on your websites
• E-Mail openings / interactions
• Business events from your backend
• … many more
5
Typical setup
6
Google Analytics
Marketing
Analytics Provider
Product
Newsletter System
CRM
These are information silos
and dead ends.
Information Silos & Dead Ends
8
Google Analytics
Analytics Provider
Marketing
Product
Newsletter System
CRM
How many daily active users
do we have?
Information Silos & Dead Ends
10
Google Analytics
Analytics Provider
Marketing
Product
Newsletter System
CRM
2,000
7,000
1,000
Can’t all events reside in
a central place …
… so that reports are based on
the same data?
A Central Event Stream
13
Event Stream
Marketing
Product
CRM


Business
Intelligence
System
Could we also route events 

to other systems?
Event Routing
15
Event Stream
Marketing
Product
CRM


Business
Intelligence
System
External

System
External

System
A Reactive System (Fantasy)
16
Event Stream
Marketing
Product
CRM


Business
Intelligence
System
External

System
External

System
How can we realise 

this with AWS?
A Central Event Stream
18
Event Stream
Marketing
Product
CRM


Business
Intelligence
System
External

System
External

System
A Central Event Stream
19
Event Stream
Marketing
Product
CRM
External

System
External

System


Redshift
Streaming System on AWS
20
Collector
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
What is this Kinesis?
AWS Kinesis
22
Record
Ordered by time of arrival
Retained up to 7 days
Consumer

Read records

and do 

something
Producer putRecords
Producer putRecords
Producer putRecords
AWS Kinesis Record
23
Base64 Encoded Binary

e.g. JSON String
* https://docs.aws.amazon.com/kinesis/latest/APIReference/API_Record.html
Streaming System on AWS
24
Collector
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
AWS Kinesis Firehose
25
Producer putRecords


Redshift
Copy Records
Producer putRecords
Producer putRecords
Managed 

AWS

Consumer
• Managed Kinesis Application

• Copies records to Redshift 

(or other AWS data stores)

• putRecords ensures that only 

JSON inserted

• Object keys get mapped to 

columns in Redshift
Streaming System on AWS
26
Collector
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
What is this Lambda?
AWS Lambda
28
Lambda
• “Serverless” Application

• Simple Function Executions

• JavaScript / Java / Python / Go
S3 Event
Kinesis Event
Many More Events
Streaming System on AWS
29
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
Running on Lambda
CollectorAlchemist
Welcome Alchemist
• Lightweight E(xtract) T(ransform) L(oad) framework written in JS
• Ideal for the usage in an AWS Lambda environment
• Many built-in adapters to extract data from AWS resources (like S3)
• Easy to extend
30
Alchemist Pipeline
31
Input Transformations Output
Pipeline Data Pipeline Data
Pipeline Data
Faulty

Data
Sane

Data
AdapterAdapter
Alchemist use cases
32
Mobile Tracking

Alchemist
Web tracking
Alchemist
Email Tracking
Alchemist
Kinesis
Web Tracking
33
> trackEvent(“My Event”, “some-action”, 12);



> GET https://example.com/t?event=My%20Event&action=some-action&value=12
S3 Bucket CloudFront
Access Log
S3 Event
putRecords
Alchemist
Kinesis
*Now: https://matomo.org/
*
Alchemist Web Pipeline
34
S3 Input
Kinesis Output
Cloudfront Log
Transformation
Unzip
Transformation
Quality Control
Transformation
SQS Output
Pipeline
Data
Sane

Data
Faulty

Data
Check faulty data

and react quickly
S3 Bucket
Load the file 

from S3
Alchemist Use Cases
35
Log Files
Web tracking
Alchemist
Kinesis
Mobile Tracking

Alchemist
Email Tracking
Alchemist
Mobile Tracking
36
> trackEvent(“My Mobile Event”, { “some”: “parameter” });
putRecords
Kinesis Event
putRecords
Alchemist
Kinesis
Amazon
Pinpoint
Kinesis
Pinpoint SDK
Alchemist Mobile Pipeline
37
Kinesis Input
Kinesis Output
Map Fields

Transformation
Quality Control
Transformation
SQS Output
Pipeline
Data
Sane

Data
Faulty

Data
Check faulty data

and react quickly
Decode64

Parse JSON
Kinesis
Alchemist use cases
38
Kinesis
Log Files
Web tracking
Alchemist
Kinesis
Mobile Tracking

Alchemist
Email Tracking
Alchemist
E-Mail Tracking
39
Webhooks for User opens an email  User clicks a button in an email
HTTP Event
putRecords
Alchemist
Kinesis
Newsletter
Provider
API Gateway
Alchemist E-Mail Pipeline
40
HTTP Input
Kinesis Output
Parse Body

Transformation
Quality Control
Transformation
SQS Output
Pipeline
Data
Sane

Data
Faulty

Data
Check faulty data

and react quickly
API Gateway
Alchemist use cases
41
Kinesis
Log Files
Web tracking
Alchemist
Kinesis
Mobile Tracking

Alchemist
Email Tracking
Alchemist
API Gateway
Streaming System on AWS
42
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
Alchemist
Alchemist
Alchemist
BI System Routing
43
Kinesis Event
Mobile
Alchemist
Kinesis


Redshift
Web
Web Events Table
Mobile Events Table
E-Mail
E-Mail Events Table
Alchemist BI Pipeline
44
Kinesis Input
Firehose 

Routed Output
Map Fields

Transformation
Set Route

Transformation
SQS Output
Pipeline
Data
Sane

Data
Faulty

Data
Check faulty data

and react quickly
Decode64

Parse JSON
Kinesis
Whitelist Events

Transformation
Streaming System on AWS
45
Kinesis
Stream
Kinesis

Firehose
Lambda
External

System


Redshift
Alchemist
Alchemist
Alchemist
Alchemist
External System Routing
46
Kinesis Event
POST https://external.system/events
Alchemist
Kinesis
External

System
Alchemist External Pipeline
47
Kinesis Input
HTTP Output
Prepare Body

Transformation
SQS Output
Pipeline
Data
Sane

Data
Faulty

Data
Check faulty data

and react quickly
Decode64

Parse JSON
Kinesis
Whitelist Events

Transformation
Streaming System on AWS
48
Kinesis
Stream
External

System


Redshift
Alchemist
Alchemist
Alchemist
Alchemist
Alchemist
We use Alchemist to 

route our data streams
anywhere we need them.
is Open Source
https://github.com/blinkist/alchemist
Currently only available in JavaScript
Licensed under MIT
Let’s talk about the costs…
Pricing
• We pay currently 150$ for 200 million events per month* 🤫
• Everything is fully managed and scaled by AWS 🤗
• Simple to maintain and operate as a developer 🤓
• No expensive pre-build solution required ✌
52 *Redshift not included (around 0.25$/hour per node)
Key takeaways
Key takeaways
• In-house event tracking can be scalable & affordable 💸
• A central data stream containing all relevant events is awesome 🚀
• Having a simple streaming architecture rocks🤘
• Embrace the vendor lock-in – it helps you more than it hurts 🤠
54
Don’t be afraid and in-house your event tracking!
Thank you for your attention.
https://about.me/sebastian.schleicher

More Related Content

What's hot

Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways Kong Inc.
 
HSBC and AWS Day - AWS foundations
HSBC and AWS Day - AWS foundationsHSBC and AWS Day - AWS foundations
HSBC and AWS Day - AWS foundationsAmazon Web Services
 
DevOps Culture
DevOps CultureDevOps Culture
DevOps Culturerouanw
 
Mainframe Modernization with AWS: Patterns and Best Practices
Mainframe Modernization with AWS: Patterns and Best PracticesMainframe Modernization with AWS: Patterns and Best Practices
Mainframe Modernization with AWS: Patterns and Best PracticesAmazon Web Services
 
Combining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityCombining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityElasticsearch
 
Infrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload DeploymentInfrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload DeploymentDatabricks
 
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Kai Wähner
 
Introduction to AWS Cost Management
Introduction to AWS Cost ManagementIntroduction to AWS Cost Management
Introduction to AWS Cost ManagementAmazon Web Services
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessAmazon Web Services
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureNguyen Tung
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?Weaveworks
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SREAraf Karsh Hamid
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...Sonatype
 
Oracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps PipelinesOracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps PipelinesJohan Louwers
 
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...SlideTeam
 

What's hot (20)

Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
AWS Security and SecOps
AWS Security and SecOpsAWS Security and SecOps
AWS Security and SecOps
 
HSBC and AWS Day - AWS foundations
HSBC and AWS Day - AWS foundationsHSBC and AWS Day - AWS foundations
HSBC and AWS Day - AWS foundations
 
DevOps Culture
DevOps CultureDevOps Culture
DevOps Culture
 
Mainframe Modernization with AWS: Patterns and Best Practices
Mainframe Modernization with AWS: Patterns and Best PracticesMainframe Modernization with AWS: Patterns and Best Practices
Mainframe Modernization with AWS: Patterns and Best Practices
 
Combining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityCombining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observability
 
Infrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload DeploymentInfrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload Deployment
 
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
 
Introduction to AWS Cost Management
Introduction to AWS Cost ManagementIntroduction to AWS Cost Management
Introduction to AWS Cost Management
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and Serverless
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
 
Oracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps PipelinesOracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps Pipelines
 
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
 
AWS for Manufacturing
AWS for ManufacturingAWS for Manufacturing
AWS for Manufacturing
 

Similar to Stream based mobile and web event tracking backed by aws kinesis

Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...
Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...
Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...Amazon Web Services
 
Getting Started with Amazon Kinesis
Getting Started with Amazon KinesisGetting Started with Amazon Kinesis
Getting Started with Amazon KinesisAmazon Web Services
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureJeremy Likness
 
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...Amazon Web Services
 
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019Donnie Prakoso
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWSSmartWave
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right WayC4Media
 
Processamento em tempo real usando AWS - padrões e casos de uso
Processamento em tempo real usando AWS - padrões e casos de usoProcessamento em tempo real usando AWS - padrões e casos de uso
Processamento em tempo real usando AWS - padrões e casos de usoAmazon Web Services LATAM
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka EcosystemGuido Schmutz
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Araf Karsh Hamid
 
Vancouver keynote - AWS Innovate - Sam Elmalak
Vancouver keynote - AWS Innovate - Sam ElmalakVancouver keynote - AWS Innovate - Sam Elmalak
Vancouver keynote - AWS Innovate - Sam ElmalakAmazon Web Services
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessjavier ramirez
 
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...Matt Stubbs
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAmazon Web Services
 
Deep dive and best practices on real time streaming applications nyc-loft_oct...
Deep dive and best practices on real time streaming applications nyc-loft_oct...Deep dive and best practices on real time streaming applications nyc-loft_oct...
Deep dive and best practices on real time streaming applications nyc-loft_oct...Amazon Web Services
 
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)Amazon Web Services
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017Amazon Web Services
 
BDA307 Real-time Streaming Applications on AWS, Patterns and Use Cases
BDA307 Real-time Streaming Applications on AWS, Patterns and Use CasesBDA307 Real-time Streaming Applications on AWS, Patterns and Use Cases
BDA307 Real-time Streaming Applications on AWS, Patterns and Use CasesAmazon Web Services
 
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016Amazon Web Services
 
Deep Dive and Best Practices for Real Time Streaming Applications
Deep Dive and Best Practices for Real Time Streaming ApplicationsDeep Dive and Best Practices for Real Time Streaming Applications
Deep Dive and Best Practices for Real Time Streaming ApplicationsAmazon Web Services
 

Similar to Stream based mobile and web event tracking backed by aws kinesis (20)

Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...
Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...
Building a Real Time Dashboard with Amazon Kinesis, Amazon Lambda and Amazon ...
 
Getting Started with Amazon Kinesis
Getting Started with Amazon KinesisGetting Started with Amazon Kinesis
Getting Started with Amazon Kinesis
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with Azure
 
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...
(BDT306) Mission-Critical Stream Processing with Amazon EMR and Amazon Kinesi...
 
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right Way
 
Processamento em tempo real usando AWS - padrões e casos de uso
Processamento em tempo real usando AWS - padrões e casos de usoProcessamento em tempo real usando AWS - padrões e casos de uso
Processamento em tempo real usando AWS - padrões e casos de uso
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics
 
Vancouver keynote - AWS Innovate - Sam Elmalak
Vancouver keynote - AWS Innovate - Sam ElmalakVancouver keynote - AWS Innovate - Sam Elmalak
Vancouver keynote - AWS Innovate - Sam Elmalak
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
 
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
Deep dive and best practices on real time streaming applications nyc-loft_oct...
Deep dive and best practices on real time streaming applications nyc-loft_oct...Deep dive and best practices on real time streaming applications nyc-loft_oct...
Deep dive and best practices on real time streaming applications nyc-loft_oct...
 
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017
 
BDA307 Real-time Streaming Applications on AWS, Patterns and Use Cases
BDA307 Real-time Streaming Applications on AWS, Patterns and Use CasesBDA307 Real-time Streaming Applications on AWS, Patterns and Use Cases
BDA307 Real-time Streaming Applications on AWS, Patterns and Use Cases
 
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016
Getting Started with Amazon Kinesis | AWS Public Sector Summit 2016
 
Deep Dive and Best Practices for Real Time Streaming Applications
Deep Dive and Best Practices for Real Time Streaming ApplicationsDeep Dive and Best Practices for Real Time Streaming Applications
Deep Dive and Best Practices for Real Time Streaming Applications
 

Recently uploaded

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxNiranjanYadav41
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectErbil Polytechnic University
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 

Recently uploaded (20)

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptx
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction Project
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 

Stream based mobile and web event tracking backed by aws kinesis

  • 1. Stream-Based Mobile and Web Event Tracking An introduction into Alchemist
  • 2. About me • Sebastian Schleicher, Director of Engineering @Blinkist
 https://about.me/sebastian.schleicher 2
  • 3. A book’s key insights distilled into bite-sized, 15-minute reads 15-minute book summaries A library of 2,500+ bite-sized 
 insights for reading and listening Text and audio Blinkist – Big Ideas in Small Packages
  • 4. What’s in it for you? • Innovative solutions for in-house web and mobile event tracking • A stream-based approach to event tracking with AWS • An Open Source framework that helps you wire all this together 4
  • 5. What is Event Tracking? • User behavior in your apps • Click behavior / Page visits on your websites • E-Mail openings / interactions • Business events from your backend • … many more 5
  • 6. Typical setup 6 Google Analytics Marketing Analytics Provider Product Newsletter System CRM
  • 7. These are information silos and dead ends.
  • 8. Information Silos & Dead Ends 8 Google Analytics Analytics Provider Marketing Product Newsletter System CRM
  • 9. How many daily active users do we have?
  • 10. Information Silos & Dead Ends 10 Google Analytics Analytics Provider Marketing Product Newsletter System CRM 2,000 7,000 1,000
  • 11. Can’t all events reside in a central place …
  • 12. … so that reports are based on the same data?
  • 13. A Central Event Stream 13 Event Stream Marketing Product CRM 
 Business Intelligence System
  • 14. Could we also route events 
 to other systems?
  • 16. A Reactive System (Fantasy) 16 Event Stream Marketing Product CRM 
 Business Intelligence System External
 System External
 System
  • 17. How can we realise 
 this with AWS?
  • 18. A Central Event Stream 18 Event Stream Marketing Product CRM 
 Business Intelligence System External
 System External
 System
  • 19. A Central Event Stream 19 Event Stream Marketing Product CRM External
 System External
 System 
 Redshift
  • 20. Streaming System on AWS 20 Collector Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift
  • 21. What is this Kinesis?
  • 22. AWS Kinesis 22 Record Ordered by time of arrival Retained up to 7 days Consumer
 Read records
 and do 
 something Producer putRecords Producer putRecords Producer putRecords
  • 23. AWS Kinesis Record 23 Base64 Encoded Binary
 e.g. JSON String * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_Record.html
  • 24. Streaming System on AWS 24 Collector Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift
  • 25. AWS Kinesis Firehose 25 Producer putRecords 
 Redshift Copy Records Producer putRecords Producer putRecords Managed 
 AWS
 Consumer • Managed Kinesis Application • Copies records to Redshift 
 (or other AWS data stores)
 • putRecords ensures that only 
 JSON inserted • Object keys get mapped to 
 columns in Redshift
  • 26. Streaming System on AWS 26 Collector Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift
  • 27. What is this Lambda?
  • 28. AWS Lambda 28 Lambda • “Serverless” Application • Simple Function Executions • JavaScript / Java / Python / Go S3 Event Kinesis Event Many More Events
  • 29. Streaming System on AWS 29 Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift Running on Lambda CollectorAlchemist
  • 30. Welcome Alchemist • Lightweight E(xtract) T(ransform) L(oad) framework written in JS • Ideal for the usage in an AWS Lambda environment • Many built-in adapters to extract data from AWS resources (like S3) • Easy to extend 30
  • 31. Alchemist Pipeline 31 Input Transformations Output Pipeline Data Pipeline Data Pipeline Data Faulty
 Data Sane
 Data AdapterAdapter
  • 32. Alchemist use cases 32 Mobile Tracking
 Alchemist Web tracking Alchemist Email Tracking Alchemist Kinesis
  • 33. Web Tracking 33 > trackEvent(“My Event”, “some-action”, 12);
 
 > GET https://example.com/t?event=My%20Event&action=some-action&value=12 S3 Bucket CloudFront Access Log S3 Event putRecords Alchemist Kinesis *Now: https://matomo.org/ *
  • 34. Alchemist Web Pipeline 34 S3 Input Kinesis Output Cloudfront Log Transformation Unzip Transformation Quality Control Transformation SQS Output Pipeline Data Sane
 Data Faulty
 Data Check faulty data
 and react quickly S3 Bucket Load the file 
 from S3
  • 35. Alchemist Use Cases 35 Log Files Web tracking Alchemist Kinesis Mobile Tracking
 Alchemist Email Tracking Alchemist
  • 36. Mobile Tracking 36 > trackEvent(“My Mobile Event”, { “some”: “parameter” }); putRecords Kinesis Event putRecords Alchemist Kinesis Amazon Pinpoint Kinesis Pinpoint SDK
  • 37. Alchemist Mobile Pipeline 37 Kinesis Input Kinesis Output Map Fields
 Transformation Quality Control Transformation SQS Output Pipeline Data Sane
 Data Faulty
 Data Check faulty data
 and react quickly Decode64
 Parse JSON Kinesis
  • 38. Alchemist use cases 38 Kinesis Log Files Web tracking Alchemist Kinesis Mobile Tracking
 Alchemist Email Tracking Alchemist
  • 39. E-Mail Tracking 39 Webhooks for User opens an email User clicks a button in an email HTTP Event putRecords Alchemist Kinesis Newsletter Provider API Gateway
  • 40. Alchemist E-Mail Pipeline 40 HTTP Input Kinesis Output Parse Body
 Transformation Quality Control Transformation SQS Output Pipeline Data Sane
 Data Faulty
 Data Check faulty data
 and react quickly API Gateway
  • 41. Alchemist use cases 41 Kinesis Log Files Web tracking Alchemist Kinesis Mobile Tracking
 Alchemist Email Tracking Alchemist API Gateway
  • 42. Streaming System on AWS 42 Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift Alchemist Alchemist Alchemist
  • 43. BI System Routing 43 Kinesis Event Mobile Alchemist Kinesis 
 Redshift Web Web Events Table Mobile Events Table E-Mail E-Mail Events Table
  • 44. Alchemist BI Pipeline 44 Kinesis Input Firehose 
 Routed Output Map Fields
 Transformation Set Route
 Transformation SQS Output Pipeline Data Sane
 Data Faulty
 Data Check faulty data
 and react quickly Decode64
 Parse JSON Kinesis Whitelist Events
 Transformation
  • 45. Streaming System on AWS 45 Kinesis Stream Kinesis
 Firehose Lambda External
 System 
 Redshift Alchemist Alchemist Alchemist Alchemist
  • 46. External System Routing 46 Kinesis Event POST https://external.system/events Alchemist Kinesis External
 System
  • 47. Alchemist External Pipeline 47 Kinesis Input HTTP Output Prepare Body
 Transformation SQS Output Pipeline Data Sane
 Data Faulty
 Data Check faulty data
 and react quickly Decode64
 Parse JSON Kinesis Whitelist Events
 Transformation
  • 48. Streaming System on AWS 48 Kinesis Stream External
 System 
 Redshift Alchemist Alchemist Alchemist Alchemist Alchemist
  • 49. We use Alchemist to 
 route our data streams anywhere we need them.
  • 50. is Open Source https://github.com/blinkist/alchemist Currently only available in JavaScript Licensed under MIT
  • 51. Let’s talk about the costs…
  • 52. Pricing • We pay currently 150$ for 200 million events per month* 🤫 • Everything is fully managed and scaled by AWS 🤗 • Simple to maintain and operate as a developer 🤓 • No expensive pre-build solution required ✌ 52 *Redshift not included (around 0.25$/hour per node)
  • 54. Key takeaways • In-house event tracking can be scalable & affordable 💸 • A central data stream containing all relevant events is awesome 🚀 • Having a simple streaming architecture rocks🤘 • Embrace the vendor lock-in – it helps you more than it hurts 🤠 54 Don’t be afraid and in-house your event tracking!
  • 55. Thank you for your attention. https://about.me/sebastian.schleicher