SlideShare a Scribd company logo
@StreamdataIOstreamdataio
API Streaming
Why and how to transform a REST API
into a Data Streaming API
ABOUT ME
Developer Relation Co-Leader France
@Audrey_Neveu
@StreamdataIOstreamdataio
MODERN TIMES
@StreamdataIOstreamdataio
OUR GOAL
@StreamdataIOstreamdataio
ANIMATION IS THE KEY... BUT WHY?
@StreamdataIOstreamdataio
BECAUSE OF EVOLUTION
@StreamdataIOstreamdataio
USER INTERFACE
@StreamdataIOstreamdataio
KEEP CALM AND...
@StreamdataIOstreamdataio
LEAVE.
REFRESH BUTTON IS EVIL
@StreamdataIOstreamdataio
REAL-TIME USER EXPERIENCE
@StreamdataIOstreamdataio
API STREAMING
@StreamdataIOstreamdataio
SOLUTIONS FOR REAL-TIME APPLICATIONS
✓ Web Sockets
✓ Server-Sent Events
✓ (Long) Polling
@StreamdataIOstreamdataio
IS NOT A SOLUTIONPOLLING...
@StreamdataIOstreamdataio
(and neither is long polling)
*TRUE* SOLUTIONS
Push Technologies
Web-Sockets Server-Sent Events
2008 2006
@StreamdataIOstreamdataio
W3C Specification
PUSH TECHNOLOGIES
Web-Sockets Server-Sent Events
Text + Binary Text
@StreamdataIOstreamdataio
PROTOCOLS
GET /chat HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: chat
Sec-WebSocket-Version: 13
GET /stream HTTP/1.1 1
Host: example.com
Accept: text/event-stream
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=
Sec-WebSocket-Protocol: chat
Sec-WebSocket-Version: 13
Web-Sockets
(RFC-6455)
Server-Sent Events
@StreamdataIOstreamdataio
CONFIGURATION
Server-Sent Events
@StreamdataIOstreamdataio
Web-Sockets
MESSAGES FORMAT
var msg = {
type: "message",
text: "Hello Nordic APIs!",
id: 12345,
date: Date.now()
};
data: Hello Nordic APIs!
data: Hello Nordic APIs
data: with two lines
data: {"time": "16:34:36", "text": "Hello Nordic APIs!"}
id: 12345
event: foo
data: Hello Nordic APIs!
retry: 10000
@StreamdataIOstreamdataio
Web-Sockets Server-Sent Events
IMPLEMENTATION
Server-Sent Events
@StreamdataIOstreamdataio
Web-Sockets
var websocket =
new WebSocket
('ws://websocketserver/echo');
var eventSource =
new EventSource
('http://sseserver/echo');
websocket.onOpen = function(){
...
};
eventSource.onopen = function(){
...
};
websocket.onMessage = function(e){
var data = e.data;
var message = data.msg;
...
};
eventSource.onMessage = function(e){
var message = JSON.parse(e.data);
...
};
websocket.onError = function(e){
...
};
eventSource.onError = function(e){
...
};
...
eventSource
.addEventListener('foo',function(e){
// do something
}, false);
eventSource
.addEventListener('bar',function(e){
// do something else
}, false);
LOST IN CONNECTION
Server-Sent Events
@StreamdataIOstreamdataio
Web-Sockets
BROWSER SUPPORT
Server-Sent Events
53. 49. 10. 39. 11. 14. 53. 49. 10. 39. 11. UC.
@StreamdataIOstreamdataio
Web-Sockets
source : http://caniuse.com/
MOBILE BROWSER SUPPORT
Server-Sent Events
51. 49. 10. 18. 52.
source : http://caniuse.com/
51. 49. 10. 18. 52.
@StreamdataIOstreamdataio
Web-Sockets
PERFORMANCES
8s 5s x1.6
8s 6s x1.3
16s 7s x.2.2
Web-Sockets SSE
source: http://matthiasnehlsen.com/blog/2013/05/01/server-sent-events-vs-websockets/
Diff
@StreamdataIOstreamdataio
CHOOSE WISELY
@StreamdataIOstreamdataio
Proxy-as-a-Service
✓ works with any JSON API
✓ streaming based on Server-Sent Events
✓ dynamic cache
✓ incremental updates
STREAMDATA.IO
@StreamdataIOstreamdataio
JSON-PATCH (RFC-6902)
[{"title":"Value 0","price":66,"param1":"1","param2":"22","param3":"33"},
{"title":"Value 1","price":63,"param1":"11","param2":"2","param3":"53"},
{"title":"Value 2","price":85,"param1":"1","param2":"22","param3":"33"},
{"title":"Value 3","price":21,"param1":"31","param2":"12","param3":"4"},
{"title":"Value 4","price":10,"param1":"151","param2":"22","param3":"33"},
{"title":"Value 5","price":6,"param1":"11","param2":"21","param3":"33"},
{"title":"Value 6","price":60,"param1":"11","param2":"222","param3":"33"}]
[{"title":"Value 0","price":66,"param1":"1","param2":"22","param3":"33"},
{"title":"Value 1","price":63,"param1":"11","param2":"2","param3":"53"},
{"title":"Value 2","price":5,"param1":"1","param2":"22","param3":"33"},
{"title":"Value 3","price":21,"param1":"31","param2":"32","param3":"4"},
{"title":"Value 4","price":10,"param1":"151","param2":"22","param3":"33"},
{"title":"Value 5","price":6,"param1":"11","param2":"21","param3":"33"},
{"title":"Value 6","price":60,"param1":"11","param2":"222","param3":"33"}]
[{"op":"replace","path":"/2/price","value":5},
{"op":"replace","path":"/3/param2","value":"32"}]
@StreamdataIOstreamdataio
THE API PROVIDER BEST FRIEND
Sample Case: Investment Mobile App
@StreamdataIOstreamdataio
Stockmarket
API
Web & Mobile
Apps
➢ 25bn calls/month
✓ 90% reduction of the outgoing
traffic & API Server Load
✓ 6 months acceleration in
development
DEMO
@StreamdataIOstreamdataio
VOTE SERVER-SENT EVENTS!
@StreamdataIOstreamdataio
@StreamdataIOstreamdataio
THANKS!
Q&A

More Related Content

What's hot (20)

PDF
E Discovery and Archiving in Microsoft Office 365 - Presented by Atidan
David J Rosenthal
 
PPTX
Microsoft Office 365
Doug Allen
 
PDF
Http methods
maamir farooq
 
PPTX
Intro to Azure Data Factory v1
Eric Bragas
 
PDF
VPNaaS in Neutron
Kazunori Takeuchi
 
PDF
Data Migration to Azure
Sanjay B. Bhakta
 
PDF
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
Matei Zaharia
 
PPTX
Azure Data Factory
HARIHARAN R
 
PPTX
What is Platform Observability? An Overview
Kumar Kolaganti
 
PDF
Snowflake for Data Engineering
Harald Erb
 
PDF
Pipelines and Packages: Introduction to Azure Data Factory (DATA:Scotland 2019)
Cathrine Wilhelmsen
 
PPTX
High Availability Content Caching with NGINX
NGINX, Inc.
 
PDF
Manage Microservices Chaos and Complexity with Observability
NGINX, Inc.
 
PDF
Data Onboarding
Splunk
 
PDF
Denodo 2022 : le meilleur time-to-Data du marché
Denodo
 
PPTX
Software Defined Networking - Huawei, June 2017
Novosco
 
PDF
[XConf Brasil 2020] Data mesh
ThoughtWorks Brasil
 
PDF
Using ScyllaDB for Distribution of Game Assets in Unreal Engine
ScyllaDB
 
PPTX
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Mark Kromer
 
PPTX
So You Want to Write an Exporter
Brian Brazil
 
E Discovery and Archiving in Microsoft Office 365 - Presented by Atidan
David J Rosenthal
 
Microsoft Office 365
Doug Allen
 
Http methods
maamir farooq
 
Intro to Azure Data Factory v1
Eric Bragas
 
VPNaaS in Neutron
Kazunori Takeuchi
 
Data Migration to Azure
Sanjay B. Bhakta
 
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
Matei Zaharia
 
Azure Data Factory
HARIHARAN R
 
What is Platform Observability? An Overview
Kumar Kolaganti
 
Snowflake for Data Engineering
Harald Erb
 
Pipelines and Packages: Introduction to Azure Data Factory (DATA:Scotland 2019)
Cathrine Wilhelmsen
 
High Availability Content Caching with NGINX
NGINX, Inc.
 
Manage Microservices Chaos and Complexity with Observability
NGINX, Inc.
 
Data Onboarding
Splunk
 
Denodo 2022 : le meilleur time-to-Data du marché
Denodo
 
Software Defined Networking - Huawei, June 2017
Novosco
 
[XConf Brasil 2020] Data mesh
ThoughtWorks Brasil
 
Using ScyllaDB for Distribution of Game Assets in Unreal Engine
ScyllaDB
 
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Mark Kromer
 
So You Want to Write an Exporter
Brian Brazil
 

Viewers also liked (20)

PDF
Streaming Analytics
Neera Agarwal
 
PPTX
KDD 2016 Streaming Analytics Tutorial
Neera Agarwal
 
PDF
Introduction to Real-time data processing
Yogi Devendra Vyavahare
 
PPTX
The end of polling : why and how to transform a REST API into a Data Streamin...
Audrey Neveu
 
PDF
Building Big Data Streaming Architectures
David Martínez Rego
 
PDF
Real Time Analytics with Apache Cassandra - Cassandra Day Munich
Guido Schmutz
 
PDF
Real-time Stream Processing with Apache Flink @ Hadoop Summit
Gyula Fóra
 
PDF
RBea: Scalable Real-Time Analytics at King
Gyula Fóra
 
PDF
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
 
PDF
Large-Scale Stream Processing in the Hadoop Ecosystem
Gyula Fóra
 
PDF
Real Time Analytics with Apache Cassandra - Cassandra Day Berlin
Guido Schmutz
 
PDF
Real-time analytics as a service at King
Gyula Fóra
 
PPTX
Data Streaming (in a Nutshell) ... and Spark's window operations
Vincenzo Gulisano
 
PPTX
Stream Analytics in the Enterprise
Jesus Rodriguez
 
PDF
Stream Processing Everywhere - What to use?
MapR Technologies
 
PDF
Reliable Data Intestion in BigData / IoT
Guido Schmutz
 
PDF
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
PPTX
NEPHP '12: Create a RESTful API
Andrew Curioso
 
PPTX
MongoDB - The database strikes back
Steven Cooper
 
PDF
Tomboy Web Sync Explained
Mohan Krishnan
 
Streaming Analytics
Neera Agarwal
 
KDD 2016 Streaming Analytics Tutorial
Neera Agarwal
 
Introduction to Real-time data processing
Yogi Devendra Vyavahare
 
The end of polling : why and how to transform a REST API into a Data Streamin...
Audrey Neveu
 
Building Big Data Streaming Architectures
David Martínez Rego
 
Real Time Analytics with Apache Cassandra - Cassandra Day Munich
Guido Schmutz
 
Real-time Stream Processing with Apache Flink @ Hadoop Summit
Gyula Fóra
 
RBea: Scalable Real-Time Analytics at King
Gyula Fóra
 
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
 
Large-Scale Stream Processing in the Hadoop Ecosystem
Gyula Fóra
 
Real Time Analytics with Apache Cassandra - Cassandra Day Berlin
Guido Schmutz
 
Real-time analytics as a service at King
Gyula Fóra
 
Data Streaming (in a Nutshell) ... and Spark's window operations
Vincenzo Gulisano
 
Stream Analytics in the Enterprise
Jesus Rodriguez
 
Stream Processing Everywhere - What to use?
MapR Technologies
 
Reliable Data Intestion in BigData / IoT
Guido Schmutz
 
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
NEPHP '12: Create a RESTful API
Andrew Curioso
 
MongoDB - The database strikes back
Steven Cooper
 
Tomboy Web Sync Explained
Mohan Krishnan
 
Ad

Similar to The end of polling : why and how to transform a REST API into a Data Streaming API? (20)

PDF
Streamdata 2017
Nicolas Rigaud
 
PDF
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
DATAVERSITY
 
PPTX
Forcelandia 2018 - Create lively lightning components with streaming api
Anshul Verma
 
PDF
APIdays Paris 2018 - Event-Driven APIs Eric Horesnyi, CEO, Streamdata.io
apidays
 
PPTX
Best practices of building data streaming API
Constantine Slisenka
 
PDF
Event-Driven Applications Done Right - Pulsar Summit SF 2022
StreamNative
 
PDF
From Data Push to WebSockets
Alessandro Alinone
 
PDF
WSO2 ITALIA SMARTTALK #8 ASYNCAPI.pdf
Profesia Srl, Lynx Group
 
PDF
Durable Streaming and Enterprise Messaging
Salesforce Developers
 
PDF
[WSO2 Meetup] Tools and Techniques for Building and Maintaining Streaming-bas...
WSO2
 
PDF
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
confluent
 
PDF
Real-Time Web Apps in 2015 & Beyond
Phil Leggetter
 
PPTX
Event mesh APIDays melbourne September 2019
Phil Scanlon
 
PDF
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
VMware Tanzu
 
PDF
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
confluent
 
PDF
2018 12-10 apidays.io eric horesnyi streamdata.io event-driven ap is
Eric Horesnyi
 
PDF
[WSO2Con EU 2018] The Rise of Streaming SQL
WSO2
 
PDF
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
confluent
 
PDF
Real-Time Data Feeds Using the Streaming API
Salesforce Developers
 
PDF
Leveraging services in stream processor apps at Ticketmaster (Derek Cline, Ti...
confluent
 
Streamdata 2017
Nicolas Rigaud
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
DATAVERSITY
 
Forcelandia 2018 - Create lively lightning components with streaming api
Anshul Verma
 
APIdays Paris 2018 - Event-Driven APIs Eric Horesnyi, CEO, Streamdata.io
apidays
 
Best practices of building data streaming API
Constantine Slisenka
 
Event-Driven Applications Done Right - Pulsar Summit SF 2022
StreamNative
 
From Data Push to WebSockets
Alessandro Alinone
 
WSO2 ITALIA SMARTTALK #8 ASYNCAPI.pdf
Profesia Srl, Lynx Group
 
Durable Streaming and Enterprise Messaging
Salesforce Developers
 
[WSO2 Meetup] Tools and Techniques for Building and Maintaining Streaming-bas...
WSO2
 
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
confluent
 
Real-Time Web Apps in 2015 & Beyond
Phil Leggetter
 
Event mesh APIDays melbourne September 2019
Phil Scanlon
 
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
VMware Tanzu
 
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
confluent
 
2018 12-10 apidays.io eric horesnyi streamdata.io event-driven ap is
Eric Horesnyi
 
[WSO2Con EU 2018] The Rise of Streaming SQL
WSO2
 
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
confluent
 
Real-Time Data Feeds Using the Streaming API
Salesforce Developers
 
Leveraging services in stream processor apps at Ticketmaster (Derek Cline, Ti...
confluent
 
Ad

More from Audrey Neveu (7)

PDF
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
PDF
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
Audrey Neveu
 
PDF
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
PDF
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
PDF
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Audrey Neveu
 
PDF
Search API - Google Cloud Platform
Audrey Neveu
 
PDF
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Audrey Neveu
 
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
Audrey Neveu
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Audrey Neveu
 
Search API - Google Cloud Platform
Audrey Neveu
 
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Audrey Neveu
 

Recently uploaded (20)

PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PPTX
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Design Thinking basics for Engineers.pdf
CMR University
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
Day2 B2 Best.pptx
helenjenefa1
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 

The end of polling : why and how to transform a REST API into a Data Streaming API?