Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Real-TimeWeb APIs
Ryan J. McDonough
@damnhandy | http://damnhandy.com
Options
Protocols
• Long-Polling
• PubSubHubbub
• WebHooks
• WebSockets
• Server-Sent Events
Services
• Pusher
• Kaazing
•...
Promising Directions
• PubSubHubbub
• Server-Sent Events (SSE)
• WebSockets + “Something Else”
PubSubHubbub
WebSockets
• STOMP +WebSockets is an interesting idea
• No ideal way for indicating the sub-protocol used by
theWebSocket
...
Server-Sent Events
Connection: keep-alive
Content-Type: text/event-stream
Date: Sat, 21 Sep 2013 13:31:59 GMT
data: {"msg"...
WhatWould Browser Do?
<script>
var source = new EventSource(’/updates');
source.addEventListener('add',
addHandler,
false)...
WhatWould PSHB Do?
Link: <http://example.com/events>;
rel=”hub";
Ideas: Links for SSE
Link: <http://example.com/events>; rel="notifications";
type="text/event-stream;data='application/ld+...
Links forWebSockets +
“Something”
Link: <ws://example.com/events>;
rel=”websocket/something";
type=“application/ld+json";
Próxima SlideShare
Cargando en…5
×

Real-Time Web APIs

1.179 visualizaciones

Publicado el

My presentation from RESTFest 2013 on real-time push notifications in hypermedia-driven APIs.

Publicado en: Tecnología, Empresariales
  • Sé el primero en comentar

Real-Time Web APIs

  1. 1. Real-TimeWeb APIs Ryan J. McDonough @damnhandy | http://damnhandy.com
  2. 2. Options Protocols • Long-Polling • PubSubHubbub • WebHooks • WebSockets • Server-Sent Events Services • Pusher • Kaazing • PubNub
  3. 3. Promising Directions • PubSubHubbub • Server-Sent Events (SSE) • WebSockets + “Something Else”
  4. 4. PubSubHubbub
  5. 5. WebSockets • STOMP +WebSockets is an interesting idea • No ideal way for indicating the sub-protocol used by theWebSocket • No way to express what media type is coming over the wire • Not sure bi-direction communication is necessary
  6. 6. Server-Sent Events Connection: keep-alive Content-Type: text/event-stream Date: Sat, 21 Sep 2013 13:31:59 GMT data: {"msg": "First message"}nn event: userlogonn data: {"username": "John123"}nn event: updaten data: {"username": "John123", "emotion": "happy"}nn
  7. 7. WhatWould Browser Do? <script> var source = new EventSource(’/updates'); source.addEventListener('add', addHandler, false); </script>
  8. 8. WhatWould PSHB Do? Link: <http://example.com/events>; rel=”hub";
  9. 9. Ideas: Links for SSE Link: <http://example.com/events>; rel="notifications"; type="text/event-stream;data='application/ld+json'";
  10. 10. Links forWebSockets + “Something” Link: <ws://example.com/events>; rel=”websocket/something"; type=“application/ld+json";

×