Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
When RESTful may be
considered harmful
Copyright Push Technology 2015
Ross Garrett @gssor
We make the Internet work for the mobile-
obsessed, app-loving, everything-connected world.
4
Copyright Push Technology 2015
•  We’re defining the market for must-have “Internet Messaging” technology
•  Our software ...
RESTful may be harmful, eh?
Copyright Push Technology 2015
Yeah…
Here are the Top 10 reasons why
RESTful may be considered
harmful
You won’t believe n...
8
Copyright Push Technology 2015
What do we mean by RESTful?
9
Copyright Push Technology 201510
Copyright Push Technology 2015
Level 2 - HTTP Verbs
http://martinfowler.com/articles/richardsonMaturityModel.html
Copyright Push Technology 2015
An example Level 2 API
http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-webpage....
Copyright Push Technology 2015
Looking at this as a Web Page
http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-w...
Copyright Push Technology 2015
Looking at this as a Web Page
http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-w...
Copyright Push Technology 2015
Most Web APIs haven’t reached Level 3 –
The Glory of REST
15
Copyright Push Technology 2015
What constitutes “harmful”?
•  Poor end-user experience
•  Insufficient scaling capacity
• ...
Copyright Push Technology 2015
Poor User Experience
•  This usually means slow / unreliable apps
•  Often caused by the ne...
Copyright Push Technology 2015
#1 Data redundancy
{	
				uid	:	1234567890,	
				title	:	“Something”,	
				db_key	:	“some_t...
Copyright Push Technology 2015
#1 Data redundancy
{	
				uid	:	1234567890,	
				title	:	“Something	else”,	
				db_key	:	“s...
Copyright Push Technology 2015
Insufficient scaling capability
•  Growing from 1000 users to 1,000,000 users
•  Should we ...
Copyright Push Technology 2015
#2 Data delivery
Your clients
Copyright Push Technology 2015
#2 Data delivery
•  How many requests do you service for data that hasn’t changed?
•  Guess...
Copyright Push Technology 2015
Inappropriate Implementation
•  REST APIs often mimic backend systems & operations
•  If on...
Copyright Push Technology 2015
#3 Coupling
24
Copyright Push Technology 2015
#3 Coupling
•  Message-driven distributed architectures prove to be much more
robust and fa...
Copyright Push Technology 2015
Copyright Push Technology 2015
The Internet…
•  Unknown, uncontrolled resource
•  It will let you down
–  Insufficient ban...
Copyright Push Technology 2015
The (mobile) Internet…
•  HTTP & TCP slow-start are usually not a good match for constantly...
Copyright Push Technology 2015
Solutions?
•  Avoid polling!
•  Avoid redundancies
•  Avoid multiple concurrent HTTP reques...
Copyright Push Technology 2015
Think Reactive
30
http://www.reactivemanifesto.org
Copyright Push Technology 2015
The right fit
•  REST solves particular problems for a particular environment
•  Reactive a...
Copyright Push Technology 2015
There is no “one size fits all” approach, think
strategically and critically about your arc...
Copyright Push Technology 201533
Thanks!
Subscribe to our blogFollow us on Twitter Check out our whitepapers
@reappt
@push_technology
@gssor
When RESTful may be considered harmful
Prochain SlideShare
Chargement dans…5
×

When RESTful may be considered harmful

246 vues

Publié le

There is no single design decision that answers every question, but in the question of whether RESTful maybe considered harmful – this session will explore how some design decisions may be leading to poor user experiences and negatively affecting your business. We'll discuss the principles of reactive applications and how streaming APIs can deliver significant benefits over RESTful APIs.

Publié dans : Logiciels
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

When RESTful may be considered harmful

  1. 1. When RESTful may be considered harmful Copyright Push Technology 2015 Ross Garrett @gssor
  2. 2. We make the Internet work for the mobile- obsessed, app-loving, everything-connected world.
  3. 3. 4
  4. 4. Copyright Push Technology 2015 •  We’re defining the market for must-have “Internet Messaging” technology •  Our software gives business critical apps a performance edge •  It’s delivered in the way that works for you •  Founded 2006; recognized expertise in delivering data at scale and speed •  European HQ in London | Americas HQ in San Jose, CASelected Customers Who we are 5 Selected Partners
  5. 5. RESTful may be harmful, eh?
  6. 6. Copyright Push Technology 2015 Yeah… Here are the Top 10 reasons why RESTful may be considered harmful You won’t believe number 7!!
  7. 7. 8
  8. 8. Copyright Push Technology 2015 What do we mean by RESTful? 9
  9. 9. Copyright Push Technology 201510
  10. 10. Copyright Push Technology 2015 Level 2 - HTTP Verbs http://martinfowler.com/articles/richardsonMaturityModel.html
  11. 11. Copyright Push Technology 2015 An example Level 2 API http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-webpage.html
  12. 12. Copyright Push Technology 2015 Looking at this as a Web Page http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-webpage.html
  13. 13. Copyright Push Technology 2015 Looking at this as a Web Page http://blog.sgo.to/2014/04/what-your-api-would-look-like-as-webpage.html
  14. 14. Copyright Push Technology 2015 Most Web APIs haven’t reached Level 3 – The Glory of REST 15
  15. 15. Copyright Push Technology 2015 What constitutes “harmful”? •  Poor end-user experience •  Insufficient scaling capacity •  Inappropriate implementation / usage
  16. 16. Copyright Push Technology 2015 Poor User Experience •  This usually means slow / unreliable apps •  Often caused by the network 17
  17. 17. Copyright Push Technology 2015 #1 Data redundancy { uid : 1234567890, title : “Something”, db_key : “some_thing_item”, modified_date : “13-06-1991”, … }
  18. 18. 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
  19. 19. Copyright Push Technology 2015 Insufficient scaling capability •  Growing from 1000 users to 1,000,000 users •  Should we simply add CPUs, NICs, etc? 20
  20. 20. Copyright Push Technology 2015 #2 Data delivery Your clients
  21. 21. 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
  22. 22. Copyright Push Technology 2015 Inappropriate Implementation •  REST APIs often mimic backend systems & operations •  If one system needs to notify another about an event - do they really need to exist at the same time? 23
  23. 23. Copyright Push Technology 2015 #3 Coupling 24
  24. 24. 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.
  25. 25. Copyright Push Technology 2015
  26. 26. 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
  27. 27. 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
  28. 28. Copyright Push Technology 2015 Solutions? •  Avoid polling! •  Avoid redundancies •  Avoid multiple concurrent HTTP requests
  29. 29. Copyright Push Technology 2015 Think Reactive 30 http://www.reactivemanifesto.org
  30. 30. Copyright Push Technology 2015 The right fit •  REST solves particular problems for a particular environment •  Reactive apps almost demand streaming pub/sub messaging –  Websockets! •  Conceptual simplicity != best performance
  31. 31. Copyright Push Technology 2015 There is no “one size fits all” approach, think strategically and critically about your architecture choices 32
  32. 32. Copyright Push Technology 201533
  33. 33. Thanks! Subscribe to our blogFollow us on Twitter Check out our whitepapers @reappt @push_technology @gssor

×