SlideShare a Scribd company logo
1 of 33
When RESTful may be
considered harmful
Copyright Push Technology 2015
Ross Garrett @gssor
RESTful may be harmful, eh?
@gssor
4
@gssor
Copyright Push Technology 2015
What do we mean by RESTful?
5
@gssor
Copyright Push Technology 20156
@gssor
Copyright Push Technology 20157
@gssor
When WebAPIs may be
considered harmful
Copyright Push Technology 2015
Ross Garrett @gssor
Copyright Push Technology 2015
(Web) Apis can sting you
9
Copyright Push Technology 2015
What constitutes “harmful”?
• Poor end-user experience
• Insufficient scaling capacity
• Inappropriate implementation / usage
• HATEOAS?
• ???
@gssor
Copyright Push Technology 2015
Poor User Experience
• This usually means slow / unreliable apps
• Often caused by the network
11
@gssor
Copyright Push Technology 2015
#1 Data redundancy
{
uid : 1234567890,
title : “Something”,
db_key : “some_thing_item”,
modified_date : “13-06-1991”,
…
}
@gssor
Copyright Push Technology 2015
#1 Data redundancy
{
uid : 1234567890,
title : “Something else”,
db_key : “some_thing_item”,
modified_date : “06-08-2015”,
…
}
It’s like the Internet is running with Debug turned on
@gssor
Copyright Push Technology 2015
Insufficient scaling capability
• Growing from 1000 users to 1,000,000 users
• Should we simply add CPUs, NICs, etc?
14
@gssor
Copyright Push Technology 2015
#2 Data delivery
Your clients
@gssor
Copyright Push Technology 2015
#2 Data delivery
• How many requests do you service for data that hasn’t changed?
• Guess what? HTTP 304 is a thing
• Everything has a cost; only pay for what you need
@gssor
Copyright Push Technology 2015
Inappropriate Implementation
• WebAPIs often mimic backend systems & operations
• If one system needs to notify another about an event - do they really
need to know about each other?
17
@gssor
Copyright Push Technology 2015
#3 Coupling
18
@gssor
Copyright Push Technology 2015
#3 Coupling
• Message-driven distributed architectures prove to be much more
robust and fault-tolerant.
• Producers and consumers are truly independent.
• Scalability is easier to achieve, and we can distribute messages to
multiple systems at a time.
@gssor
Copyright Push Technology 2015
@gssor
Copyright Push Technology 2015
The Internet…
• Unknown, uncontrolled resource
• It will let you down
– Insufficient bandwidth
– Inconsistent bandwidth
– High latency
– Loss of connectivity on a regular basis
• Be sympathetic to realities of the network
@gssor
Copyright Push Technology 2015
The (mobile) Internet…
• HTTP & TCP slow-start are usually not a good match for constantly
dropped connections
• Network interface kills battery
• Large responses + periodic polling = bad
@gssor
Copyright Push Technology 2015
Recommendations?
• STOP polling!
• Remove data redundancies
• Avoid coupling
@gssor
Copyright Push Technology 2015
Think Reactive
24
http://www.reactivemanifesto.org
Copyright Push Technology 2015
Responsiveness
• As far as users’ know - when application response time exceeds their expectations they
assume the system is down
• Slow responses tie up resources on the called system and the calling application
25
A responsive system is quick to react to all
users — under blue skies and grey skies — in
order to ensure a consistently positive user
experience.
Copyright Push Technology 2015
A Responsive System depends on one that
is Resilient & Elastic
26
Copyright Push Technology 2015
Resilient
• A Resilient system can react to variable conditions and failures
• A resilient system keeps processing transactions, even when there are transient impulses,
persistent stresses or component failures disrupting normal processing
27
Resilient = Reliable
Copyright Push Technology 2015
Elastic
• An elastic system can allocate / de-allocate resources for every individual component or
client as demand varies
• Elasticity also requires non-blocking design
28
Elastic is another word for Scalable
Copyright Push Technology 2015
Message Driven
• A message-driven application may be event-driven, actor-based, or a combination of the two
• An event-driven system is based on events which are monitored by zero or more observers
– The caller doesn’t need to block waiting for a response from the invoked routine
• Event-driven applications are not focused on the call stack, but rather on triggering events
• Events may be encoded as messages that are placed in a queue that is monitored by zero or
more observers
29
Copyright Push Technology 2015
The right fit
• WebAPIs have solved lots of problems, and provided lots of
opportunity
• Reactive apps almost always demand streaming pub/sub messaging
– Websockets!
• Conceptual simplicity != best performance
Copyright Push Technology 2015
There is no “one size fits all” approach, think
strategically and critically about your architecture
choices
31
Copyright Push Technology 2015
Questions?
32
Thanks!
Subscribe to our blogFollow us on Twitter Check out our whitepapers
@reappt
@push_technology
@gssor

More Related Content

What's hot

What's hot (20)

In Cloud We Encrypt #GHC15
In Cloud We Encrypt #GHC15In Cloud We Encrypt #GHC15
In Cloud We Encrypt #GHC15
 
Threat Exposure Management - Reduce your Risk of a Breach
Threat Exposure Management - Reduce your Risk of a BreachThreat Exposure Management - Reduce your Risk of a Breach
Threat Exposure Management - Reduce your Risk of a Breach
 
The Art and Science of Alert Triage
The Art and Science of Alert TriageThe Art and Science of Alert Triage
The Art and Science of Alert Triage
 
How can Savvius help your organization?
How can Savvius help your organization?How can Savvius help your organization?
How can Savvius help your organization?
 
5 benefits of network monitoring
5 benefits of network monitoring5 benefits of network monitoring
5 benefits of network monitoring
 
Security Orchestration and Automation with Hexadite+
Security Orchestration and Automation with Hexadite+Security Orchestration and Automation with Hexadite+
Security Orchestration and Automation with Hexadite+
 
SplunkLive! London 2016 - Shazam
SplunkLive! London 2016 - ShazamSplunkLive! London 2016 - Shazam
SplunkLive! London 2016 - Shazam
 
Building Digital Trust
   Building Digital Trust   Building Digital Trust
Building Digital Trust
 
Shift Happens: Eliminating the Risks of Network Security Policy Changes
Shift Happens: Eliminating the Risks of Network Security Policy ChangesShift Happens: Eliminating the Risks of Network Security Policy Changes
Shift Happens: Eliminating the Risks of Network Security Policy Changes
 
SplunkLive! Utrecht - Splunk for Security - Monzy Merza
SplunkLive! Utrecht - Splunk for Security - Monzy MerzaSplunkLive! Utrecht - Splunk for Security - Monzy Merza
SplunkLive! Utrecht - Splunk for Security - Monzy Merza
 
BeyondCorp Austin Meetup: BeyondCorp Myths Busted
BeyondCorp Austin Meetup: BeyondCorp Myths BustedBeyondCorp Austin Meetup: BeyondCorp Myths Busted
BeyondCorp Austin Meetup: BeyondCorp Myths Busted
 
SplunkLive! London 2016 - John Lewis
SplunkLive! London 2016 - John LewisSplunkLive! London 2016 - John Lewis
SplunkLive! London 2016 - John Lewis
 
Security Automation Quick Wins - Siemplify Webinar
Security Automation Quick Wins - Siemplify WebinarSecurity Automation Quick Wins - Siemplify Webinar
Security Automation Quick Wins - Siemplify Webinar
 
Lisa Guess - Embracing the Cloud
Lisa Guess - Embracing the CloudLisa Guess - Embracing the Cloud
Lisa Guess - Embracing the Cloud
 
Republic Services Customer Presentation
Republic Services Customer PresentationRepublic Services Customer Presentation
Republic Services Customer Presentation
 
IBM Infographic - Enterprise File Gateway
IBM Infographic - Enterprise File GatewayIBM Infographic - Enterprise File Gateway
IBM Infographic - Enterprise File Gateway
 
The Case For Secure Data Science
The Case For Secure Data ScienceThe Case For Secure Data Science
The Case For Secure Data Science
 
HealthConDX Virtual Summit 2021 - How Security Chaos Engineering is Changing ...
HealthConDX Virtual Summit 2021 - How Security Chaos Engineering is Changing ...HealthConDX Virtual Summit 2021 - How Security Chaos Engineering is Changing ...
HealthConDX Virtual Summit 2021 - How Security Chaos Engineering is Changing ...
 
451 AppSense Webinar - Why blame the user?
451 AppSense Webinar - Why blame the user?451 AppSense Webinar - Why blame the user?
451 AppSense Webinar - Why blame the user?
 
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
 

Viewers also liked

Class 1 tahoe geology and native americans 2015
Class 1 tahoe geology and native americans 2015Class 1 tahoe geology and native americans 2015
Class 1 tahoe geology and native americans 2015
Tahoe_History
 
Introduction to GCC 2010 (En)
Introduction to GCC 2010 (En)Introduction to GCC 2010 (En)
Introduction to GCC 2010 (En)
Mark Stothers
 
Classification of voltage disturbance using machine learning
Classification of voltage disturbance using machine learning Classification of voltage disturbance using machine learning
Classification of voltage disturbance using machine learning
Mohan Kashyap
 
Let's Talk Mental Illness_Overview
Let's Talk Mental Illness_OverviewLet's Talk Mental Illness_Overview
Let's Talk Mental Illness_Overview
Hakeem Rahim
 
A four way autometic traffic control system with variable delay using hdl
A four way autometic traffic control system with variable delay using hdlA four way autometic traffic control system with variable delay using hdl
A four way autometic traffic control system with variable delay using hdl
eSAT Journals
 

Viewers also liked (15)

Promedios primer bimestre
Promedios primer bimestrePromedios primer bimestre
Promedios primer bimestre
 
Class 1 tahoe geology and native americans 2015
Class 1 tahoe geology and native americans 2015Class 1 tahoe geology and native americans 2015
Class 1 tahoe geology and native americans 2015
 
Introduction to GCC 2010 (En)
Introduction to GCC 2010 (En)Introduction to GCC 2010 (En)
Introduction to GCC 2010 (En)
 
Trabajoengrupo
TrabajoengrupoTrabajoengrupo
Trabajoengrupo
 
Classification of voltage disturbance using machine learning
Classification of voltage disturbance using machine learning Classification of voltage disturbance using machine learning
Classification of voltage disturbance using machine learning
 
The New Consumer
The New ConsumerThe New Consumer
The New Consumer
 
Let's Talk Mental Illness_Overview
Let's Talk Mental Illness_OverviewLet's Talk Mental Illness_Overview
Let's Talk Mental Illness_Overview
 
An introduction to social media (with animation) october 4
An introduction to social media (with animation)   october 4An introduction to social media (with animation)   october 4
An introduction to social media (with animation) october 4
 
Prefab+villa+profile
Prefab+villa+profilePrefab+villa+profile
Prefab+villa+profile
 
Jitsi
JitsiJitsi
Jitsi
 
Bio medical signal analysis(both normal and abnormal)
Bio medical signal analysis(both normal and abnormal)Bio medical signal analysis(both normal and abnormal)
Bio medical signal analysis(both normal and abnormal)
 
A four way autometic traffic control system with variable delay using hdl
A four way autometic traffic control system with variable delay using hdlA four way autometic traffic control system with variable delay using hdl
A four way autometic traffic control system with variable delay using hdl
 
Mission, vision
Mission, visionMission, vision
Mission, vision
 
Vtc conf presentation - cdt website
Vtc conf presentation - cdt websiteVtc conf presentation - cdt website
Vtc conf presentation - cdt website
 
Slideshare
Slideshare Slideshare
Slideshare
 

Similar to API Days Paris - When RESTful may be considered harmful

Your Applications Are Distributed, How About Your Network Analysis Solution?
Your Applications Are Distributed, How About Your Network Analysis Solution?Your Applications Are Distributed, How About Your Network Analysis Solution?
Your Applications Are Distributed, How About Your Network Analysis Solution?
Savvius, Inc
 

Similar to API Days Paris - When RESTful may be considered harmful (20)

When RESTful may be considered harmful
When RESTful may be considered harmfulWhen RESTful may be considered harmful
When RESTful may be considered harmful
 
Spirent: The Internet of Things: The Expanded Security Perimeter
Spirent: The Internet of Things:  The Expanded Security Perimeter Spirent: The Internet of Things:  The Expanded Security Perimeter
Spirent: The Internet of Things: The Expanded Security Perimeter
 
LoginCat from TekMonks
LoginCat from TekMonksLoginCat from TekMonks
LoginCat from TekMonks
 
Managing a Widely Distributed Network
Managing a Widely Distributed NetworkManaging a Widely Distributed Network
Managing a Widely Distributed Network
 
When Downtime Isn’t an Option: Performance Optimization Analytics in the Era ...
When Downtime Isn’t an Option: Performance Optimization Analytics in the Era ...When Downtime Isn’t an Option: Performance Optimization Analytics in the Era ...
When Downtime Isn’t an Option: Performance Optimization Analytics in the Era ...
 
apidays LIVE Australia 2020 - The Evolution of APIs: Events and the AsyncAPI ...
apidays LIVE Australia 2020 - The Evolution of APIs: Events and the AsyncAPI ...apidays LIVE Australia 2020 - The Evolution of APIs: Events and the AsyncAPI ...
apidays LIVE Australia 2020 - The Evolution of APIs: Events and the AsyncAPI ...
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
 
What’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINTWhat’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINT
 
LoginCat - Zero Trust Integrated Cybersecurity
LoginCat - Zero Trust Integrated CybersecurityLoginCat - Zero Trust Integrated Cybersecurity
LoginCat - Zero Trust Integrated Cybersecurity
 
Delivering Network Innovation with SDN - Tom Nadeau
Delivering Network Innovation with SDN - Tom Nadeau Delivering Network Innovation with SDN - Tom Nadeau
Delivering Network Innovation with SDN - Tom Nadeau
 
Your Applications Are Distributed, How About Your Network Analysis Solution?
Your Applications Are Distributed, How About Your Network Analysis Solution?Your Applications Are Distributed, How About Your Network Analysis Solution?
Your Applications Are Distributed, How About Your Network Analysis Solution?
 
Why Network and Endpoint Security Isn’t Enough
Why Network and Endpoint Security Isn’t EnoughWhy Network and Endpoint Security Isn’t Enough
Why Network and Endpoint Security Isn’t Enough
 
Adversary Driven Defense in the Real World
Adversary Driven Defense in the Real WorldAdversary Driven Defense in the Real World
Adversary Driven Defense in the Real World
 
Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014
 
Future-Proof Your Streaming Analytics Architecture- StreamAnalytix Webinar
Future-Proof Your Streaming Analytics Architecture- StreamAnalytix WebinarFuture-Proof Your Streaming Analytics Architecture- StreamAnalytix Webinar
Future-Proof Your Streaming Analytics Architecture- StreamAnalytix Webinar
 
Runtime Protection in the Real World
Runtime Protection in the Real WorldRuntime Protection in the Real World
Runtime Protection in the Real World
 
Splunk MINT and Stream Breakout
Splunk MINT and Stream BreakoutSplunk MINT and Stream Breakout
Splunk MINT and Stream Breakout
 
Visualizing Your Network Health - Know your Network
Visualizing Your Network Health - Know your NetworkVisualizing Your Network Health - Know your Network
Visualizing Your Network Health - Know your Network
 
Zero Trust And Best Practices for Securing Endpoint Apps on May 24th 2021
Zero Trust And Best Practices for Securing Endpoint Apps on May 24th 2021Zero Trust And Best Practices for Securing Endpoint Apps on May 24th 2021
Zero Trust And Best Practices for Securing Endpoint Apps on May 24th 2021
 

More from Ross Garrett

More from Ross Garrett (8)

Build Platforms not Products
Build Platforms not Products Build Platforms not Products
Build Platforms not Products
 
Dzone webinar : Making integration suck less
Dzone webinar : Making integration suck lessDzone webinar : Making integration suck less
Dzone webinar : Making integration suck less
 
Making Integration Suck Less
Making Integration Suck LessMaking Integration Suck Less
Making Integration Suck Less
 
The attention economy and the internet
The attention economy and the internetThe attention economy and the internet
The attention economy and the internet
 
Apps world 2014 - APIs A State of the Union
Apps world 2014 - APIs A State of the UnionApps world 2014 - APIs A State of the Union
Apps world 2014 - APIs A State of the Union
 
Is this "thing" connected?
Is this "thing" connected?Is this "thing" connected?
Is this "thing" connected?
 
Microservices under the microscope
Microservices under the microscopeMicroservices under the microscope
Microservices under the microscope
 
A Babel Fish from the Swamp of POX
A Babel Fish from the Swamp of POXA Babel Fish from the Swamp of POX
A Babel Fish from the Swamp of POX
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

API Days Paris - When RESTful may be considered harmful

  • 1.
  • 2. When RESTful may be considered harmful Copyright Push Technology 2015 Ross Garrett @gssor
  • 3. RESTful may be harmful, eh? @gssor
  • 5. Copyright Push Technology 2015 What do we mean by RESTful? 5 @gssor
  • 8. When WebAPIs may be considered harmful Copyright Push Technology 2015 Ross Garrett @gssor
  • 9. Copyright Push Technology 2015 (Web) Apis can sting you 9
  • 10. Copyright Push Technology 2015 What constitutes “harmful”? • Poor end-user experience • Insufficient scaling capacity • Inappropriate implementation / usage • HATEOAS? • ??? @gssor
  • 11. Copyright Push Technology 2015 Poor User Experience • This usually means slow / unreliable apps • Often caused by the network 11 @gssor
  • 12. Copyright Push Technology 2015 #1 Data redundancy { uid : 1234567890, title : “Something”, db_key : “some_thing_item”, modified_date : “13-06-1991”, … } @gssor
  • 13. Copyright Push Technology 2015 #1 Data redundancy { uid : 1234567890, title : “Something else”, db_key : “some_thing_item”, modified_date : “06-08-2015”, … } It’s like the Internet is running with Debug turned on @gssor
  • 14. Copyright Push Technology 2015 Insufficient scaling capability • Growing from 1000 users to 1,000,000 users • Should we simply add CPUs, NICs, etc? 14 @gssor
  • 15. Copyright Push Technology 2015 #2 Data delivery Your clients @gssor
  • 16. Copyright Push Technology 2015 #2 Data delivery • How many requests do you service for data that hasn’t changed? • Guess what? HTTP 304 is a thing • Everything has a cost; only pay for what you need @gssor
  • 17. Copyright Push Technology 2015 Inappropriate Implementation • WebAPIs often mimic backend systems & operations • If one system needs to notify another about an event - do they really need to know about each other? 17 @gssor
  • 18. Copyright Push Technology 2015 #3 Coupling 18 @gssor
  • 19. Copyright Push Technology 2015 #3 Coupling • Message-driven distributed architectures prove to be much more robust and fault-tolerant. • Producers and consumers are truly independent. • Scalability is easier to achieve, and we can distribute messages to multiple systems at a time. @gssor
  • 21. Copyright Push Technology 2015 The Internet… • Unknown, uncontrolled resource • It will let you down – Insufficient bandwidth – Inconsistent bandwidth – High latency – Loss of connectivity on a regular basis • Be sympathetic to realities of the network @gssor
  • 22. Copyright Push Technology 2015 The (mobile) Internet… • HTTP & TCP slow-start are usually not a good match for constantly dropped connections • Network interface kills battery • Large responses + periodic polling = bad @gssor
  • 23. Copyright Push Technology 2015 Recommendations? • STOP polling! • Remove data redundancies • Avoid coupling @gssor
  • 24. Copyright Push Technology 2015 Think Reactive 24 http://www.reactivemanifesto.org
  • 25. Copyright Push Technology 2015 Responsiveness • As far as users’ know - when application response time exceeds their expectations they assume the system is down • Slow responses tie up resources on the called system and the calling application 25 A responsive system is quick to react to all users — under blue skies and grey skies — in order to ensure a consistently positive user experience.
  • 26. Copyright Push Technology 2015 A Responsive System depends on one that is Resilient & Elastic 26
  • 27. Copyright Push Technology 2015 Resilient • A Resilient system can react to variable conditions and failures • A resilient system keeps processing transactions, even when there are transient impulses, persistent stresses or component failures disrupting normal processing 27 Resilient = Reliable
  • 28. Copyright Push Technology 2015 Elastic • An elastic system can allocate / de-allocate resources for every individual component or client as demand varies • Elasticity also requires non-blocking design 28 Elastic is another word for Scalable
  • 29. Copyright Push Technology 2015 Message Driven • A message-driven application may be event-driven, actor-based, or a combination of the two • An event-driven system is based on events which are monitored by zero or more observers – The caller doesn’t need to block waiting for a response from the invoked routine • Event-driven applications are not focused on the call stack, but rather on triggering events • Events may be encoded as messages that are placed in a queue that is monitored by zero or more observers 29
  • 30. Copyright Push Technology 2015 The right fit • WebAPIs have solved lots of problems, and provided lots of opportunity • Reactive apps almost always demand streaming pub/sub messaging – Websockets! • Conceptual simplicity != best performance
  • 31. Copyright Push Technology 2015 There is no “one size fits all” approach, think strategically and critically about your architecture choices 31
  • 32. Copyright Push Technology 2015 Questions? 32
  • 33. Thanks! Subscribe to our blogFollow us on Twitter Check out our whitepapers @reappt @push_technology @gssor

Editor's Notes

  1. URL – easiest to change; but ideally represents the location of resource, not version Accept header – conforms to HTTP spec, semantically valid, adds extra work to consumer
  2. URL – easiest to change; but ideally represents the location of resource, not version Accept header – conforms to HTTP spec, semantically valid, adds extra work to consumer
  3. Be a node, not a hub!
  4. URL – easiest to change; but ideally represents the location of resource, not version Accept header – conforms to HTTP spec, semantically valid, adds extra work to consumer
  5. URL – easiest to change; but ideally represents the location of resource, not version Accept header – conforms to HTTP spec, semantically valid, adds extra work to consumer
  6. What do we mean when we say that an application is responsive? A responsive system is quick to react to all users — under blue skies and grey skies — in order to ensure a consistently positive user experience.
  7. Note to BF: put this quote in the same format as the Gartner quote earlier in the deck. Jarrett’s Notes