SlideShare a Scribd company logo
Making Application Devs More
Productive with Real-time Analytics as
an API
Nadine Farah (Senior Developer Advocate at Rockset)
nadine@rockset.com
Rockset: Built for Real-time Analytics in the Cloud
2
Self-service on semi-structured data
Enable high query performance (Converged Index)
Eliminate the need to manage clusters
Turn powerful sql queries into real-time analytical APIs
Agenda
● Overview for building real-time analytics in 3 steps
● Object Relational Mapping (ORM)
● Elasticsearch
● Rockset Query Lambdas
● Building a Developer API Platform for Real-time Analytics
● Demo
3
3
4
Build Real-time Analytics in 3 Major Steps
5
PostGreSQL,
MongoDB,
DynamoDB,
etc...
Elasticsearch,
PostgreSQL,
Data warehouses,
etc...
Examples of databases and data stores
Build Real-time Analytics in 3 Major Steps - contd
6
Construct Real-time
Analytical APIs with ORMs
(Object Relational Mappings)
Construct an Analytical Query with ORMs
8
ORM:
u2 = Users.objects.select_related('city').get(id=2)
SQL:
SELECT u.user_id, u.title, y.city_id, y.city_name
FROM users AS u
INNER JOIN city AS y ON y.id = u.city_id
WHERE u.user_id = 2
Construct a Real-time Analytical API with ORMs
Construct a Real-time Analytical API with ORMs- contd
ORMs for Analytical Queries: Considerations
● Great for getting started on an app that needs structured &
relational data
● ORMs hide how many reads are happening behind the scenes,
possibly stressing the database
● ORMs can cache, trading off memory for speed
11
12
SQL:
cursor.execute("""
SELECT products.*, purchases.number_purchases,
reviews.average_rating
FROM commons.products
LEFT JOIN (
SELECT product_id, COUNT(*) as number_purchases
FROM commons.purchases
GROUP BY 1
) purchases on products.id =
purchases.product_id
LEFT JOIN (
SELECT product_id,
AVG(CAST(rating as int)) average_rating
FROM commons.reviews
GROUP BY 1
) reviews on products.id = reviews.product_id
WHERE revews.product_id= ‘%s’”””%id)
Using Raw SQL to Write Analytical Queries
● Be vigilant about not using string
interpolation
Construct Real-time Search
APIs with Elasticsearch
14
Elasticsearch for Real-time Search Functionality
Construct APIs with Elasticsearch
15
Joining Data in Elasticsearch vs. SQL
16
SQL:
SELECT products.*,
purchases.number_purchases,
reviews.average_rating
FROM commons.products
LEFT JOIN (
SELECT product_id, COUNT(*) as
number_purchases
FROM commons.purchases
GROUP BY 1
) purchases on products.id =
purchases.product_id
LEFT JOIN (
SELECT product_id, AVG(CAST(rating
as int)) average_rating
FROM commons.reviews
GROUP BY 1
) reviews on products.id =
reviews.product_id
WHERE + whereClause
Elasticsearch:
...(next slide)...
Elasticsearch Join Example
17
Application-side Joins in Elasticsearch: Considerations
18
● Great for text search & log search on semi-structured data/less
structured data
● Writing joins natively within your app increases complexity at the
implementation level
● You can denormalize data to combine data from different
models, but it comes at an expense
Construct Real-time
Analytical APIs with Rockset
Query Lambda
Build Real-time Analytics with Rockset
20
$ curl --request POST --url
https://api.rs2.usw2.rockset.com/v1/orgs/self/ws/commons/lambdas/MyReco/versions/832f29e
fdad4e57b/...
Real-time Analytical Queries in Rockset
21
SQL:
SELECT products.*,
purchases.number_purchases,
reviews.average_rating
FROM commons.products
LEFT JOIN (
SELECT product_id, COUNT(*) as
number_purchases
FROM commons.purchases
GROUP BY 1
) purchases on products.id =
purchases.product_id
LEFT JOIN (
SELECT product_id, AVG(CAST(rating as
int)) average_rating
FROM commons.reviews
GROUP BY 1
) reviews on products.id =
reviews.product_id
WHERE + whereClause
SQL in Rockset: TLDR no change!
SELECT products.*,
purchases.number_purchases,
reviews.average_rating
FROM commons.products
LEFT JOIN (
SELECT product_id, COUNT(*) as
number_purchases
FROM commons.purchases
GROUP BY 1
) purchases on products.id =
purchases.product_id
LEFT JOIN (
SELECT product_id, AVG(CAST(rating as
int)) average_rating
FROM commons.reviews
GROUP BY 1
) reviews on products.id =
reviews.product_id
WHERE + whereClause
Real-time Analytics as an API
22
23
Real-time Analytics with Query Lambdas: Considerations
● Used for search and analytics on semi-structured & structured
data
● Rockset is cost efficient for 10’s of terabytes of data
● Rockset is optimized for cloud-only analytics
●
Building a Developer API Platform for Real-time Analytics
● Teams can easily collaborate
and version Query Lambdas
● Millisecond Query performance
out-of-the-box
● Less server-side code to create
and maintain real-time
analytical APIs
24
Live Demo
Using Rockset to Build Real-time Analytics
26
26
Thank You
@rocksetcloud Rockset
bit.ly/rockset-community-channel
@heyerrrbody
docs.rockset.com
rockset.com

More Related Content

PDF
Designing Secure APIs in the Cloud
PPTX
Intelligent Cloud Conference 2018 - Next Generation of Data Integration with ...
PDF
BaasBox - Your mobile backend made easy
PPTX
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
PPTX
Event Sourcing your AngularJS applications
PDF
Monitoring docker, k8s and your applications with the elastic stack
PPTX
Event Sourcing your Angular and React applications
PPTX
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
Designing Secure APIs in the Cloud
Intelligent Cloud Conference 2018 - Next Generation of Data Integration with ...
BaasBox - Your mobile backend made easy
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Event Sourcing your AngularJS applications
Monitoring docker, k8s and your applications with the elastic stack
Event Sourcing your Angular and React applications
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...

What's hot (16)

PDF
Eventbus Library and How Does it Work?
PDF
The importance of monitoring your Azure SQL Database
PPTX
Introduction to Event Sourcing
PDF
The magic of Ajax & WebGIS
PDF
Who's afraid of front end databases
PPTX
Automatizacion de Procesos en Modelos Tabulares
PDF
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
PPTX
AWS Config Rules - Advanced AWS Meetup
PDF
New York Elastic{ON} Tour Opening Keynote
PDF
Secrets acrosscloudk8s
PPTX
Event-Sourcing your React-Redux applications
PDF
Logging, indicateurs et APM : le trio gagnant pour des opérations réussies
PDF
Redux data flow with angular
PDF
Redux data flow with angular
PPTX
The Elastic ELK Stack
PDF
Architectural Best Practices to Master + Pitfalls to Avoid (P)
Eventbus Library and How Does it Work?
The importance of monitoring your Azure SQL Database
Introduction to Event Sourcing
The magic of Ajax & WebGIS
Who's afraid of front end databases
Automatizacion de Procesos en Modelos Tabulares
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
AWS Config Rules - Advanced AWS Meetup
New York Elastic{ON} Tour Opening Keynote
Secrets acrosscloudk8s
Event-Sourcing your React-Redux applications
Logging, indicateurs et APM : le trio gagnant pour des opérations réussies
Redux data flow with angular
Redux data flow with angular
The Elastic ELK Stack
Architectural Best Practices to Master + Pitfalls to Avoid (P)
Ad

Similar to Making App Developers More Productive (20)

PPTX
An Enterprise Architect's View of MongoDB
PPTX
The journy to real time analytics
PPTX
When to Use MongoDB
PDF
Which Questions We Should Have
PPTX
GOTO Aarhus 2014: Making Enterprise Data Available in Real Time with elastics...
PDF
Expanding Retail Frontiers with MongoDB
PDF
Simplifying & accelerating application development with MongoDB's intelligent...
PDF
ElasticSearch on AWS - Real Estate portal case study (Spitogatos.gr)
PPTX
L’architettura di classe enterprise di nuova generazione
PPT
Schema Design by Chad Tindel, Solution Architect, 10gen
PPTX
Enterprise architectsview 2015-apr
PPTX
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
PPT
No SQL and MongoDB - Hyderabad Scalability Meetup
KEY
Optimize drupal using mongo db
PPTX
Data Analytics with MongoDB - Jane Fine
PDF
Finding Love with MongoDB
PDF
MongoDB Meetup
PPT
Webinar: Expanding Retail Frontiers with MongoDB
PDF
Enabling Telco to Build and Run Modern Applications
PPTX
Webinar: How Financial Services Organizations Use MongoDB
An Enterprise Architect's View of MongoDB
The journy to real time analytics
When to Use MongoDB
Which Questions We Should Have
GOTO Aarhus 2014: Making Enterprise Data Available in Real Time with elastics...
Expanding Retail Frontiers with MongoDB
Simplifying & accelerating application development with MongoDB's intelligent...
ElasticSearch on AWS - Real Estate portal case study (Spitogatos.gr)
L’architettura di classe enterprise di nuova generazione
Schema Design by Chad Tindel, Solution Architect, 10gen
Enterprise architectsview 2015-apr
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
No SQL and MongoDB - Hyderabad Scalability Meetup
Optimize drupal using mongo db
Data Analytics with MongoDB - Jane Fine
Finding Love with MongoDB
MongoDB Meetup
Webinar: Expanding Retail Frontiers with MongoDB
Enabling Telco to Build and Run Modern Applications
Webinar: How Financial Services Organizations Use MongoDB
Ad

More from Postman (20)

PDF
Advanced AI and Documentation Techniques
PDF
WeTestAthens: Postman's AI & Automation Techniques
PDF
Elevating Developer Experiences with AI-Powered API Testing & Documentation
PDF
Discovering Public APIs and Public API Network with Postman
PDF
Optimizing Teamwork: Harnessing Collections & Workspaces for Collaboration
PDF
API testing Beyond the Basics AI & Automation Techniques
PDF
Not Your Grandma’s Rate Limiting (slides)
PDF
Five Ways to Automate API Testing with Postman
PDF
How to Scale APIs-as-Product for Future Success
PPTX
Revolutionizing API Development: Collaborative Workflows with Postman
PDF
Everything You Always Wanted to Know About AsyncAPI
PDF
Elevating Event-Driven World: A Deep Dive into AsyncAPI v3
PDF
Five Things You SHOULD Know About Postman
PDF
Integration-, Snapshot- and Performance-Testing APIs
PDF
How ChatGPT led OpenAPI's Recent Spike in Popularity
PDF
Exploring Postman’s VS Code Extension
PDF
2023 State of the API Report: Key Findings and Trends
PDF
Nordic- APIOps is here What will you build in an API First World
PDF
Testing and Developing gRPC APIs
PDF
Testing and Developing GraphQL APIs
Advanced AI and Documentation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Elevating Developer Experiences with AI-Powered API Testing & Documentation
Discovering Public APIs and Public API Network with Postman
Optimizing Teamwork: Harnessing Collections & Workspaces for Collaboration
API testing Beyond the Basics AI & Automation Techniques
Not Your Grandma’s Rate Limiting (slides)
Five Ways to Automate API Testing with Postman
How to Scale APIs-as-Product for Future Success
Revolutionizing API Development: Collaborative Workflows with Postman
Everything You Always Wanted to Know About AsyncAPI
Elevating Event-Driven World: A Deep Dive into AsyncAPI v3
Five Things You SHOULD Know About Postman
Integration-, Snapshot- and Performance-Testing APIs
How ChatGPT led OpenAPI's Recent Spike in Popularity
Exploring Postman’s VS Code Extension
2023 State of the API Report: Key Findings and Trends
Nordic- APIOps is here What will you build in an API First World
Testing and Developing gRPC APIs
Testing and Developing GraphQL APIs

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
history of c programming in notes for students .pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Nekopoi APK 2025 free lastest update
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Introduction to Artificial Intelligence
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
history of c programming in notes for students .pptx
Reimagine Home Health with the Power of Agentic AI​
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Nekopoi APK 2025 free lastest update
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
2025 Textile ERP Trends: SAP, Odoo & Oracle
wealthsignaloriginal-com-DS-text-... (1).pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Odoo Companies in India – Driving Business Transformation.pdf
Essential Infomation Tech presentation.pptx
Softaken Excel to vCard Converter Software.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Introduction to Artificial Intelligence
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How Creative Agencies Leverage Project Management Software.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Understanding Forklifts - TECH EHS Solution

Making App Developers More Productive

  • 1. Making Application Devs More Productive with Real-time Analytics as an API Nadine Farah (Senior Developer Advocate at Rockset) nadine@rockset.com
  • 2. Rockset: Built for Real-time Analytics in the Cloud 2 Self-service on semi-structured data Enable high query performance (Converged Index) Eliminate the need to manage clusters Turn powerful sql queries into real-time analytical APIs
  • 3. Agenda ● Overview for building real-time analytics in 3 steps ● Object Relational Mapping (ORM) ● Elasticsearch ● Rockset Query Lambdas ● Building a Developer API Platform for Real-time Analytics ● Demo 3 3
  • 4. 4
  • 5. Build Real-time Analytics in 3 Major Steps 5 PostGreSQL, MongoDB, DynamoDB, etc... Elasticsearch, PostgreSQL, Data warehouses, etc... Examples of databases and data stores
  • 6. Build Real-time Analytics in 3 Major Steps - contd 6
  • 7. Construct Real-time Analytical APIs with ORMs (Object Relational Mappings)
  • 8. Construct an Analytical Query with ORMs 8 ORM: u2 = Users.objects.select_related('city').get(id=2) SQL: SELECT u.user_id, u.title, y.city_id, y.city_name FROM users AS u INNER JOIN city AS y ON y.id = u.city_id WHERE u.user_id = 2
  • 9. Construct a Real-time Analytical API with ORMs
  • 10. Construct a Real-time Analytical API with ORMs- contd
  • 11. ORMs for Analytical Queries: Considerations ● Great for getting started on an app that needs structured & relational data ● ORMs hide how many reads are happening behind the scenes, possibly stressing the database ● ORMs can cache, trading off memory for speed 11
  • 12. 12 SQL: cursor.execute(""" SELECT products.*, purchases.number_purchases, reviews.average_rating FROM commons.products LEFT JOIN ( SELECT product_id, COUNT(*) as number_purchases FROM commons.purchases GROUP BY 1 ) purchases on products.id = purchases.product_id LEFT JOIN ( SELECT product_id, AVG(CAST(rating as int)) average_rating FROM commons.reviews GROUP BY 1 ) reviews on products.id = reviews.product_id WHERE revews.product_id= ‘%s’”””%id) Using Raw SQL to Write Analytical Queries ● Be vigilant about not using string interpolation
  • 13. Construct Real-time Search APIs with Elasticsearch
  • 14. 14 Elasticsearch for Real-time Search Functionality
  • 15. Construct APIs with Elasticsearch 15
  • 16. Joining Data in Elasticsearch vs. SQL 16 SQL: SELECT products.*, purchases.number_purchases, reviews.average_rating FROM commons.products LEFT JOIN ( SELECT product_id, COUNT(*) as number_purchases FROM commons.purchases GROUP BY 1 ) purchases on products.id = purchases.product_id LEFT JOIN ( SELECT product_id, AVG(CAST(rating as int)) average_rating FROM commons.reviews GROUP BY 1 ) reviews on products.id = reviews.product_id WHERE + whereClause Elasticsearch: ...(next slide)...
  • 18. Application-side Joins in Elasticsearch: Considerations 18 ● Great for text search & log search on semi-structured data/less structured data ● Writing joins natively within your app increases complexity at the implementation level ● You can denormalize data to combine data from different models, but it comes at an expense
  • 19. Construct Real-time Analytical APIs with Rockset Query Lambda
  • 20. Build Real-time Analytics with Rockset 20 $ curl --request POST --url https://api.rs2.usw2.rockset.com/v1/orgs/self/ws/commons/lambdas/MyReco/versions/832f29e fdad4e57b/...
  • 21. Real-time Analytical Queries in Rockset 21 SQL: SELECT products.*, purchases.number_purchases, reviews.average_rating FROM commons.products LEFT JOIN ( SELECT product_id, COUNT(*) as number_purchases FROM commons.purchases GROUP BY 1 ) purchases on products.id = purchases.product_id LEFT JOIN ( SELECT product_id, AVG(CAST(rating as int)) average_rating FROM commons.reviews GROUP BY 1 ) reviews on products.id = reviews.product_id WHERE + whereClause SQL in Rockset: TLDR no change! SELECT products.*, purchases.number_purchases, reviews.average_rating FROM commons.products LEFT JOIN ( SELECT product_id, COUNT(*) as number_purchases FROM commons.purchases GROUP BY 1 ) purchases on products.id = purchases.product_id LEFT JOIN ( SELECT product_id, AVG(CAST(rating as int)) average_rating FROM commons.reviews GROUP BY 1 ) reviews on products.id = reviews.product_id WHERE + whereClause
  • 23. 23 Real-time Analytics with Query Lambdas: Considerations ● Used for search and analytics on semi-structured & structured data ● Rockset is cost efficient for 10’s of terabytes of data ● Rockset is optimized for cloud-only analytics ●
  • 24. Building a Developer API Platform for Real-time Analytics ● Teams can easily collaborate and version Query Lambdas ● Millisecond Query performance out-of-the-box ● Less server-side code to create and maintain real-time analytical APIs 24
  • 26. Using Rockset to Build Real-time Analytics 26 26